View Full Version : x264: is it possible to set/change SAR option after encoding in mkv/mp4?
Plamen234
15th August 2007, 10:09
Is it possible to set/change x264 SAR option after encoding in mkv/mp4?
Dark Shikari
15th August 2007, 14:14
Both MKVMerge and YAMB allow changing the aspect ratio after-the-fact.
Plamen234
15th August 2007, 16:07
thank you :)
I really needed that.
p.s.: not to mention how many encodings I did on the same sample with different SARs :stupid:
Plamen234
15th August 2007, 18:51
so, obviously I can change the aspect ratio whenever I need, right?
and is the effect the same as setting the --sar xx:yy in cli?
bond
15th August 2007, 19:21
so, obviously I can change the aspect ratio whenever I need, right?
and is the effect the same as setting the --sar xx:yy in cli?in mp4box, yes. in mkvmerge i am not sure (i think mkvmerge only changes the sar on the container level, not on the video stream level)
Haali
16th August 2007, 18:33
mkvmerge sets the container AR and removes sar from h.264 bitstream, some decoders ignore containter AR otherwise
Plamen234
16th August 2007, 18:56
so it is better to set the correct SAR with the encoding process, right? (once and forever)
Bluedan
22nd October 2008, 11:48
mkvmerge sets the container AR and removes sar from h.264 bitstream, some decoders ignore containter AR otherwise
Is this still a valid statement? If yes, why doesn't mkvmerge copy the video stream SAR to the container setting?
Maybe it does, but when loading the mp4/video into mmg it does not show anything in the PAR or Display w/h field.
Playing around with the current mmg version 2.3.0 everything plays fine afterwards when I don't change anything in PAR field. I don't even have to tell it to keep bitstream AR info via extra options.
Wait. While writing this I set an incorrect AR value for the cantainer and tell it to keep the bitstream ratio info.
The result is, that the wrong AR is chosen.
So, mkvmerge either copies the bitstream AR to container AR setting when nothing is set manually, or it takes the bitstream ar into account nowadays.
Can anybody clarify?
DirectShow parts here are Haali splitter, CoreAVC-Decoder and TCMPlayer.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.