View Full Version : change DAR display aspect ratio
byme
26th September 2012, 01:10
I would like video in 4:3 could see with the players (like wmp, vlc, mpc ...) automatically to 16:9
I looked MPEG4Modifier, but opens only avi
for mp4 there is something that change the display aspect ratio?
with Yamb and My MP4Box GUI I did not understand if and how do
kypec
26th September 2012, 08:01
Why don't you just choose desired DAR in your player then? Here's a tip how I'd do it in MPC-HC - it works and you don't need to touch any of your video files at all!
http://i45.tinypic.com/of0d46.jpg
byme
26th September 2012, 15:54
this also I am able to do so
but I would like change the DAR in the videos that I produce, so that everyone can see video in 4:3 in 16:9, without changing the settings of the player
nm
26th September 2012, 18:43
Take a look at roozhou's patched ffmpeg: http://forum.doom9.org/showthread.php?t=152419
byme
26th September 2012, 20:53
the SAR is not the DAR... but maybe okay also the PAR and SAR... the important thing is that does not serve re-encode the videos
but I do not know use ffmpeg
nm
26th September 2012, 22:01
the SAR is not the DAR
No, but you'll only get the DAR that you want by changing sample aspect ratio (= pixel aspect ratio) stored in the H.264 stream or in the MP4 container. You may need to change both since some players will only read aspect ratio from the video stream.
roozhou's tool doesn't re-encode. It just changes the aspect ratio value when you tell it to do so.
SassBot
26th September 2012, 22:03
the important thing is that does not serve re-encode the videos
Which that tool does not due if you tell it to copy the video and audio.
then I do not know use ffmpeg
That's why he has easy to follow samples.
byme
26th September 2012, 22:40
I opened the video file with ffmpeg git 29946
I wrote this
http://www.imageboss.net/img4/j28qibhuzcgoyyot7v5yxle9jgbabwh/thumbs/43298.png (http://www.imageboss.net/view/img4/j28qibhuzcgoyyot7v5yxle9jgbabwh-43298.png)
I did enter but ffmpeg has closed without producing any video
that error I did?
(there is a way for copy / paste in prompt of ffmpeg?.. not to have to type it every time)
SassBot
26th September 2012, 22:46
You don't put a "-" in front of the file name of the output file. It thinks that's a switch and that you didn't specify an output so it used the input file name as the output file name. It probably closed because of an unrecognized command switch.
nm
26th September 2012, 22:57
(there is a way for copy / paste in prompt of ffmpeg?.. not to have to type it every time)
Right-click on the cmd.exe window to open a menu, select Edit and Paste. (IIRC. I'm more familiar with Unix shells and terminals).
byme
26th September 2012, 23:21
You don't put a "-" in front of the file name of the output file. It thinks that's a switch and that you didn't specify an output so it used the input file name as the output file name. It probably closed because of an unrecognized command switch.
that's right?
http://www.imageboss.net/img4/ruhoghkdeu2b8pw5t8j61bgyc30m/thumbs/13589.png (http://www.imageboss.net/view/img4/ruhoghkdeu2b8pw5t8j61bgyc30m-13589.png)
ffmpeg -i Veline.mp4 -vcodec copy -acodec copy -vbsf h264_changesps=sar=16:9 Veline2.mp4
after enter continues to close, without producing anything
maybe it is wrong write 16:9? (and what can I write instead of 16:9 to obtain a 16:9?)
I tried to put 1024:576 (the video is 768x576) instead of 16:9 but nothing changes
(thanks nm)
nm
27th September 2012, 00:10
that's right?
http://www.imageboss.net/img4/ruhoghkdeu2b8pw5t8j61bgyc30m/thumbs/13589.png (http://www.imageboss.net/view/img4/ruhoghkdeu2b8pw5t8j61bgyc30m-13589.png)
Don't open the input file with ffmpeg.exe! Run plain cmd.exe to get a command prompt and then write or paste the ffmpeg command there with a full path to ffmpeg.exe and to those files. For example:
"C:\Program Files\ffmpeg\ffmpeg.exe" -i "C:\video\input.mp4" -vcodec copy -acodec copy -vbsf h264_changesps=sar=16:11 "C:\video\output.mp4"
(just change those paths to reflect your setup)
It's also possible to make a simple batch script (.bat) for this, so that you can drop files on a desktop icon and it converts them automatically. But try it on the command line first.
maybe it is wrong write 16:9? (and what can I write instead of 16:9 to obtain a 16:9?)
Use sar=16:11 or sar=64:45 for 16:9 PAL. Google pixel aspect ratio and those numbers for a deeper understanding.
byme
27th September 2012, 00:52
thank you! works!
I have some doubts about the details of Mediainfo
before changes the video is 704x576 http://www.imageboss.net/img4/z8b7xzarhjs8046p7f1p6w0n10d6e0/thumbs/11773.png (http://www.imageboss.net/view/img4/z8b7xzarhjs8046p7f1p6w0n10d6e0-11773.png)
after ffmpeg is 706x576 http://www.imageboss.net/img4/4nxyrf86i4z6r4jav1233n04c9wcis/thumbs/37177.png (http://www.imageboss.net/view/img4/4nxyrf86i4z6r4jav1233n04c9wcis-37177.png) :scared:
to be corrected should be 1024x576
setting sar=16:11 or sar=64:45, is to 1024x576, or not... or need other parameters?
nm
27th September 2012, 06:59
thank you! works!
I have some doubts about the details of Mediainfo
Hmm. Does the video play back with correct aspect ratio now or not? MediaInfo might show the aspect ratio stored at container level and you may need to use MP4Box/Yamb to change that. (Or maybe ffmpeg's -aspect 16:9 parameter would do the trick, but I don't know if it does anything for MP4.
setting sar=16:11 or sar=64:45, is to 1024x576
Yes. 704*16/11 = 1024.
Keiyakusha
27th September 2012, 07:36
Hmm. Does the video play back with correct aspect ratio now or not? MediaInfo might show the aspect ratio stored at container level and you may need to use MP4Box/Yamb to change that. (Or maybe ffmpeg's -aspect 16:9 parameter would do the trick, but I don't know if it does anything for MP4.
More important part is that it displays actual resolution differently. I wonder how that possible unless some invalid cropping on bitstream level was specified or something like that... or this is yet another mediainfo bug. Also it doesn't shows that sar changed in any way
kypec
27th September 2012, 10:00
this also I am able to do so
but I would like change the DAR in the videos that I produce, so that everyone can see video in 4:3 in 16:9, without changing the settings of the player
Why don't you just produce those videos with desired DAR in the first place then? :confused:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.