jonataslaw / jonataslaw/VideoCompress

Audio/Video pipeline waiting state during compression on Flutter

Open
#319 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Swift
Stars
262
Forks
344
PR merge metrics
No merged PRs in 30d

Description

While compressing a video using video_compress: ^3.1.4 in my Flutter project, I noticed that the audio and video pipelines sometimes enter a waiting state. The compression does not fail completely but seems stalled at the reader step for both audio and video streams.

Steps to Reproduce
1. Use video_compress: ^3.1.4 in a Flutter project.
2. Attempt to compress a video with audio.
3. Observe the logs during compression.

Expected Behavior
The video should compress without the reader entering a persistent waiting state.

Actual Behavior / Logs

V/Pipeline(Audio)(25613): execute(): starting. head=0 steps=6 remaining=6
V/MediaMetadataRetriever(25613): extractMetadata(9)
I/Decoder(AUDIO,4)(25613): buffer() failed. dequeuedInputs=0 dequeuedOutputs=5
V/Reader (25613): Returning State.Wait because buffer is null.
V/Pipeline(Audio)(25613): execute(): step Reader (#0/6) is waiting. headState=State.Ok(kotlin.Unit) headIndex=0
V/Pipeline(Video)(25613): execute(): starting. head=0 steps=7 remaining=7
V/MediaMetadataRetriever(25613): extractMetadata(9)
I/Reader (25613): Returning State.Wait because source can't read VIDEO right now.
V/Pipeline(Video)(25613): execute(): step Reader (#0/7) is waiting. headState=State.Ok(kotlin.Unit) headIndex=0
V/Segment(VIDEO,0)(25613): canAdvance(): state=State.Wait
V/Segments(25613): hasNext(VIDEO): segment=com.otaliastudios.transcoder.internal.Segment@f2a8767 lastIndex=0 canAdvance=true

Environment:
• Flutter version: 3.27.1 ([user-branch] channel)
• Dart version: 3.1.1
• video_compress: ^3.1.4
• Platform: Android (logs provided are from Android)
• Device: macOS 14.5, darwin-arm64

Additional Notes
• Audio pipeline shows buffer() failed with dequeuedInputs=0, dequeuedOutputs=5.
• Video pipeline reader returns State.Wait because source cannot read video immediately.
• This seems related to media metadata retrieval or reading segments.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.