I am not looking into encoding these video files. Thank you!Updated: 2/17/2008 8:00pm
Many Props to this post:
http://ubuntuforums....ad.php?t=548547Here is the process I use to conver MKV files (with AC3 audio) to MP4's that can play on an Xbox 360
First we need to get and install gpac tools that actually work for files larger than 2gb.
CODE
cd ~
wget http://downloads.sourceforge.net/gpac/gpac-0.4.4.tar.gz
tar -xzf gpac-0.4.4.tar.gz
Now we want to get a patch file that will fix the 2gb limit in the linux MP4Box
The patch is located
HERECopy the following into a file named "gpac.patch" (without the quotes) in you home dir (outside of the dir named gpac
CODE
diff -rc gpac/src/Makefile gpac-0.4.4-os_drivers/src/Makefile
*** gpac/src/Makefile 2007-05-08 17:15:25.000000000 +0200
--- gpac-0.4.4-os_drivers/src/Makefile 2007-07-01 02:14:16.000000000
+0200
***************
*** 90,95 ****
--- 90,102 ----
CFLAGS+=-DGPAC_BIG_ENDIAN
endif
+ #4- flags used in utils/os_divers.c
+ ifeq ($(CONFIG_LINUX), yes)
+ CFLAGS+=-DCONFIG_LINUX
+ endif
+ ifeq ($(CONFIG_FREEBSD), yes)
+ CFLAGS+=-DCONFIG_FREEBSD
+ endif
## libgpac scenegraph compilation and linking options
SCENEGRAPH_CFLAGS=
Next we want to apply the patch
CODE
patch -p0 < gpac.patch
Now that the makefile is patched lets continue on by installing the app
CODE
cd ~/gpac
chmod +x configure
./configure
make
sudo make install
Other apps to install (this is for debain and ubuntu distros, if you have a different distro install using what ever package manager you have available (yum, emerge, etc)
CODE
sudo apt-get install mkvtoolnix hexedit mplayer
Then you need neroAacEnc. You may download it for free here:
http://www.nero.com/...-aac-codec.htmlUnpack linux directory, chmod +x neroAacEnc and copy it to a location of your choice (whitin the path, like /usr/bin)
That should do it! Now go ahead with the steps below and make some stereo MP4's for your xbox from MKV's Lets hope soon Microsoft allows for 5.1 MP4's
I still would like to code this into a smart script (maybe in ruby?!?!?) to do all of this for you (determine what audio format, etc) Any help would be appreciated. I mention Ruby as that is what I am currently learning. But enough babble read on!
CODE
mkvinfo file.mkv //This is to determine which track the video and audio is and what type of audio is being used (dts, ac3, etc)
mkvextract tracks file.mkv 1:video.h264 2:audio.ac3 //This varies, of course, depending on what tracks the audio/video is on. Also this example is for ac3 audio, If your audio happens to be DTS or any other format just replace the .ac3 with the appropriate extension.
hexedit video.h264 //I change the 67 64 00 33 byte to 67 64 00 29. This is to replace what h264info does to change the level from 5.1 to 4.1. According to MP4Box's analysis of the resulting mp4 the file is in fact seen as a 4.1 file.
mkfifo audiodump.wav //to create a dummy wav file for mplayer to dump the audio into
neroAacEnc -lc -ignorelength -q 0.20 -if audiodump.wav -of audio.m4a & mplayer audio.ac3 -vc null -vo null -channels 2 -ao pcm:fast //This is converting the ac3 to aac in a m4a container using the low complexity stereo that the xbox 360 requires. If the audio is dts then just change the .ac3 to .dts
MP4Box -new fileoutput.mp4 -add video.h264 -add audio.m4a -fps 23.976 //re-mux your new and improved video (with 4.1 level) and audio (aac-lc stereo) into a mp4 container.
Interesting information about MP4Box and files larger than 2GB (FIXED with the patch above)
http://sourceforge.n...;group_id=84101