VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member PBear's Avatar
    Join Date
    Sep 2002
    Location
    San Francisco Bay Area
    Search Comp PM
    I just realized that there's an anomaly in FFmpeg that produces different pixel output between using its standard MPEG4 codec (4:3 / 5:4 DAR) and XviD codec (1:1 / 3:2 DAR). I have always used XviD (I think it produces noticeably better quality and can live with the much slower encoding times), but that has always produced weird output when I'm encoding from a 720x480 source to a 720x480 target. After burning the output to disc and watching it on my TV (a standard 4:3 monitor), 720x480 output by FFmpeg using XviD and 1:1 pixels will not resize itself to the screen. Instead, it's shown slightly letterboxed and the 720x480 image is actually shrunk to fit in the 4:3 frame -- creating fat faces, and usually leaving all sorts of video noise at the bottom of the frame visible now that it's no longer resized outside the overscan area at the bottom of my TV screen. To overcome this, I've been resizing 720x480 input to 640x480 output when encoding XviD with FFmpeg -- not always a perfect translation of the original image (sometimes there's a bit of squeezing).

    I've come to realize that it is possible to have AVI files produced at 720x480 that, using (I guess it's called) rectangular pixels, will fill a 4:3 TV screen completely and accurately, with the frame being resized properly by the DVD player and/or the TV itself -- and that FFmpeg does this kind of output automatically when using its MPEG4 codec (GSpot reports a DAR of 5:4 on MPEG4 files produced by FFmpeg and 3:2 on XviD files produced by FFmpeg).

    My question, then, is how do you get FFmpeg to output files in 5:4 when using the XviD codec? There seems to be an FFmpeg command called "-pix_fmt" but I can't find out anything about it (the manual says use the parameter "list" to see all available formats for pix_fmt, but I can't get it to work and have no idea what parameters the command takes) -- nor do I even know if this is the command I need.

    Thanks.
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by PBear
    I've come to realize that it is possible to have AVI files produced at 720x480 that, using (I guess it's called) rectangular pixels, will fill a 4:3 TV screen completely and accurately, with the frame being resized properly by the DVD player and/or the TV itself -- and that FFmpeg does this kind of output automatically when using its MPEG4 codec (GSpot reports a DAR of 5:4 on MPEG4 files produced by FFmpeg and 3:2 on XviD files produced by FFmpeg).
    nice that you have players that respect display flags.
    don't take it for granted.
    it's not entirely standard for avis and you'll find if you take it elsewhere it very well might not work.
    hence resizing to a square pixel grid.

    DAR 5:4??
    that's not right either.

    Originally Posted by PBear
    My question, then, is how do you get FFmpeg to output files in 5:4 when using the XviD codec? see all available formats for pix_fmt, but I can't get it to work and have no idea what parameters the command takes) -- nor do I even know if this is the command I need.
    it's not.
    what you're looking for is
    Code:
    -aspect 4:3
    also give this ffmpeg gui a try to simplify your life:
    Avanti


    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  3. Member PBear's Avatar
    Join Date
    Sep 2002
    Location
    San Francisco Bay Area
    Search Comp PM
    Sorry, tripp, but that's not it. I know DVD players usually don't respect aspect ratio settings (on AVIs), and mine's no different. Setting aspect ratio to 4:3 has no effect, but using rectangular pixels instead of square pixels gives the DVD player no choice.

    GSpot reports following on my FFmpeg-encoded 720x480 AVIs ...

    MPEG4 Codec:
    SAR: 1.500 (3:2)
    PAR: 0.833 (5:6)
    DAR: 1.250 (5:4)

    XviD Codec:
    SAR: 1.500 (3:2)
    PAR: 1.000 (1:1)
    DAR: 1.500 (3:2)

    The former file (DAR=5:4) displays correctly when played on my DVD player, the latter does not.

    There must be a way to tell XviD to encode using rectangular pixels, same as MPEG4 codec does; I just need to know how.

    Quote Quote  
  4. I know this doesn't answer your question directly,

    But in for XviD in Vdub you can adjust the PAR and DAR quite easily.

    You can also use MPEG4Modifier to change PAR, DAR without re-encoding


    Cheers



    Quote Quote  
  5. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    ok....
    so what you're doing is less standard than less standard.
    interesting.

    still
    Code:
    -aspect 5:4

    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  6. Member PBear's Avatar
    Join Date
    Sep 2002
    Location
    San Francisco Bay Area
    Search Comp PM
    Thanks, poisondeathray, those PAR settings in VDub were exactly what I had in my head when I started this, but I much prefer using FFmpeg (it's so much faster than VDub and I feel like I can control output quality a little more easily) -- so, basically, I'm looking for the equivalent setting in FFmpeg.

    MPEG4 Modifier is a great utility too, for a quick fix, but I'm afraid the stuff I'm doing here requires re-encoding.

    Thanks again.
    Quote Quote  
  7. Member PBear's Avatar
    Join Date
    Sep 2002
    Location
    San Francisco Bay Area
    Search Comp PM
    poisondeathray: Jeez, sometimes I'm a little slow on the uptake ( ) ... changing Pixel AR (not Display AR) to "4:3 NTSC" in MPEG4 Modifier on the output file works like a charm (720x480 AVI is resized by DVD player to fit my TV screen fully). It's an extra step, but it works. If I can just find some way to set that in FFmpeg, then I can eliminate the extra step.

    45tripp: Tried setting "-aspect 5:4" in FFmpeg; it didn't work. Output still square pixel (1:1 / 3:2 DAR).
    Quote Quote  
  8. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by PBear
    45tripp: Tried setting "-aspect 5:4" in FFmpeg; it didn't work. Output still square pixel (1:1 / 3:2 DAR).
    does exactly what you describe.

    update your ffmpeg
    http://arrozcru.no-ip.org/tripp/
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  



Similar Threads

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