MediaArea / MediaInfoLib

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
633 stars 173 forks source link

CLI doesn't show audio bitrate mode in a .mkv container #468

Open rhazor opened 7 years ago

rhazor commented 7 years ago

In a .mkv container:

--Inform=Audio;%BitRate_Mode% audio-bitrate-mode_sample.mkv
<no output, empty line>

Extracted .aac from the same .mkv container:

--Inform=Audio;%BitRate_Mode% audio-bitrate-mode_sample.aac
VBR

Correct output

Issue: Sometimes it shows .aacbitrate mode in a .mkv container, but sometimes it doesn't (like this example). I'd like to know what is causing this and if it's somehow .mkv container's issue.

5MB 5 second long video sample (Zippyshare)

JeromeMartinez commented 7 years ago

Extracted .aac from the same .mkv container:

You can not extract "as is", because raw AAC frames can not be transported alone, you put it another container (e.g. ADTS) which may have a flag indicating it is VBR.

for Matroska, such flag does not exist; it would be possible to detect when it is VBR, but not when it is CBR (without parsing the whole file), I check if it is easy to add detection of VBR quickly (else would be NeedSponsor)

rhazor commented 7 years ago

I meant demuxed audio file from the .mkv container and it ended up being .aac and I've done it with other .mkv containers and it does show AAC-LC file bitrate mode.

E.g.

File A.mkv with AAC-LC VBR reports that bitrate is VBR both in GUI and CLI. File B.mkv with AAC-LC VRB doesn't report bitrate mode in both GUI and CLI. But if you demux it from .mkv container then it does report that bitrate mode is VBR.

It's like 50/50 change it will show or not. And both files/cases look almost identical, I'm not sure what's preventing this.

JeromeMartinez commented 7 years ago

File A.mkv with AAC-LC VBR reports that bitrate is VBR

Please provide a sample file, so we can discuss based on same thing.

But if you demux it from .mkv container then it does report that bitrate mode is VBR.

Please provide a sample file, so we can discuss based on same thing. (you did not specify which container you used for transporting the AAC content after demuxing, the extension is not enough, as such extension is used for different AAC containers e.g. ADTS or LATM)

both in GUI and CLI.

Please let's focus on the issue, i.e. bit rate mode. This is not related to interfaces, this is related to metadata detection.