[MEncoder-users] Happy with encoding results but wish better understanding

Sue Morton zytb8phzgv at snkmail.com
Tue Apr 20 15:40:40 CEST 2010


Hello,

I'm new to this list, Mencoder, and video conversions -- utter n00b in all areas, so please be patient with me :-)  Thank you :-)

It has been several weeks of reading man pages, web pages, this lists' archives, and many many long hours of experimentation, but I now have results from Mencoder I'm happy with.  I suppose I ought to let it go :-)   But it was sheer luck it’s working so well for me, so I'd like to better understand why this works, if any parameters are irrelevant or overridden by others and can be removed, if there are other parameters to try for ‘better’ quality, smaller file size, save time, etc.

What I'm doing.  I'm cutting out commercials (using Comskip input file) and converting TV shows to files directly compatible with two different hardware players.  I wish to preserve the perceived viewing quality of the originals while shrinking the output file sizes as much as possible.

The TV shows to convert are recorded by a Hauppauge WinTV-PVR-500 card using hardware encoding on analog cable input.  GSpot and MediaInfo programs report they are MPEG-PS container, MPEG-2 video, MPEG-1 Layer 2 audio.  Video NTSC 29.97 fps, interlaced top field first, variable bit rate (averaging 6000-8000 kbps), 720x480 pixels, pixel aspect ratio 8:9, sample aspect ratio 3:2, and display aspect ratio 4:3.  Audio is CBR 384kbps 48kHz 2-channel stereo.

Mencoder creates two AVI container files per show using the two-pass method, libavcodec MPEG4 for video and MP3LAME (CBR 128 stereo MP3 441.kHz) for audio.  The video remains as NTSC 29.97 fps, 720x480, with PAR, SAR AND DAR same as original.  One AVI is (remains?) as interlaced top field first, the other AVI is progressive.

Command line I use to create the interlaced AVI:

  mencoder input.mpg -edl input.edlp
  -mc 5 -idx -aspect 4:3
  -ovc lavc -lavcopts vcodec=mpeg4:ildct:ilme:mbd=2:trell:
          v4mv:vhq:vbitrate=2500:threads=2:aspect=4/3:vpass={pass}
  -oac mp3lame -lameopts cbr:br=128 -af lavcresample=44100 -srate 44100
  -passlogfile input.log -ffourcc DX50 -o {output}

First execution {pass}=1 and {output}=:nul, second execution {pass}=2 and {output} is output.avi filename.


Command line to create progressive AVI:

  mencoder input.mpg -edl input.edlp
  -mc 5 -idx -aspect 4:3
  -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:
          v4mv:vhq:vbitrate=2500:threads=2:aspect=4/3:vpass={pass}
  -vf yadif=3,mcdeint,framestep=2,harddup
  -oac mp3lame -lameopts cbr:br=128 -af lavcresample=44100 -srate 44100
  -passlogfile input.log -ffourcc DX50 -o {output}

(Executed twice per above)


A typical one hour recording is about 3.5gig in size, after commercial cuts it's about 40 minute and the output AVI's are 700mb to 1.5gig in size.   I have no A/V sync issues and few visual artifacts not present in the original recordings.  The conversion for each AVI is near realtime, requiring about an hour to cut and convert each AVI from a one hour show.  I did try turbo=1, but saw a minor increase in video artifacts so dropped it.

I offer many thanks to the wonderful and helpful people on this list.  The above command lines were cobbed together by sheer luck and no real understanding on my part, primarily from suggestions and information I found on this list.  Thanks to you I now have very nice videos that play beautifully on their intended target hardware.  If you can help me understand what I am doing a bit better, it would be very much appreciated.

Kind regards,
--appyface


More information about the MEncoder-users mailing list