Manevolent / ffmpeg4j

A Java OOP FFmpeg wrapper around the JavaCPP FFmpeg native library bindings
Apache License 2.0
105 stars 15 forks source link

Reaching the end of audio substream makes video substream end #15

Closed ExpensiveKoala closed 1 year ago

ExpensiveKoala commented 1 year ago

I am unsure if this is just a bug in my code, but I am opening a VideoSourceSubstream and AudioSourceSubstream and reading from them to store in a buffer. The video file I am testing with has less audio "packets" than video and when the AudioSourceSubstream reaches the end, the VideoSourceSubstream stops producing next frames.

Am I misunderstanding how these SourceSubstreams work?

My (in-progress) code is here: https://gist.github.com/ExpensiveKoala/561347881d37827e7a9ac06920603ef1