Happy new year!
I'm wanting to find a way to convert a widescreen (2.35:1) AVI to DVD format while preserving the aspect ratio.
Normally I use WinFF to transcode the AVI into a DVD-compliant MPEG2 file, then DVD Flick to author the DVD. The problem is that while DVD Flick copies an MPEG2 file directly without reencoding, it forces you to select either a 4:3 or 16:9 aspect ratio and then apparently just tags the movie file accordingly, resulting in the picture stretching to fill the screen. I'd like to know either:
1) If FFMpeg can somehow create a correct 16:9 file from a 2.35 file such that DVD Flick's 16:9 setting will work, or
2) About alternative free software that can also easily create a DVD directly from a compliant MPEG2 file without recompressing or forcing a wrong aspect ratio.
Can anyone help?
+ Reply to Thread
Results 1 to 30 of 32
DVD only comes in two aspect ratios - 4:3 or 16:9. If using one of these flags causes your image to be stretched or squished them you have either
a) used the wrong flag, or
b) encoded the file incorrectly.
A 2,35 : 1 movie requires having black bars added top and bottom, then being resized correctly to fit either a 4:3 or 16:9 frame, then being encoded and flagged for playback. My guess is that you have incorrectly resized the file without adding bars, which means it will never be displayed correctly as a DVD. Go back to the encoding stage and get it right there, before authoring.
I suggest you look at AVStoDVD to do your encoding. It can output elementary streams, uses HCEnc for quality output, and will resize and add appropriate borders.Read my blog here.
A 2.35:1 source should be resized to ~720x360 and then black borders added top and bottom to bring the frame up to 720x480. Encode and author that to DVD as 16:9.
Thanks for the input, guys. I was a bit confused by all the aspect ratios actually involved--pixel, display, signal--and knowing that I don't need to bother with any of that helps a lot.
I looked at FFMpeg's command line options, and lo, there they are:
-padtop size set top pad band size (in pixels)
-padbottom size set bottom pad band size (in pixels)
-padleft size set left pad band size (in pixels)
-padright size set right pad band size (in pixels)
You can even change the pad bar color (6-digit hex, or 16777216 possibilities). Thankfully, black is the default, though tailoring the color to the video being screened has possibilities.
guns1inger: I tried out AVStoDVD, but the end video came out more than twice as big as the WinFF version (probably because I have my own custom FFMpeg presets, while I'm totally ignorant on tweaking QuEnc/HCEnc). Also, all the programs being invoked batch-style means it took a while to stop the damn thing. I'll stick with the familiar for now, but thanks for the recommendation.
I'll see what happens and post an update in case anyone else has had this problem.
file size = bitrate * running time
If tow videos have the same running time but one is twice as big as the other, the bigger one has twice the bitrate. Note that "bitrate" above is the sum of all the streams in the video, ie video + audio.
It is the job of the player to horizontally stretch it out for 16:9 or compress it to 640x480 for 4:3 depending on the status of the wide flag.
* Standard definition DV, DVD, ATSC, DVB, AVC, etc. are all ITU Rec-601 based and use 704x480.
** 720x480 results from addition of 8 extra pixels left and right. Since these are "extra width", the pixel aspect ratio is the same for 704x480 or 720x480.
** "PAL" version is 704x576.
Gotcha, and the video should always be set to a resolution of 720x480?
720 x 480 pixels MPEG2 (common for movies and DV camcorder material)
704 x 480 pixels MPEG2 (matches broadcast TV)
352 x 480 pixels MPEG2 (half 704 horizontal resolution)
352 x 240 pixels MPEG2 (quarter size, single field)
352 x 240 pixels MPEG1 (same as the VCD)
Another quick question. What's the difference between the AR flag set during encoding, and the one set during authoring? Which of these does the DVD player look at?
A few months ago, having forgotten that I had already tried AVStoDVD with no luck, I tried it again and it worked fine, automatically adding borders as appropriate. Don't know what changed in the software since I first used it, but I've long since canned DVD Flick and been using AVStoDVD exclusively.
You asked which flag the DVD player follows. In almost all cases the player follows the AR setting in the IFOs. edDV was saying that ordinarily the IFOs will be set to follow the AR flag of the video itself, but that can be overridden, if necessary.
Usually, in the case of a 16:9 movie, both the IFOs and the video will be 16:9. However, it's not unheard of for the video to have been encoded as 4:3 but for it to still play with the proper aspect ratio as long as the IFOs say it's 16:9.
Normally one can preview the DVD in authoring software before the burn. If the video asset is 16:9 but is playing horizontally squeezed, you can go into the asset properties and change the aspect ratio flag from 4:3 to 16:9.
Last edited by edDV; 28th Mar 2011 at 01:17.
Understood, thanks a lot guys.
I'm still confused by this stretching stuff ;(
Are there some easy formulas to determine the ffmpeg parameters that have to be used to bring any video file to standard DVD format (including the aspect ratio (4/3, 16/9) and the height of the black bars that have to be added)?
I would need it only for PAL DVD compliant files (no NTSC here) and the source material is always larger than 704x576 so this would (hopefully) the reference resolution to convert to.
I can compute the current aspect ratio of the source file by parsing a log from a "ffmpeg -i somevideofile 2>result.log" and get all additional needed parameters via a few regexpressions if they should be needed for the formula (fps, DAR, PAR or anything else).
Thanks in advance,
To convert a 1280x720 (16:9) movie to PAL DVD, scale to 704x576, set 16:9 aspect ratio flag, no padding needed (input and output are 16:9).
To convert a 1280x544 (2.35:1) movie to PAL DVD, scale to 704x436, set 16:9 aspect ratio flag, pad 70 px at the top and 70 px at the bottom to get 576 height.
This calculation was used:
output movie height (without the padding) = full frame output height * ( source movie height / (source movie width / output aspect ratio) ) = 576*(544/(1280/(16/9))) = 576*(544/720) = 435.2 ≈ 436 (rounded for mod2)
padding = (full frame output height - output movie height) / 2 = (576-436)/2 = 70 (padding needs to be mod2 (even number) also).
Thank you, Case!
This should help me to get my "convert any video file to pal dvd compliant with correct aspect ratio and output resolution" - script working
Good calculation method (it's all about 'new height', really). No need for PAR's (when they are used, they get reduced at best), only DAR's matter. I do almost the same by getting that coefficient from the ratio of numbers 2.35/1 (DAR of the inner frame) and 16/9 (DAR of the outer frame), then apply it to the hight of the outer frame:
576/(2.35/16:9)=435.7~436 (the same correct result)
As for 70+70 padding, probably 68+72 would be better for encoding.
Or for letterboxing 16:9 within 4:3:
I am new to this forum. This thread addresses precisely the problem I wish to solve.
I have Super 8 movies shot through an anamorphic lens to give a compressed 2.35:1 aspect ratio on film that has the standard 4:3 ratio. They have been scanned commercially and I now have them as .avi files.
I need to add top and bottom bars so that when the films are viewed on a 16:9 TV the aspect ratio is correct (i.e., stretched to 2.35:1).
(I am located in Europe, using PAL, but I don't think that changes anything on this issue.)
I have seen the recommendation of AVStoDVD and have downloaded it (or something with the same name), but I can't see anywhere that I can manually set the height and add padding.
Please tell me how to do this or recommend other software that I can do it with.
I would prefer free software, but would be able to pay a modest sum, bearing in mind that we are talking home movies, not a professional production.
Thanks for any assistance!
in the avs view/edit settings - video force 16/9 and then go to - avisynth and do a vertical resize of about 42. you'end up with somthing like this. if it's not perfectly size play with the resize, smaller number bigger padding.
"a lot of people are better dead" - prisoner KSC2-303
Thank you. That's so helpful! I have done some playing with numbers and found some good results. However, I did "step 2" without doing "step 1" first, so the end result will probably be too stretched. I just cant see where I "force 16/9", or indeed choose any other ratio (presumably 4:3). Please excuse my ignorance - I am totally new to this. If you (or someone else) could show me how to set the 16:9 / 4:3 flag, I would be so grateful.
In AVStoDVD you go to AviSynth fillters and there two options. 1 of them will just strech the video enother will resize it without streching or squishing it. And like i sed befor - you can use ffdshow to resize it. One of the abow.TMPGenc authoring - enother good soft you could use. But it's not free. It does evrything including DVD menu.