5

Transcoding video for the PS3 in Ubuntu

Posted on Sunday, 3 June 2007

The title says it all really. I've banged on about games a bit and now it's time to do something involving curiosity!
So I know how to, should i want to for any reason, this is how you can make videos that are playable on a PS3 (only tested on firmware 1.80). Note that it doesn't transcode to H.264, but instead uses a lesser MPEG4 profile of some kind (mpeg4 appears to be entirely too complicated to figure out!).

This mostly comes from here, but the gist is that you grab a specific version of ffmpeg from SVN and compile it against a variety of media libraries from multiverse. This makes me think ubuntu should have a bleeding edge version of ffmpeg in multiverse that links against the libraries there - if licences allow for it.

For what it's worth, this is the command line I've been using with it (note that it will strip surround audio down to 2 channel stereo. That's all i have, so I haven't bothered to figure out anything better).

ffmpeg -y -i /path/to/source.avi -acodec aac -ab 192kb -vcodec mpeg4 -b 1500kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -title "Blah 2: The blahing" /path/to/output.mp4

Discussion

  1. Eureka!

    Thank you, man!

    I have spent the last couple of days trying to figure this out. I've read all sorts of guides, and tried various command lines that others recommended and none of it was working for me.

    Your method worked like a charm for the first two videos I've tried, and I can only assume I will continue having such success.

    Thanks a lot for ending a long battle I was having against ffmpeg. :)

    ReplyDelete
  2. rosswalker@mediaserver:~/Videos$ ffmpeg -i Muay.Thai.Fighting.Beat.avi -s 640x352 -vcodec xvid -b 1037k -acodec mp3 -ab 96k MuayThaiFightingBeat.PS3.avi
    FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
    libavutil version: 1d.49.3.0
    libavcodec version: 1d.51.38.0
    libavformat version: 1d.51.10.0
    built on Mar 12 2008 14:31:53, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu4)
    Input #0, avi, from 'Muay.Thai.Fighting.Beat.avi':
    Duration: 01:20:14.5, start: 0.000000, bitrate: 2447 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 720x404, 25.00 fps(r)
    Stream #0.1: Audio: 0x2000, 48000 Hz, stereo, 192 kb/s
    Unknown codec 'xvid'
    rosswalker@mediaserver:~/Videos$ ffmpeg -y -i Muay.Thai.Fighting.Beat.avi -acodec aac -ab 192kb -vcodec mpeg4 -b 1500kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -title "Muay Thai Chuia" Muay.Thai.Fighting.Beat.mp4
    FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
    libavutil version: 1d.49.3.0
    libavcodec version: 1d.51.38.0
    libavformat version: 1d.51.10.0
    built on Mar 12 2008 14:31:53, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu4)
    Input #0, avi, from 'Muay.Thai.Fighting.Beat.avi':
    Duration: 01:20:14.5, start: 0.000000, bitrate: 2447 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 720x404, 25.00 fps(r)
    Stream #0.1: Audio: 0x2000, 48000 Hz, stereo, 192 kb/s
    Unknown codec 'aac'

    Any Ideas?

    ReplyDelete
  3. Ross: Bit late, but if you're still trying, use

    -acodec libfaac

    Good luck.

    ReplyDelete
  4. Nice to see people doing charitable stuff.

    ReplyDelete
  5. alright !! thanks for the info and this is a great good news to the people who are addicted in PS3 .. but i think that they must put pictures in here, about that. .

    ReplyDelete