Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demuxer with .mkv file gives bit rate of 0 #84

Open
xavier630 opened this issue Jan 13, 2025 · 1 comment · May be fixed by #86
Open

Demuxer with .mkv file gives bit rate of 0 #84

xavier630 opened this issue Jan 13, 2025 · 1 comment · May be fixed by #86

Comments

@xavier630
Copy link

xavier630 commented Jan 13, 2025

Hey team,

I'm using the DemuxerWithStreamInfo and finding that the streams with video encoding for various mkv files always have a bit rate of 0.

This doesn't happen for .mov or .mp4 files, they return actual bit rates.

If I run ffmpeg or ffprobe commands on the .mkv files that I have, I get non-zero numbers for the bit rates. That is, these commands give actual bit rates:
ffprobe -v error -show_format -show_streams file.mkv | grep bit_rate
ffmpeg -i file.mkv 2>&1 | grep "bitrate"

Is this expected? If demuxing .mkv files works fine for others, perhaps we could add a .mkv example to the demuxer examples in the library to show the right way to handle .mkv files?

@xavier630 xavier630 changed the title Demuxer with .mkv file gives bitrate of 0 Demuxer with .mkv file gives bit_rate of 0 Jan 13, 2025
@xavier630 xavier630 changed the title Demuxer with .mkv file gives bit_rate of 0 Demuxer with .mkv file gives bit rate of 0 Jan 13, 2025
@operutka
Copy link
Member

Hi. This crate is just a wrapper over the FFmpeg libs. If you get 0 bitrate in audio/video codec parameters from the demuxer, it means that the underlying FFmpeg libs return codec parameters with this value. I suggest discussing this with FFmpeg developers.

I'm not sure what exactly the ffprobe and ffmpeg apps do to display the bitrate. They may do additional bitrate estimation if there's 0 bitrate in the codec parameters.

@cht42 cht42 linked a pull request Jan 22, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants