[MEncoder-users] Mencoder finishes early on DVD to Divx encoding

Pete Davis pete at petedavis.net
Tue Jun 21 04:40:11 CEST 2005


It's definitely -ofps 24000/1001 in the script. I'm sitting here looking at
the script.

Actually, I'll just paste in the script below. You'll have to excuse me,
this is the first time I've done a bash script with variables or anything,
so I'm sure there are better ways to do this. But it works... (well, except
for the FPS thing, but that's not a script problem I don't think).

Basically I pass in Chapter and Step. Step 1 is audio, Step 2 is first pass
of video and Step 3 is second pass of video. It allows me to do it one step
at a time (or I can not pass a step and it will do all 3 passes in one step)

The whole VCODEC and ENCODER thing is simply so I can easily change the
value of VCODEC=$DIVX or VCODEC=$XVID to use the different codecs. Right now
I'm just using Divx because it's more compatible with my media player.

Pete


#!/bin/bash

function audio
{
  mencoder -dvd-device ./ dvd://$CHAPTER -ovc frameno -o frameno.avi -oac
mp3lame -lameopts cbr:br=128
}

function vid1
{
  mencoder -dvd-device ./ dvd://$CHAPTER -oac copy -o /dev/null  -vf
pullup,softskip,scale=512:288 -ovc $ENCODER -ofps 24000/1001 -
}

function vid2
{
  mencoder -dvd-device ./ dvd://$CHAPTER -oac copy -o movie.avi  -vf
pullup,softskip,scale=512:288 -ovc $ENCODER -ofps 24000/1001 -
}

STEP="all"
CHAPTER=1
BITRATE="1000"
PASSNUM="1"
DIVX="lavc -lavcopts
vcodec=mpeg4:vbitrate=${BITRATE}:mbd=2:vpass=-PASSNUM-:vqmin=2:vqmax=31"
XVID="xvid -xvidencopts bitrate=${BITRATE}:pass=-PASSNUM-"

# set to $XVID or $DIVX
VCODEC=$DIVX

if [ $# == 1 ]; then
   CHAPTER=$1
elif [ $# == 2 ]; then
   CHAPTER=$1
   STEP=$2
else
   echo "dvdtranscode chapter [step]"
   exit
fi 

if [ $STEP == "all" ]; then
  audio $CHAPTER
  ENCODER=${VCODEC/-PASSNUM-/1}
  vid1 $CHAPTER
  ENCODER=${VCODEC/-PASSNUM-/2}
  vid2 $CHAPTER
  exit
fi

if [ $STEP == "1" ]; then
  audio $CHAPTER
  exit
fi

if [ $STEP == "2" ]; then
  ENCODER=${VCODEC/-PASSNUM-/1}
  vid1 $CHAPTER $ENCODER
  exit
fi

if [ $STEP == "3" ]; then
  ENCODER=${VCODEC/-PASSNUM-/2}
  vid2 $CHAPTER $ENCODER
  exit
fi

-----Original Message-----
From: mencoder-users-bounces at mplayerhq.hu
[mailto:mencoder-users-bounces at mplayerhq.hu] On Behalf Of RC
Sent: Monday, June 20, 2005 9:25 PM
To: MEncoder usage discussions
Subject: Re: [MEncoder-users] Mencoder finishes early on DVD to Divx
encoding

On Mon, 20 Jun 2005 17:01:27 -0500
"Pete Davis" <pete at petedavis.net> wrote:

> My CDs are progressive, so I tried the -vf pullup,softskip options
> with the -ofps 24000/1001, but the video came out at 54 minutes
> instead of 44 minutes which obviously didn't match up with the 44
> minutes of sound

That's typically what happens when you leave the "o" off of the "-ofps"
switch (mencoder uses that value as the input fps).  Try it again, and
be careful that you've typed everything correctly.  

_______________________________________________
MEncoder-users mailing list
MEncoder-users at mplayerhq.hu
http://mplayerhq.hu/mailman/listinfo/mencoder-users






More information about the MEncoder-users mailing list