How to Transcode Video with ffmpeg for the Xbox 360

This tutorial will show you how to install ffmpeg and transcode video files into DivX format.

I recently discovered I could play videos on my Xbox 360. Awesome. No longer do I have hook up a monstrous audio in, and s-video cables every time I want to watch South Park. Now I can just fire up my Xbox and watch the movies from my file server.

Sounds too good to be true? Well it is. Unfortunately, the Xbox is very picky, about which video and audio codecs it will play. So to get around this problem I needed FFmpeg.

1. Download the latest ffmpeg using subversion with this command:

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg

2. I ran the following command to configure FFmpeg with mp3 and Divx support:

./configure --enable-gpl --enable-liba52 --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libxvid

3. Then compile, and install with these two commands:

make; sudo make install

*build-essentials is required to compile software

4. To encode a video with a 128kbps audio bitrate and 1,000kbps video bitrate, we would issue the following command:

ffmpeg -i source_video.avi -ab 128k -b 1000k -acodec libmp3lame -vcodec libxvid -aspect 4:3 out.avi

5. Bonus. This simple bash script will convert all the videos in a directory.

#!/bin/bash
mkdir output
for film in *.avi ; do
echo Converting $film
ffmpeg -i “$film” -ab 128k -b 1000k -acodec libmp3lame -vcodec libxvid output/”$film”
done

Copy this script into a file text, and change the permission with this command:

chmod 700 encode

Now you cd into the directory where the videos are located, and execute the bash script

cd moviefolder
~/encode

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
copy the characters (respecting upper/lower case) from the image.