VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 32
Thread
  1. Member
    Join Date
    Jun 2007
    Location
    United States
    Search Comp PM
    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?

    Best,

    Calidore
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    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.
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Member
    Join Date
    Jun 2007
    Location
    United States
    Search Comp PM
    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.

    Thanks again!

    Best,

    Calidore
    Quote Quote  
  5. 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.
    Quote Quote  
  6. Originally Posted by jagabo View Post
    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.
    Sorry to bring such an old thread back from the dead, but as 720x480 is equal to 3:2, not 16:9, wouldn't giving it a 16:9 AR flag stretch it out?
    Quote Quote  
  7. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by FrozenInferno View Post
    Originally Posted by jagabo View Post
    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.
    Sorry to bring such an old thread back from the dead, but as 720x480 is equal to 3:2, not 16:9, wouldn't giving it a 16:9 AR flag stretch it out?
    DVD and all other ITU Rec-601 based video* uses 704x480** for both 4:3 and 16:9 aspect ratios.

    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.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  8. Originally Posted by FrozenInferno View Post
    Originally Posted by jagabo View Post
    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.
    Sorry to bring such an old thread back from the dead, but as 720x480 is equal to 3:2, not 16:9, wouldn't giving it a 16:9 AR flag stretch it out?
    Yes. That's the way it works. The 720x480 frame gets stretched by the player to the equivalent of ~853x480 (16:9). So the inner 720x360 that contains the picture is stretched to 853x360 which is ~2.35:1.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    Originally Posted by FrozenInferno View Post
    Originally Posted by jagabo View Post
    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.
    Sorry to bring such an old thread back from the dead, but as 720x480 is equal to 3:2, not 16:9, wouldn't giving it a 16:9 AR flag stretch it out?
    Yes. That's the way it works. The 720x480 frame gets stretched by the player to the equivalent of ~853x480 (16:9). So the inner 720x360 that contains the picture is stretched to 853x360 which is ~2.35:1.
    So basically, if you're setting the aspect ratio to 16:9 (hypothetically), it's simply a matter of assuming the final resolution is 854x480, then applying the native aspect ratio of your source video to the horizontal resolution (854) to gauge what you should resize the vertical to before adding black bars to account for the AR stretch?
    Quote Quote  
  10. Originally Posted by FrozenInferno View Post
    So basically, if you're setting the aspect ratio to 16:9 (hypothetically), it's simply a matter of assuming the final resolution is 854x480, then applying the native aspect ratio of your source video to the horizontal resolution (854) to gauge what you should resize the vertical to before adding black bars to account for the AR stretch?
    Yes.
    Quote Quote  
  11. Gotcha, and the video should always be set to a resolution of 720x480?
    Quote Quote  
  12. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by FrozenInferno View Post
    Gotcha, and the video should always be set to a resolution of 720x480?
    DVD (NTSC) supports the following resolutions

    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)
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  13. 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?
    Quote Quote  
  14. Member
    Join Date
    Jun 2007
    Location
    United States
    Search Comp PM
    Wow, memories.

    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.
    Quote Quote  
  15. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by FrozenInferno View Post
    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?
    Most authoring software follows the asset flags but these can be overridden in asset properties if they don't preview correctly.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  16. Originally Posted by edDV View Post
    Originally Posted by FrozenInferno View Post
    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?
    Most authoring software follows the asset flags but these can be overridden in asset properties if they don't preview correctly.
    Not exactly sure what you mean here; kind of a newbie. What are asset flags, and how does this relate to the encoding vs authoring processes?
    Quote Quote  
  17. 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.
    Quote Quote  
  18. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by FrozenInferno View Post
    Originally Posted by edDV View Post
    Originally Posted by FrozenInferno View Post
    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?
    Most authoring software follows the asset flags but these can be overridden in asset properties if they don't preview correctly.
    Not exactly sure what you mean here; kind of a newbie. What are asset flags, and how does this relate to the encoding vs authoring processes?
    This gets down to the specific software used to encode the MPeg2 asset and the software used to author the DVD.

    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.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  19. Understood, thanks a lot guys.
    Quote Quote  
  20. 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,
    highend
    Quote Quote  
  21. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by highend View Post
    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)?
    First some samples:
    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).

    Corrections welcome...
    Quote Quote  
  22. 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

    Regards,
    Highend
    Quote Quote  
  23. Member Alex_ander's Avatar
    Join Date
    Oct 2006
    Location
    Russian Federation
    Search Comp PM
    @Case
    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:

    576/(16:9/4:3)=432
    Quote Quote  
  24. Originally Posted by Alex_ander View Post
    As for 70+70 padding, probably 68+72 would be better for encoding.
    Yes, use mod 8 whenever possible. Otherwise you get DCT ringing artifacts at the border and less efficient compression.
    Quote Quote  
  25. Member
    Join Date
    Dec 2012
    Location
    Spain
    Search Comp PM
    Hello
    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!
    Trevor
    Quote Quote  
  26. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    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.

    Click image for larger version

Name:	vlcsnap-00001.jpg
Views:	255
Size:	37.8 KB
ID:	15088
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  27. Member
    Join Date
    Dec 2012
    Location
    Spain
    Search Comp PM
    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.
    Many thanks!
    Trevor
    Quote Quote  
  28. Member
    Join Date
    Dec 2012
    Location
    Baltimore,MD
    Search Comp PM
    Why don't you use AVStoDVD. And chenge ratio in ffdshow as mach as need to. You can do prety mach enything you wont with it. And it does realy good job encoding video.
    Quote Quote  
  29. Member
    Join Date
    Dec 2012
    Location
    Baltimore,MD
    Search Comp PM
    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.
    Quote Quote  



Similar Threads