VideoHelp Forum




Results 1 to 8 of 8
  1. Member
    Join Date
    Apr 2007
    Location
    United States
    Search Comp PM
    i am encoding with ffmpeg, only because i couldn't have luck with mpeg2enc, and i've gone through the whole routine with pull the m2v file and and mux them together. The output file is perfectly fine and the quality is amazing, but on my tv the ratio seems a bit off.

    it looks like it has been stretched up just a little bit.

    can anyone suggest what i may be doing wrong?

    cheers

  2. Member
    Join Date
    Aug 2005
    Location
    Palo Alto, California USA
    Search Comp PM
    What are the frame dimensions for your source and output (x pixels by y pixels)?

  3. Member
    Join Date
    Apr 2007
    Location
    United States
    Search Comp PM
    my dimensions are as follows

    .avi file
    mpeg4, yuv420p, 576x240

    target format is:

    dvd, ntsc film, dvd 16:9

  4. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    You may be missing letterbox bars, as your source file is wider than 16:9.



    The easy way to add the black bars in ffmpegX is to check Decode with QT AND Letterbox in the Options tab. The amount of padding that is needed will be calculated for you.
    First check if your source file plays well in QuickTime Player, as Decode with QT may fail if it has problems playing the video (missing components, etc.).

    The hard way to add the black bars in ffmpegX is to NOT check Decode with QT, but use the Letterbox fields in the Filters tab, for which you have the calculate the padding (for your source file it would be [62,62,0,0]) and subtract the padding from the video size height (480-62-62=356).

    Encoding with 'decode with ffmpeg' instead of 'QuickTime' is 10% faster (on my machine), so there is a speed trade-off for ease of use.

  5. Member
    Join Date
    Apr 2007
    Location
    United States
    Search Comp PM
    that method works quite well and now i have the letterbox.
    but just for my sake may i ask how did you come up with 62?

  6. Member
    Join Date
    Aug 2005
    Location
    Palo Alto, California USA
    Search Comp PM
    I'm curious, too. I get 64, rather than 62, so I clearly need some education (but that's hardly surprising).

  7. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Here's a little calculus to get the letterbox value. I hope it makes some sense to the readers.

    You want to get a 16:9 DVD
    [calculate:] final.aspect.ratio = 16 / 9 = 1.77778

    To get your wider movie in a 16:9 frame, imagine putting bars on top and bottom, creating a larger frame with a new height:
    • unscaled.letterboxed.height = source.width / final.aspect.ratio
    [calculate:] unscaled.letterboxed.height = 576 / 1.77778 = 324

    Your movie covers a certain part/fraction of this 16:9 frame's total height:
    • movie.fraction = source.height / unscaled.letterboxed.height
    [calculate:] movie.fraction = 240 / 324 = 0.74 (=74%)

    Both letterbox bars combined are the opposite fraction:
    • two.bars.fraction = 1 - movie.fraction
    [calculate:] two.bars.fraction = 1 - 0.74 = 0.26 (=26%)

    Each bar is half of that:
    • one.bar.fraction = two.bars.fraction / 2
    [calculate:] one.bar.fraction = 0.26 / 2 = 0.13 (=13%)

    Multiply by target height to get a pixel value for the letterbox bars:
    • one.bar.pixel.height = one.bar.fraction * target.height
    [calculate:] one.bar.pixel.height = 0.13 * 480 = 62.4

    Manual padding in ffmpegX needs to be a whole and even number:
    [calculate:] one.bar.pixel.height = 62

    (Note that when calculating like this, the amount of scaling and the pixel aspect ratio are irrelevant, meaning it can be applied to just about every letterboxing job.)

  8. Member
    Join Date
    Aug 2005
    Location
    Palo Alto, California USA
    Search Comp PM
    Thanks a bunch, Case. That was very clear, and very helpful (as always).

    --Cheers,
    Tom




Similar Threads

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