javacv icon indicating copy to clipboard operation
javacv copied to clipboard

Flac getAudioBitrate has always been 0

Open Janix520 opened this issue 1 year ago • 4 comments

I tried it out and it seems like Flac is like this. Other formats have returns, but Flac has always been 0

Janix520 avatar Jul 06 '23 15:07 Janix520

grabber.getFormatContext().bit_rate(), Using this method returns non zero, This should be a minor issue

Janix520 avatar Jul 07 '23 01:07 Janix520

Interesting, could you open a pull request with a fix?

saudet avatar Jul 07 '23 02:07 saudet

Sorry, I can only modify Java code, although it can be changed to if(audio_ c.bitRate()==0){oc.bitRate()}, but this doesn't feel like the best solution. The problem may be with native, FFmpegFrameGrabber line 1022 audio_ C=avcodec_ Alloc_ Context3 (codec). Thank you for this open source library. If I can fix it later, I will support it

Janix520 avatar Jul 07 '23 02:07 Janix520

FFmpegFrameGrabber.getAudioBitrate() is a Java method: https://github.com/bytedeco/javacv/blob/1.5.9/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java#L537

saudet avatar Jul 07 '23 06:07 saudet