.

Encoding video for the Philips DVP-3166 again

2011-03-01 21:42:26

My last post didn't help me very much when I needed to encode for this player and lost my script. The following works, but the settings aren't perfect. This is what I use to convert 480p to the resolution my SDTV accepts. I was unable to get the 720x480 resolution I mentioned earlier to work. The important bit is directly from the LinuxReviews Wiki

#!/bin/bash

for video in *
do
    if [ $video=="dump.sh" ]
    then
        continue
    fi
    name=`echo "$video" | cut -d'.' -f1`
    mencoder "$video" -ofps 23.976 -oac mp3lame -lameopts abr:br=92 \
                              -ovc xvid -xvidencopts pass=2:bitrate=350\
                              -vf scale=640:362 -o ./E-"$name".avi
    mv E-"$name".avi ./Re-encoded/
    if [ -f ./Re-encoded/E-"$name".avi ]
    then
        mv "$video" ./Done/
    fi

    sleep 1

done

Should be able to use vbr mp3 and a lower xvid bitrate without any problems, but I haven't tried either. You can add threads=2 to the xvid options, but if you're going to be running this on a whole bunch of videos, then you're better off splitting the videos into n groups and running n instances of mencoder on an n-core processor. I only see around a 50% speedup with threads=2 whereas running two instances has each instance running at nearly full speed.