MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.33k stars 160 forks source link

Missing "Stream size","Bit rate" on/by Opus/vp9 in webm files #691

Open cnleo opened 1 year ago

cnleo commented 1 year ago

Missing "Stream size","Bit rate" on/by Opus/vp9 in webm files

Format                                   : WebM
Format version                           : Version 4
File size                                : 39.3 MiB
Duration                                 : 4 min 5 s
Overall bit rate                         : 1 343 kb/s
Writing application                      : Lavf59.27.100
Writing library                          : Lavf59.27.100

Video
ID                                       : 1
Format                                   : VP9
Codec ID                                 : V_VP9
Duration                                 : 4 min 5 s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : Opus
Codec ID                                 : A_OPUS
Duration                                 : 4 min 5 s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Bit depth                                : 32 bits
Compression mode                         : Lossy
Language                                 : English
Default                                  : Yes
Forced                                   : No

Maybe relatet bugs: https://github.com/MediaArea/MediaInfo/issues/271 https://github.com/MediaArea/MediaInfo/issues/348 https://github.com/MediaArea/MediaInfo/issues/540 https://github.com/MediaArea/MediaInfo/issues/558

gitoss commented 1 year ago

It's unfortunate that many muxers (incuding ffmpeg) don't add statistic tags to mkv/webm containers, but personally I never had any trouble using "mkvpropedit --add-track-statistics-tags" and running mediainfo again.

I'd be concerned if any vital output isn't even there even after mkvpropedit - but for me, it solved everything so far.

jensdraht1999 commented 11 months ago

@gitoss I wanted to ask you, does the converter/muxer (for example ffmpeg/handbrake/mkvmuxer) need to save the average bitrate as a statistic in the file or are there other ways to find out the average bitrate of the file by calculation somehow???

BlohoJo commented 4 months ago

Bump!

I'm struggling with this as well. It seems that nothing I can do will show me the bitrate of an Opus audio stream inside of an MKV file.

Using latest version 24.04.

JeromeMartinez commented 4 months ago

It seems that nothing I can do will show me the bitrate of an Opus audio stream inside of an MKV file.

Yes, you can, see https://github.com/MediaArea/MediaInfo/issues/691#issuecomment-1503960405.

BlohoJo commented 4 months ago

OK, I just figured something out.

The problem seems to be with yt-dlp. I'm using the command line option + argument --merge-output-format mkv. The resulting file will only show "Overall bit rate".

If I re-mux using MKVToolNix, then it shows the individual bit rates for the audio and video streams.

I created a feature request.

jensdraht1999 commented 4 months ago

es the converter/muxer (for example ffmpeg/handbrake/mkvmuxer) need to save the average bitrate as a statistic in the file or are there other ways to find out the average bitrate of the file by calculation somehow???

Just a question, does the muxer or converter has to save it as a statistic to the file? Is this how it has been done always?

JeromeMartinez commented 4 months ago

does the muxer or converter has to save it as a statistic to the file?

The muxer, reason MKVToolNix (which is not a converter) can do it.

Is this how it has been done always?

Yes. But not from the origin of Matroska, Matroska itself does not store such metadata, so the developer of MKVToolNix (who is also one of the 2 main Matroska spec authors) created such Matroska tags.