Results 1 to 10 of 16

Thread: [SOLVED] avi widescreen to mpg (w/ffmpeg) = squished screen

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Location
    U.S. citizen in Taiwan
    Beans
    114
    Distro
    Ubuntu

    [SOLVED] avi widescreen to mpg (w/ffmpeg) = squished screen

    I have an avi that is widescreen which I need in mpg to make an iso and burn to dvd.
    Problem is, the result is a squished screen for the mpg. Any advice would be appreciated.

    here is the code I used for conversion.

    ffmpeg -i out.avi -y -target ntsc-dvd -sameq -aspect 16:9 out.mpg

    Here is my video info:

    $ ffmpeg -i out.avi
    ...
    Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997/125)
    Input #0, avi, from 'out.avi':
    Duration: 01:53:04.8, start: 0.000000, bitrate: 856 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x272, 23.98 fps(r)
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, 96 kb/s
    Must supply at least one output file

  2. #2
    Join Date
    Sep 2006
    Location
    U.S. citizen in Taiwan
    Beans
    114
    Distro
    Ubuntu

    Re: avi widescreen to mpg (w/ffmpeg) = squished screen

    Okay, I scavenged the net and found nothing to help me.

    I didn't want to have to play around with the settings to
    "experiment," as it takes more than an hour and a half to do the conversion, and that's a painfully slow process.
    However, I took a chance and simply added padding to the ffmpeg command (see below), and I got really very close to a normal picture. Good enough to watch, however, I'm going to try just one more time by setting top and bottom padding to 64 next time. (I haven't actually converted it to an iso and burned it yet)

    Here's what I did
    Code:
    ffmpeg -i out.avi -padtop 60 -padbottom 60 -y -target ntsc-dvd -sameq -aspect 16:9 out2.mpg
    Last edited by ClarkePeters; December 14th, 2008 at 12:59 PM.

  3. #3
    Join Date
    Sep 2006
    Location
    U.S. citizen in Taiwan
    Beans
    114
    Distro
    Ubuntu

    Re: avi widescreen to mpg (w/ffmpeg) = squished screen

    Okay, that was a no go, my dvd player wouldn't read the dvd after I burned it.

    Any advice?

  4. #4
    Join Date
    Nov 2006
    Beans
    1,134

    Re: avi widescreen to mpg (w/ffmpeg) = squished screen

    If your DVD player has MPEG4 + MP3 playback capability (most recent players do), you need not convert anything at all. Just burn the AVI to DVD or CD.

    However, if you want to create a "true" DVD, there are a lot more things to consider besides aspect ratio. Your video must be scaled to 720x480, telecined to 29.97fps and encoded to MPEG-2 (.vob), not MPEG-1 (.mpg). You also have to set up the proper file/folder structure expected by DVD players. This is complex stuff, so I recommend using a DVD authoring tool.

  5. #5
    Join Date
    Sep 2006
    Location
    U.S. citizen in Taiwan
    Beans
    114
    Distro
    Ubuntu

    Re: avi widescreen to mpg (w/ffmpeg) = squished screen

    My DVD doesn't support MPEG-4 or MP3 playback

    I've tried using DVD authoring tools before--the last one being DeVeDe, but it always hangs and others have failed me too (maybe a radeon videocard problem, not sure).

    I've suceeded in the past in making a very basic DVD by simply converting my avi like so:

    Code:
    step1: 
    mencoder -o out.avi -noidx -oac copy -ovc copy /home/rex/in.avi
    
    step2: 
    ffmpeg -i out.avi -y -target ntsc-dvd -sameq -aspect 16:9 out.mpg
    
    step3: 
    dvdauthor --title -o dvd -f out.mpg
    
    step4: 
    dvdauthor -o dvd -T
    
    step5: 
    mkisofs -dvd-video -o /home/rex/dvd/MickeyCC.iso /home/rex/dvd
    
    step6:
    burn iso to dvd (right click the iso file and choose "write to disk")
    It's really easy and never fails. I've just been lucky in the past because my avi's have always scaled well. This it the first time I've tried to burn one of those widescreen avi versions. So at the end of the conversion, the movie works great except every one has a long face and all things appear stretched or squished. If someone could direct me on how to get the right size scaled and the right padding that a standard DVD will accept, then I'd be good to go.

    thanks.

  6. #6
    Join Date
    Sep 2006
    Beans
    3,561

    Re: avi widescreen to mpg (w/ffmpeg) = squished screen

    Try this:
    Code:
    ffmpeg -y -i input.avi -target ntsc-dvd -padtop 104 -padbottom 104 -s 720x272 out.mpg
    I'm not sure if it will work. If you want to keep testing without needing to encode the whole video then use the vframes option. For example "-vframes 300" will encode just the first 300 frames. I also don't think you need sameq with the target option.

  7. #7
    Join Date
    Mar 2007
    Location
    Outer Milky Way
    Beans
    Hidden!
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: avi widescreen to mpg (w/ffmpeg) = squished screen

    Quote Originally Posted by eye208 View Post
    If your DVD player has MPEG4 + MP3 playback capability (most recent players do), you need not convert anything at all. Just burn the AVI to DVD or CD.

    However, if you want to create a "true" DVD, there are a lot more things to consider besides aspect ratio. Your video must be scaled to 720x480, telecined to 29.97fps and encoded to MPEG-2 (.vob), not MPEG-1 (.mpg). You also have to set up the proper file/folder structure expected by DVD players. This is complex stuff, so I recommend using a DVD authoring tool.
    That's what the parameter -target ntsc-dvd (or -target pal-dvd or -target film-dvd) does. It sets all those miscellaneous parameters for you.

    -target ntsc-dvd outputs to 720x480, with a a framerate of 24 fps

    -target film-dvd outputs to 720x480, but with a framerate of 30 fps

    -target pal-dvd outputs to 720x576, with a framerate of 25 fps

    All three use MPEG-2 for video and ac3 for audio.

    Also, I noted these useful settings that can be used to trim a video:

    -ss 00:00:01 will start recording at the time selected (hh:mm:ss) for the input file; and

    -t 00:15:04 determines how long of a clip to record, in hh:mm:ss
    Last edited by perspectoff; April 24th, 2009 at 07:30 AM.

    UbuntuGuide/KubuntuGuide

    Right now the killer is being surrounded by a web of deduction, forensic science,
    and the latest in technology such as two-way radios and e-mail.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •