Converting .mkv to .avi for xbox
Posted: June 10th, 2009, 3:18 pm
Here is a simple script that will convert mkv files to avi's that will play on the xbox 360. The guts of it came from undershot
here http://forums.sabnzbd.org/index.php?topic=1929.0 I'm using twonkyserver to stream to the xbox on an Ubuntu box. The mencoder line needs to be straightened out before you use it, it was too long to fit in this box.
#!/bin/sh
FOLDER_PATH="$1"
cd "$FOLDER_PATH"
FOLDER_NAME=`echo $FOLDER_PATH | awk -F [/] '{print $NF}'`
echo "\n\nChecking for .mkv file..."
if [ -e *.mkv ]
then
echo "\n\n mkv file found..Processing"
mencoder *.mkv -ovc xvid -xvidencopts pass=1 -af resample=44100:0:2 -srate 44100 -oac mp3lame -lameopts cbr:br=128:aq=4:vol=1.1:mode=1 -o $FOLDER_NAME.avi
rm *.mkv
rm*.log
else
echo "\n\n\tNo .mkv file found"
fi
echo "\n\n...Processing Complete!"
here http://forums.sabnzbd.org/index.php?topic=1929.0 I'm using twonkyserver to stream to the xbox on an Ubuntu box. The mencoder line needs to be straightened out before you use it, it was too long to fit in this box.
#!/bin/sh
FOLDER_PATH="$1"
cd "$FOLDER_PATH"
FOLDER_NAME=`echo $FOLDER_PATH | awk -F [/] '{print $NF}'`
echo "\n\nChecking for .mkv file..."
if [ -e *.mkv ]
then
echo "\n\n mkv file found..Processing"
mencoder *.mkv -ovc xvid -xvidencopts pass=1 -af resample=44100:0:2 -srate 44100 -oac mp3lame -lameopts cbr:br=128:aq=4:vol=1.1:mode=1 -o $FOLDER_NAME.avi
rm *.mkv
rm*.log
else
echo "\n\n\tNo .mkv file found"
fi
echo "\n\n...Processing Complete!"