Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Encoding Videos for XBox 360 and PS3

Submitted by on January 1, 2009 – 4:47 pm 5 Comments

Both Xbox 360 and PS3 support a variety of video codecs and are capable of playing high-definition video files. One of the most popular formats for HD video files is Matroska (MKV), which provides excellent video quality, relatively small size, multiple audio tracks and many other cool features. Unfortunately, neither Xbox 360 nor PS3 currently support MKV format.

There are many video re-encoding applications that allow you to convert video files between different formats. I recommend using MEncoder, which offers high quality, advanced features and ease of use. This tool is open-source, free and will run on Windows, Linux, Solaris, and Mac.

MEncoder comes as a stand-alone application or as part of the Mplayer package. There are GUIs available for MEncoder, but I recommend using command-line interface instead. Below is an example of converting a standard MKV hi-def (1080p) video file into AVI format supported by Xbox 360 and PS3:

mencoder "original_file.mkv" -ovc xvid -oac mp3lame -xvidencopts threads=auto fixed_quant=2 -alang en -o "converted_file.avi"

The two options you need to pay particular attention to are:

fixed_quant=2 – This determines the quality (and file size) of the resulting AVI file. Setting this to “1” would produce the best-looking result, but the file will be 2-3 times larger than the original MKV. I found that setting this to “2” produces excellent results without excessively large files.

-alang en – Because MKV files support multilingual audio tracks, it is important to select the “English” track (or whichever language you prefer).

Re-encoding a large hi-def video file may take a few hours, depending on the speed of your CPU. Here is a sample MKV-to-AVI conversion run. The resulting AVI file plays well on Xbox 360 and PS3:

mencoder original_file.mkv -ovc xvid -oac mp3lame -xvidencopts threads=auto fixed_quant=1 -alang eng -o "converted_file.mkv"

MEncoder 2:1.0~rc2-0ubuntu17 (C) 2000-2007 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 10)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x2cd8a42c
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC) "original_file", -vid 0
[mkv] Track ID 2: audio (A_AC3) "AC3, 6ch 384 kbps", -aid 0, -alang rus
[mkv] Track ID 3: audio (A_AC3) "AC3, 6ch 640 kbps", -aid 1, -alang eng
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO:  [avc1]  1280x544  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:31  fourcc:0x31637661  size:1280x544  fps:23.98  ftime:=0.0417
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 640.0 kbit/41.67% (ratio: 80000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
xvid: using library version 1.1.2 (build xvid-1.1.2)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
MP3 audio selected.
VDec: vo config request - 1280 x 544 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.35:1 - prescaling to correct movie aspect.
videocodec: XviD (1280x544 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=1280x544, sampled=1280x544
xvid: Fixed Quant Rate Control -- quantizer=1/1=1.00
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Writing header...
ODML: vprp aspect is 16384:6963.
Setting audio delay to 0.048s.
Writing header...
ODML: vprp aspect is 16384:6963.
Setting audio delay to 0.048s.
Pos:   0.0s      3f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.008 [0:0]
1 duplicate frame(s)!
Pos:   0.1s      5f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.017 [0:0]
1 duplicate frame(s)!
Pos:   0.8s     22f ( 0%) 15.33fps Trem:   0min   0mb  A-V:0.088 [0:31]
Skipping frame!
Pos:   1.0s     29f ( 0%) 17.10fps Trem:   0min   0mb  A-V:0.033 [80:32]
1 duplicate frame(s)!
Pos:   1.6s     42f ( 0%)  6.67fps Trem:   0min   0mb  A-V:0.088 [6945:31]
Skipping frame!
Pos:   2.0s     52f ( 0%)  4.65fps Trem:   0min   0mb  A-V:0.088 [12491:32]
Skipping frame!
Pos:   2.3s     62f ( 0%)  3.84fps Trem:   0min   0mb  A-V:0.085 [18506:32]
Skipping frame!
Pos:  25.7s    624f ( 0%)  4.56fps Trem: 715min 12399mb  A-V:-0.085 [12791:39]
1 duplicate frame(s)!
ODML: Starting new RIFF chunk at 1023MB. 626min 10175mb  A-V:-0.073 [12939:207]
ODML: Starting new RIFF chunk at 2047MB. 557min 9354mb  A-V:-0.074 [11033:206]]
ODML: Starting new RIFF chunk at 3071MB. 476min 9130mb  A-V:-0.072 [10751:206]
ODML: Starting new RIFF chunk at 4095MB. 384min 8713mb  A-V:-0.076 [10141:205]
ODML: Starting new RIFF chunk at 5119MB. 284min 8389mb  A-V:-0.073 [9570:206]]
ODML: Starting new RIFF chunk at 6143MB. 189min 8320mb  A-V:-0.075 [9512:206]
ODML: Starting new RIFF chunk at 7167MB. 105min 8390mb  A-V:-0.073 [9644:207]
ODML: Starting new RIFF chunk at 8191MB.  24min 8482mb  A-V:-0.074 [9734:209]
Pos:7313.1s 175344f (99%)  4.05fps Trem:   0min 8575mb  A-V:0.087 [9614:210]]
Skipping frame!
Pos:7329.9s 175750f (99%)  4.06fps Trem:   0min 8573mb  A-V:0.023 [9596:209]
Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 16384:6963.
Setting audio delay to 0.048s.

Video stream: 9596.562 kbit/s  (1199570 B/s)  size: 8792850727 bytes  7330.001 secs  175750 frames

Audio stream:  209.906 kbit/s  (26238 B/s)  size: 192326400 bytes  7329.984 secs
Print Friendly, PDF & Email

5 Comments »

  • I own an Xbox and a Playstation and both are really good game consoles. Let’s see what are Microsoft’s future updgrades on its Xbox game console.-,`

  • Jeremy says:

    Since you’re using xvid you can have it use multiple CPUs (or CPU cores) by passing in the “threads” option. For instance, if you want to run it using two cores:

    mencoder “original_file.mkv” -ovc xvid -oac mp3lame -xvidencopts fixed_quant=2:threads=2 -alang en -o “converted_file.avi”

  • Oilers says:

    i have How i met your mother season 5 on my pc 16gigs mkv file, i converted them to avi,xvid high quality using aiprosoft but they are still unsupported by both xbox 360 and ps3. I did not lose any quality cause i needed to double the sice and unfortunatly 2 things happened after that.

    1 i deleted the mkv formats
    2 just after i discovered gotsent a special converter for xbox and ps3, but this converter only converts mkv and avi but it crashes when i tried to convert these avi files. So i am guessing i need to re-encode that but how can I don’t know how or what to do that. Can someone help me?

  • happyha31 says:

    My xbox is hooked up with hd cable to a hd tv. Do i need to buy hd dvds to see films in hd?

  • tjpimpin says:

    Im trying to get my xbox 360 and my HDTV in surround sound with this kind of surround sound system (Philips HTS3151D). I have tried everything and i can’t seem to be able to figure it out!

Leave a Reply

%d bloggers like this: