Search:  
Gentoo Wiki

TIP_Encode_Video_for_PS3

Installation

First we need to have transcode and the gpac installed.

# emerge -avt media-video/transcode media-video/gpac

Now we need to create the script that will handle converting for us.

File: ps3videnc
#!/bin/sh
##Released under the GPL.
## www.subvida.com
## Carlos Rivero

function usage {
cat <<EOF
$0 inputFile outputFile bitrate
where
    inputFile: The video to convert
    outoutFile: The output video
    bitrate: bitrate for the output (ex: 2000)
EOF
exit 1
}
[ $# -lt 3 ] && usage

echo "EXECUTING COMMAND: mencoder $1 -ovc x264 -oac faac -x264encopts subq=6:pass=1:bitrate=$3:bframes=3:partitions=p8x8,b8x8,i4x4:weight_b:threads=auto:nopsnr:nossim:frameref=3:mixed_refs:bime:brdo:level_idc=41:direct_pred=auto:trellis=1 -o "$2.avi""
echo "Now converting to AVC.  This will take the most time." + `date`

mencoder $1 -ovc x264 -oac faac -x264encopts subq=6:pass=1:bitrate=$3:bframes=3:partitions=p8x8,b8x8,i4x4:weight_b:threads=auto:nopsnr:nossim:frameref=3:mixed_refs:bime:brdo:level_idc=41:direct_pred=auto:trellis=1 -o "$2.avi"

echo "Now converting avi to MP4, due to limitations."
MP4Box -aviraw video $2.avi
MP4Box -aviraw audio $2.avi
mv $2_audio.raw $2_audio.aac
MP4Box -add $2_audio.aac -add $2_video.h264 $2.mp4

Now change the file permissions so we can execute it and place the file in to /usr/local/bin

# chmod +x ps3videnc
# mv ps3videnc /usr/local/bin

Run

# ps3videnc VideoFileToConvert SaveAsfileName 2000
(using bitrate 2000 )

Credits

Retrieved from "http://www.gentoo-wiki.info/TIP_Encode_Video_for_PS3"

Last modified: Fri, 05 Sep 2008 07:42:00 +0000 Hits: 5,714