Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Problems with mencoder

    I have a script that I use to create Divx encoded .AVIs from DVDs. The script is as follows:

    if [ $# != 1 ]; then
      echo "Please provide a chapter"
      exit 1
    mencoder -dvd-device ./ dvd://$1 -ovc frameno -o frameno.avi -oac mp3lame -lameopts cbr:br=128
    mencoder -dvd-device ./ dvd://$1 -oac copy -o /dev/null -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900:vhq:vpass=1:vqmin=1:vqmax=31 -vop scale=512:288 -
    mencoder -dvd-device ./ dvd://$1 -oac copy -o movie.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900:vhq:vpass=2:vqmin=1:vqmax=31 -vop scale=512:288 -

    Basically, I pass in a chapter number and it then does the encoding. The DVD player in my Linux box doesn't work, so I decrypt and copy the files from my windows box to a directory on the Linux box.

    Sometimes this script works fine, sometimes it fails with errors.

    For example:

    mencoder: ratecontrol.c:618: ff_rate_estimate_qscale: Assertion `picture_number<rcc->num_entries' failed.
    /home/pdavis/bin/dvdtranscode: line 10: 22864 Aborted

    Other times it just stops partway through and finishes up as if everything is fine. For example, it may stop at 20% into the video encoding, and write out information as if everything went just fine and it had made it to the end.

    But then if I delete the temporary and output files and try again, it may work. Sometimes it takes 2 or 3 tries and then it will work. Anyone have any idea what might be wrong? Should I upgrade something? It's a pain in the butt to have to just rerun the script over and over until it works since it may fail anywhere along the way.

    If I just type: mencoder I get the following info:

    MEncoder 1.0pre6-3.4.2 (C) 2000-2004 MPlayer Team
    CPU: Intel Pentium 4/Xeon/Celeron Northwood (Family: 8, Stepping:
    Detected cache-line size is 64 bytes
    CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2:
    Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2


  2. #2
    It might be an MPlayer/libavcodec bug. Try upgrading to pre7 if you haven't done so yet.

    BTW - the files are not "DivX encoded". You're using the FFmpeg MPEG-4 codec, not DivX, the output files are AVI/MPEG-4. Also, I think the 3-pass encoding you're using is obsolete and deprecated, you shouldn't use the frameno stuff. And you should also use mbd=2 instead of the old vhq option (which is mbd=1).

Posting Permissions

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