Manevolent / ffmpeg4j

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

Copy over missing codec parameters to stream context #13

Closed ThomasKluiters closed 1 year ago

ThomasKluiters commented 1 year ago

Hi!

I really love this library, it's exactly what I need.

I ran into some issues when converting .ogg to .mp3; first it was failing with "missing extradata headers".

After some investigation it turns out one has to copy over the codec parameters to the context.

After this, it turns out that some encoders require the codec_type to be set upon encoding, I've also fixed this.

I've included a test that represents my use-case which is now succeeding.

Manevolent commented 1 year ago

Great find, thanks for submitting!