JasonDaly.name

PHP, Ruby, Symfony, Rails, Doctrine, MooTools. Web Development.
February 25, 2009

Making AppleTV Encoded Video Files PlayStation 3 Compatible

Using Handbrake to rip DVDs, I use a slight customization of the default AppleTV encoding settings. I find the quality-to-filesize ratio is great for nearly zero setup time. But when trying to play the encoded .mp4 video files on my PlayStation 3, the video format was unrecognized.

Running this1 over a movie.mp4 AppleTV encoded movie fixes this issue, while still maintaining compatibility with AppleTV.

perl -pi.bak -e "s|(avcC.{3}).(.{7}).|1x292x29|" movie.mp4

In the case where I have ripped one of my DVDs of TV show episodes and am left with multiple .mp4 files requiring this fix, I run this script from within the folder

#!/usr/bin/bash

for file in `find . -type f -name *.mp4`;
do
    perl -pi.bak -e "s|(avcC.{3}).(.{7}).|1x292x29|" $file;
done;

  1. Here is the link to the original forum thread where I found this information. Thanks, Paul! 

Tags: appletv dvd encoding apple bash perl playstation ps3 code mp4 tv handbrake mac