1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Transcoding 2.21:1 / 23.976 XVID to MPEG2 for DVD

Discussion in 'DVD±R for advanced users' started by armygreen, Jan 13, 2005.

  1. armygreen

    armygreen Member

    Joined:
    Dec 28, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    11
    I have an AVI with an XVID video stream that's 608x256 (2.21:1) at 23.976fps. I think I've read every guide on this site and on Doom9, but I can't seem to find out how to transcode that stream to NTSC DVD compliant MPEG2 and have it come out correctly. There are really two things that I don't understand. First is how to make my DVD play the video at 2.21:1 (I'm guessing there has to be some vertical scaling somewhere), and second, what do I do with the 23.976fps frame rate? Am I supposed to convert it to 29.97fps during the transcoding? (I tried that, but when I played it, it was jumpy.) I understand how 3:2 pulldown works, but where does it happen? During the transcoding, in the authoring, or in the player? I have TMPGEnc, TMPG DVD author, Main Concept MPEG Encoder, NeroVision Express 3, DVDLab, CCE SP (that I haven't figured out completely yet), Virtual Dub and Mod, and some other one-click programs. I want to be able to play the DVD on both 4:3 and 16:9 TV's and have the aspect ratio be correct and lose as little quality as possible.
     
  2. cougar_ii

    cougar_ii Regular member

    Joined:
    Aug 19, 2004
    Messages:
    1,961
    Likes Received:
    0
    Trophy Points:
    46
    Hi there,

    Run it throught VSO DivXtoDVD

    http://www.vso-software.fr/

    And force it to 4:3 or 16:9 and see what the end result looks like !
     
  3. armygreen

    armygreen Member

    Joined:
    Dec 28, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    11
    Tried that. The aspect ratio comes out wrong (only does 4:3 or 16:9), it's jumpy, and it looks like crap compared to main concept. I've used that program on other AVI's as well. The picture quality is no comparison to main concept, or even Nero Vision Express 3. It's nice to convert something that you don't really care about the quality of though.
     
  4. cougar_ii

    cougar_ii Regular member

    Joined:
    Aug 19, 2004
    Messages:
    1,961
    Likes Received:
    0
    Trophy Points:
    46
    Hi there,

    To be honest, I don't really care about the quality.
    As long as it's lookable I'm happy :)

    If I really really like a movie, I always buy them :)
     
  5. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    3,102
    Likes Received:
    0
    Trophy Points:
    66
    I can help you do it with CCE, but you'll need to use other (free) programs as well, primarily AviSynth and VirtualDubMod. Before you start you need to demux the audio, and if it's MP3 you also need to decompress it to WAV. For AC3 audio follow this guide:
    http://www.afterdawn.com/guides/archive/extract_ac3_from_avi.cfm

    If the audio is MP3 you should still read the guide, but use the Save WAV button to decompress it instead of just demuxing. You may also want to encode it to a DVD compliant compressed format like MPA or AC3, but you'll probably be fine keeping it as a WAV.

    To get the resolution correct and load it into CCE you'll need to use AviSynth. By using a resizing filter and then adding borders you can get the correct AR. For some reason CCE requires that the picture have a 4:3 AR before you encode, but it will crop it to encode only the correct 16:9 portion (don't ask me why). Here's what your AviSynth script would look like (note this is for NTSC and will be slightly different for PAL):
    Save this file as whatever.avs and open it with a media player to make sure it looks right. It should look like a widescreen movie letterboxed on a regular TV. I recommend Media Player Classic for previewing. When you're done with this (or if you run into any problems) post to this thread again and I can help you with your CCE settings.
     
  6. Ryu77

    Ryu77 Regular member

    Joined:
    Jan 15, 2005
    Messages:
    957
    Likes Received:
    0
    Trophy Points:
    26
    My personal favourite is TMPGEnc 3.0 XPress.

    This will definately fix your problem. It can add in the black borders needed to maintain the aspect ratio you desire.

    On a basic level all you need to do is open the .avi, then select DVD as your output and TMPG will take care of the rest. That is if you choose PAL it will add black borders to increase the pixels to 576. Or NTSC being 480. It will also stretch the width to 720. If you want to edit, filter or enhance the video in any way, these advanced options are also available.

    Another plus is that TMPGEnc 3.0 XPress can re-encode the audio to .ac3 if you so desire... :)

    All this is done in one step too. I have done this process, and I am very happy with the results.

    You can visit the Pegasys homepage for more info.
     
    Last edited: Jan 15, 2005
  7. Ryu77

    Ryu77 Regular member

    Joined:
    Jan 15, 2005
    Messages:
    957
    Likes Received:
    0
    Trophy Points:
    26
    Oh... and with the framerate... It shouldn't matter. You can even leave the video as progressive.
     
  8. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    3,102
    Likes Received:
    0
    Trophy Points:
    66
    Of course the framerate matters. It needs to stay at 23.976fps for encoding and then pulldown flags can be added afterwards to make it read at 29.97fps.
     
  9. armygreen

    armygreen Member

    Joined:
    Dec 28, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    11
    Cool! I was just found a guide on Doom9 this morning talking about using AviSynth to frameserve CCE. It was a little confusing, but you just cleared it all up for me. :) About adding pulldown flags... What program do you use to do that and how do you do it? Thanks vurbal!!!!
     
  10. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    3,102
    Likes Received:
    0
    Trophy Points:
    66
    The easiest way to add pulldown flags would be to use DVD-Lab to author the DVD. When you import a 23.976fps video file it will add them for you. There are also the programs Pulldown (command line but you can find a GUI) and DoPulldown that will do it.
     
  11. armygreen

    armygreen Member

    Joined:
    Dec 28, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    11
    Wow... AVISynth is the coolest thing ever. :) It looks perfect! Thanks again vurbal!!! One last thing... Now that I have letterbox under control, is there a way to make it anamorphic?
     
    Last edited: Jan 16, 2005
  12. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    3,102
    Likes Received:
    0
    Trophy Points:
    66
    Yes AviSynth is a very cool program - and a lot easier than it looks once you learn a couple of simple filters. To make it anamorphic just select 16:9 for the aspect ratio in CCE.
     
    Last edited: Jan 16, 2005
  13. armygreen

    armygreen Member

    Joined:
    Dec 28, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    11
    When making an anamorphic DVD, you also have to figure the vertical resolution based on a horizontal of 853 instead of 720. The horizontal still gets encoded at 720, but your vertical will be alot closer to 480 meaning that you'll use more of the frame giving you a much better picture on a 16:9 TV since the DVD player will only have to stretch horizontally instead of zooming. You probably figured that was common sense, but it took me a minute to realise it and I figured that I would add it here for future reference. Thanks again for your help Vurbal.
     
  14. armygreen

    armygreen Member

    Joined:
    Dec 28, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    11
    Ok, so I've been using this AVISynth script for months now and have had really great results. I have two more questions though...

    First, I'm using Main Concept encoder instead of CCE because I personally find it more user friendly and the quality of the output is good enough for me. Is YUY2 the best input to be using for Main Concept, or is this just a CCE thing?

    Second, I'd like to be able to convert a PAL avi to an NTSC DVD. I already know how to demux the audio and slow it down with goldwave, and of course I know how to add pulldown flags to 23.976fps video to get 29.97fps. What I don't know is what lines of code I need to add to my AVISynth script to get it to slow down the output from 25fps to 23.976 fps. Thanks in advance!
     
  15. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    3,102
    Likes Received:
    0
    Trophy Points:
    66
    My understanding is that MainConcept can read MPEG files directly, so it may not require YUY2 color (MPEG's YV12 colorspace is what AviSynth 2.5x uses natively).

    As far as the 25fps - 23.976fps conversion goes, adding this line to your filter chain will do it.

    AssumeFPS(23.976)

    You can also use a slightly different version to convert the framerate of the video and stretch the audio with it. You could then demux the audio and resample it to 48kHz (AssumeFPS changes the sample rate to keep the audio in sync). That version of the line would look like this:

    AssumeFPS(23.976,true)

    If you're already comfortable with stretching the audio I'd recommend sticking to that method. Chances are, if the source is 25fps progressive it's from a film transfer and has already been sped up. Slowing it down should get you the closest to the original in these cases.
     
  16. armygreen

    armygreen Member

    Joined:
    Dec 28, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    11
    Awesome. Thanks once again vurbal. I'm going to give it a shot right now.

    I tried using Main Concept with a YV12 output from AviSynth [ConvertToYV12()] and it worked just fine. Is there really a difference between using VY12 and YUY2 in the finished product?
     
  17. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    3,102
    Likes Received:
    0
    Trophy Points:
    66
    The only difference is in whether the encoder can read the input file. CCE just won't read YV12 so it requires YUY2 or RGB input files. Other encoders can read YV12 so it shouldn't make any difference.
     

Share This Page