Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Registered User
Join Date: Aug 2020
Posts: 18
|
MKVtoolNix Bitrate change
Hello everybody,
Yesterday evening I extracted a Movie using MakeMKV and also kept the bonuses on that disc. After the extraction I usually use a tool called MKV Optimizer which uses MKVToolNix to remove all subtitles and audio tracks which are not the ones set in the condition (meaning only German and English Audio- und Subtitle tracks will be kept). There I noticed that after the re-Mux the video bitrate was smaller. It is no way near of a big deal (it went from 4 994 kb/s to 4 993 Kb/s). I googled and found out that it was due to the Subtitles being compressed with zlib and if I understood correct they were somehow part of the video which decreased the bitrate. Is this right so far? But since the MKV Optimizer tool runs through every file it also changes the Bitrate of videos were no muxing needs to be done. There is one short clip which had only one Audio track and no subtitle tracks so in conclusion nothing had to be removed and nothing should have been changed. But the video bitrate changed from 4 993 Kb/s to 4 895 Kb/s. Again, this is no big deal but I still wonder why this happened. Since MKVToolNix does not re-encode I wonder why my bitrate decreased ? Can someone explain why and also if there has been a (even little) drop in quality? Edit: Both videos used AVC and there has been no change of video length. |
![]() |
![]() |
![]() |
#4 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,285
|
You can use mkvextract and compare the video stream filesize , or check the quality with metrics such as PSNR
PSNR is better to confirm , because padding and junk can get removed, headers stripped, changing the filesize slightly. |
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,285
|
you can use ffmpeg
https://ffmpeg.org/ffmpeg-filters.html#psnr eg Code:
ffmpeg -i muxed.mkv -i original.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]psnr" -f null - The timecodes have to be the same, otherwise ffmpeg might be comparing different frames. |
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,285
|
It measures the quality of a video vs. original . If result is "inf" (infinity), then it's identical. It decodes the actual video, so it's more accurate than something like filesize
Quote:
If you want to be 100% accurate, check with PSNR Yes. Perfect. |
|
![]() |
![]() |
![]() |
#11 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,285
|
Mediainfo's reported bitrate isn't the actual bitrate (think about it, you demuxed it and have the exact same filesize. That means exact same bitrate if the running time is the same)
Yes mkvmerge removes things like junk stuffing bytes, empty NALU's . Look at the changelog to see what it removes from different streamtypes for different versions of mkvmerge If you had started with a different container instead of mkv, the actual video stream can be a different filesize too, because it removes some sequence headers. But the actual decoded video data, and there fore the PSNR , will be the same |
![]() |
![]() |
![]() |
Tags |
avc, bitrate, mkvtoolnix |
Thread Tools | Search this Thread |
Display Modes | |
|
|