VideoHelp Forum




Results 1 to 7 of 7
  1. Member
    Join Date
    Feb 2005
    Location
    Canada
    Search Comp PM
    I have a DVD that I'm trying to convert to MP4 format using ffmpegX. I'm trying to understand why Autocrop is giving me bad aspect ratios. In ffmpegX it resizes it my DVD to 720x304 after autocropping it by 46, 48, 2, 2 (top, bottom, left, right). In Handbrake, it resizes the same DVD to 720x432 after autocropping (with the same values). If this really isn't a bug, can someone explain the math behind this to me?

    For that matter if the original is 720x480, using ffmpegX my original must have been 724x400 and Handbrake implies the original was 724x526 (if I add the cropping values to the resized values). I know that I'm looking at this the wrong way, so can someone please enlighten me?

    Thanks,
    b

  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Both 16:9 "widescreen enhanced" and 4:3 DVDs store the video data in 720x480 rectangular pixels, which is stretched to either 16:9 or 4:3 on playback. So there is a pixel aspect ratio of 1.2 or 0.9.

    If a DVD frame is letterboxed, like yours, with close to 12.5% black bars on top and bottom, then it can either be a 2.35:1 movie in a 16:9 frame or a 16:9 movie in a 4:3 frame. Both have the same percentage letterboxed. You can't tell them apart just by looking at the autocrop numbers.

    You convert from these rectangular pixels to MP4, which has square pixels. Because of this, you can't do the math by pixel count alone.

    What you do is play the DVD, look at the aspect ratio minus the black bars (almost always either 2.35:1 "CinemaScope", 1.85:1 "widescreen theatrical film", 16:9 "widescreen tv" or 4:3 "regular tv"). Then use that aspect ratio in the Autosize menu of ffmpegX. The crop and the scaler will take care of the rest. If you want to be very precise, take a VLC screenshot, open it in an image editor, make a picture selection and note down the size values in pixels. Devide them to get an accurate playback aspect ratio.

    In your example, ffmpegX assumed something close to a 2.35:1 picture, while Handbrake assumed something close to a 16:9 picture.

    I hope this makes some sense...

  3. Member
    Join Date
    Feb 2005
    Location
    Canada
    Search Comp PM
    It doesn't seem to make a difference what I set the aspect ratio to prior to cropping. If I set it to 720x(any value), the result after an autocrop is 720x304 which is incorrect. I guess that's really what's at issue here, the autocrop feature chooses a bad aspect ratio. Since this is not the case with Handbrake, I'm left to assume that this is a bug in ffmpegX, or a deficiency that is unavoidable for other reasons. I wonder if this is due to the fact that the source is a VIDEO_TS folder? Perhaps ffmpegX would play nice if it was an MPEG instead.

  4. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    The Video size parameter in the Video tab does not relate to the input, but to the output. If you set it to 720x(some_value), then it will crop from the original size, then re-size to 720x(some_value).
    Could that be the source of this confusion?

  5. Member
    Join Date
    Feb 2005
    Location
    Canada
    Search Comp PM
    What I'm trying to say is, in the video tab, if choose a width of 720, and then I choose an aspect ratio (ie: 16:9, 2.35:1, 1.85:1, 4:3), autocrop always readjusts the size in the video tab to 720x304 (for this particular DVD - I haven't tested others). Only then, if manually change the horizontal resolution to 432 (so now it's 720x432), is the output's aspect ratio correct. I'm just guessing that if Handbrake can do this, why shouldn't ffmpegX? How would I have been able to calculate this number (432) without Handbrake?

    BTW, thanks for taking the time to help.

  6. First of all, both 720x304 and 720x432 are forbidden sizes for a DVD. All DVDs must be 720x480 (or 720x576 for PAL), no matter what your content / aspect / cropping is. This means that to maintain aspect ratio, you'll need to use black bars in some cases. In your case, it appears that you must retain the black bars. If you want to get rid of them, you should first click autocrop, then set "DVD ffmpeg" and you will obtain a 720x480 video.

  7. Member
    Join Date
    Feb 2005
    Location
    Canada
    Search Comp PM
    For anyone else who has been following this, I have been communicating with Major via email (almost in real time - thanks Major) so let me just summarize the remainder of the correspondence.

    I had been trying to convert some of my DVDs into mp4 format (not the other way around), so legal sizes are not the issue here. It boils down to this, ffmpegX does not calculate the aspect ratio for you after an autocrop, as it would be impossible for it to do it correctly in every case. After you autocrop, you still need to set the correct size (width) and aspect ratio.

    Happy encoding!




Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!