PlayStation 3 compaitble MPEG-4 container repacker
Some of my mobile phones have been able to record video clips in MPEG-4 format. Sadly some of these clips don’t play on the PlayStation 3 and those that do stutter terribly. I use ‘iplayer-dl‘ to download content from BBC iPlayer. Sadly the files are in a Quicktime container and are not playable on the PS3. In order to address both these issues I created a script which extracts the audio and video from an existing MPEG-4 or ISO Media Apple QuickTime container and repacks them in a new MPEG-4 container with optional splitting of the resulting MPEG-4 to maintain FAT32 compatibility. The new MPEG-4 files play back just fine on my PS3
This script works on Ubuntu Linux, should work on any other Linux/Unix flavour and possibly Mac OS X providing you have the required tools installed.
- See the Code section of my site for the download and more details.
Mp4-Repacker.sh was released on April 23rd 2009 to help celebrate St. George’s Day.
Related posts
MKV to M2TS conversion script
The Play Station 3 can’t play MKV file. Therefore I’ve written a script that creates a PlayStation 3 compatible M2TS from a MKV, assuming video is H.264 and audio is AC3 or DTS with as little re-encoding as possible. Any subtitles in the MKV are preserved in the M2TS although the PS3 can’t display subtitles in M2TS containers. Optionally splits the M2TS, if it is greater than 4GB, to maintain FAT32 compatibility. Unlike other MKV to M2TS solutions, this script doesn’t create any intermediate files during the conversion. The PS3 can’t play DTS audio streams in M2TS containers, therefore DTS audio is transcoded to AC3.
This script works on Ubuntu Linux, should work on any other Linux/Unix flavour and possibly Mac OS X providing you have the required tools installed.
- See the Code section of my site for the download and more details.
MKV-to-M2TS.sh was released on April 23rd 2009 to help celebrate St. George’s Day.
Related posts
DVD to MPEG2-PS Ripper for Linux
Every so often I find myself in looking through the ex-rental DVD “bargain bin”. Quite often I find something I consider a bargain. However, the experience of watching an ex-rental DVD is typically ruined by the various trailers and marketing guff at the start which you can’t skip. My wife hates that stuff, and I love my wife, so I routinely rip the main feature of newly acquired ex-rental DVD movies so we can avoid that crap. I run a Mediatomb DLNA server and I want to load it with all my DVDs. Ripping them helps reduce the amount of storage I will require. MPEG2-PS files are compatible with my PS3 which is the client to my Mediatomb DLNA server.
As a solution to the above I created this script, which can extract the main feature from a DVD video, allowing the user to select one audio stream and one subtitle stream. Optionally the video can be requantised, using M2VRequantiser, and an ISO image created. If creating an ISO image the chapters are also preserved from the original DVD.
- See the Code section of my site for the download and more details.
DVD-toMPG.sh was released on April 23rd 2009 to help celebrate St. George’s Day.
Related posts
M2VRequantiser for 32-bit and 64-bit Linux
I recently discovered that ‘tcrequant’ (part of the transcode suite of tools) has been deprecated. Worst still I found that when I ran ‘tcrequant’ on my 64-bit Linux workstation is was corrupting the video. See the links below for details.
Therefore I decided to get the M2VRequantiser code from Metakine working on both 32-bit and 64-bit Linux as a replacement for ‘tcrequant’.
M2VRequantiser accepts the raw MPEG2 video data (not VOB) from the standard input and writes the recompressed frames to the standard output. M2VRequantiser takes two arguments. The first one is a floating point value specifying the ratio of compression. The second is the size of the M2V, since the data is streamed to M2VRequantiser it cannot know the M2V size. The following command would recompress ‘original.m2v’, whose size is 1024000 bytes, by a factor of 1.25.
M2VRequantiser 1.25 1024000 < original.m2v > requantised.m2v
I’ve only tested on 32-bit and 64-bit Linux, specifically Ubuntu Intrepid 8.10. It works for me but I’d be interested to get your feedback.
- See the Code section of my site for the download and more details.
M2VRequantiser was released on April 23rd 2009 to help celebrate St. George’s Day.
Related posts
IMDB Film Summary as a MPEG2 video
If you’ve read my blog before you’ll know I run Mediatomb DLNA server with my PS3 as the client, You’ll also know I am working towards importing my entire DVD collection into my Mediatomb server. However, my wife wants to know something about each film in the library without having to dig out the DVD case from storage. My solution is to include a MPEG-2 video displaying the film summary in the Mediatomb library for each DVD I have imported so it can be easily viewed from the PS3.
My script is called IMDB-to-MPEG and I’ve finally got round to uploading it. See the Code section of my site for the download.
The scripts takes one parameter as input, a film title. The plotline, year of release, genres, cast list and running time for that film are gathered from IMDB and formatted as text. Here is an example.
The Usual Suspects (1995) A boat has been destroyed, criminals are dead, and the key to this mystery lies with the only survivor and his twisted, convoluted story beginning with five career crooks in a seemingly random police lineup. (106 mins) Starring Stephen Baldwin as Michael McManus, Gabriel Byrne as Dean Keaton, Benicio Del Toro as Fred Fenster, Kevin Pollak as Todd Hockney, and Kevin Spacey as Roger 'Verbal' Kint. Genres: Crime, Mystery, Thriller. Rated 8.7 out of 10 from 227,964 votes.
The text is converted into an image and then encoded into a MPEG-2 video using the lowest possible bitrate/resolution that is acceptable to read when viewing on a 42″ plasma from my sofa.
Directories for each matching genre are created and also one for the IMDB rating (rounded down). The MPEG-2 is stored in the ‘All’ folder and then symlinked to the genres and rating for that film. I then copy my video into the appropriate directory in ‘All’. For example.
. |-- All | `-- The_Usual_Suspects | `-- About_The_Usual_Suspects.mpg |-- Genres | |-- Crime | | `-- The_Usual_Suspects -> ../../All/The_Usual_Suspects | |-- Mystery | | `-- The_Usual_Suspects -> ../../All/The_Usual_Suspects | `-- Thriller | `-- The_Usual_Suspects -> ../../All/The_Usual_Suspects |-- Ratings `-- 8 `-- The_Usual_Suspects -> ../../All/The_Usual_Suspects
This code was lashed up in a few hours, it ain’t pretty but it works for me on my Ubuntu Linux systems, maybe it’ll work for you too
