[MEncoder-users] Trouble transcoding 1080i "video" to NTSC DVD -- SOLVED!

Walter Belhaven wbelhaven at yahoo.com
Mon Mar 13 20:05:08 CET 2006

--- Walter Belhaven <wbelhaven at yahoo.com> wrote:
> I'm having trouble transcoding 1080i HD "video" (interlaced) content
> from my Tivo HR10-250 to "standard" NTSC DVD.  The video source is a
> live hockey game.  [...snip...]


After a bit of stubborn persistence, I've finally gotten this to work.
The video quality is absolutely stunning, so a huge "thank you" to the
folks implementing, testing, and supporting mencoder, ffmpeg, etc.

To recount, I had fixed the "Why does my video look like film?"
problem by making sure that all filters and codecs were working in
interlaced mode: scale:w:h:1, ildct, ilme, being the quintessential
parameters.  The two remaining problems I had were: (1) Field order
mysteriously changing in original HD source; and (2) Freezes/stutters
in DVD playback on "set top" DVD players (but not on computer

Turns out the solution I attempted for #1 had the most unexpected yet
most welcome side effect of fixing #2.  Namely, I used TyTool's GOP
editor to break up the original HD video into a bunch of smaller MPG
files, and processed each one of them independently in mencoder.  For
each of these smaller files, I manually determined the field order by
examining the clip in DGIndex, and, if necessary, added the 'phase=t'
filter to change to "top-field first".  Upon processing all of the
files, then assembling them in dvdauthor, the entire thing played
brilliantly in my DVD player, with no freezes or stutters, and no
migraine-inducing jitters from field-order reversed interlaced video.


Here's the mencoder command line I settled upon for each file (and
repeat with vpass=2 for a 2-pass VBR encode).  Original files were
1080i at 1280x1088 with a 384kbps AC3 audio sound track:

mencoder \                 # Righteous open-source transcoder. :)
 -oac copy \               # Leave Audio "as is" (AC3 DD5.1 384kbps)
 -ovc lavc \               # Use lavc to transcode the video
 -of mpeg \                # Output "container" is MPG
 -mpegopts format=dvd \    # - specifically, DVD-compliant MPG (VOB)
 -vf \                     # Filters:
    [phase=t,] \           # [Only when field order needs reversing]
     crop=1264:1072, \     # Crop to multiples of 16 (see man!)
     scale=720:480:1, \    # INTERLACE-aware scaling to DVD res.
     harddup \             # See man: helps keep A/V sync
 -lavcopts \               # Codec options:
     vcodec=mpeg2video: \  # Output video is mpg2
     vrc_buf_size=1835: \  # DVD Standard sez so
     vrc_maxrate=9696: \   # Max = 10800 (DVD max) - 384 (audio)
     vbitrate=5731: \      # Makes the whole thing fit on one DVD-R
     keyint=18: \          # DVD Standard sez so (NTSC)
     aspect=16/9: \        # Cuz it is. :)
     ildct: \              # INTERLACE-aware DCT
     ilme: \               # INTERLACE-aware ME
     top=0: \              # Output Top field first
     mbd=2: \              # /  Some "high quality" options
     trell: \              # \  (off on first pass)
     vpass=1 \             # [Change this to vpass=2] on 2nd pass
  -ofps 30000/1001 \       # NTSC standard frame rate (interlaced)
  -o output.mpg \          # Output file
  input.mpg                # Input file

Anyway, hope this helps other folks struggling with the same thing. 

Nico et. al. -- is it possible that there's a memory leak somewhere in
the mpeg muxer?  Working well with short files, but not with longer
ones might be an indication of such.  Of course, it could also be that
the filters and/or codecs didn't react well when 'interlaced' was
enabled and the field order kept changing.  Just throwing out some
ideas FWIW.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the MEncoder-users mailing list