MediaTomb and PS3: Playing DVD ISO files

Since mediatomb doesn't care much about what it serves, it's not that hard to have it serve dvd movies from an ISO file. A PlayStation 3 however is rather picky when it comes to video formats, so getting the three to play along can get interesting.

First of all, you need to tell mediatomb that anything with a .iso extensions is something it should look into:

<map from="iso" to="video/dvdiso"/>

Then tell it to transcode this particular mimetype:

<transcode mimetype="video/dvdiso" using="mencoder-iso"/>

All you need then is a transcoding profile which handles the iso files.

<profile name="mencoder-iso" enabled="yes" type="external">
        <mimetype>video/mpeg</mimetype>
        <accept-url>yes</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>yes</accept-ogg-theora>
        <agent command="/usr/local/bin/mediatomb-mencoder-iso" arguments="%in %out"/>
        <buffer size="1000000" chunk-size="512000" fill-size="20480"/>
</profile>

If you're unfamiliar with the mediatomb config.xml structure, my full config file is up here. Finally, here's the helper script that does the actual transcoding of the dvd iso (with subtitles!) to something the PS3 knows and likes:

#!/bin/bash
CHAPTER=`lsdvd "$1" | grep Longest | sed 's/.* //'`

exec mencoder -dvd-device "$1" \
dvd://$CHAPTER -slang nl,en -oac copy -ovc lavc -of mpeg \
-lavcopts vcodec=mpeg2video:keyint=1:vbitrate=200000:vrc_maxrate=12000:vrc_buf_size=1835 \
-mpegopts muxrate=12000 -vf harddup,scale=720:-2 \
-o "$2" &>/dev/null

This script uses "lsdvd" to find the longest chapter of the dvd first - we'll have to assume there that the longest chapter is indeed the one with the main movie. A dvd iso containing two movies, or containing various episodes of a series for an example, won't work too well with this script - which is fine by me, since I don't have that kind of isos. This script Works For Me™ but feel free to change mencoder parameters to suit your needs. If you're not interested in subtitles, you could try without the -slang nl,en and using -ovc copy, essentially remuxing the media stream without actually transcoding it. YMMV.

So there you have it - iso files show up in the PS3's menu, and they get transcoded on the fly with dutch subtitles, or english subtitles if dutch ones aren't available in the iso. And you don't even need mediatomb 0.12 for it to work.

Comments

Comment

Greetings I am so excited I found your webpage,
I really found you by accident, while I was researching
on Digg for something else, Regardless I am here now and would just like to say thanks for a remarkable post and a all round thrilling blog
(I also love the theme/design), I don’t have time to go through it all at the moment but I
have saved it and also added your RSS feeds, so when I have time I
will be back to read more, Please do keep up the superb b.

My web page ... <a href="http://www.v-diagram.com/maturesexchat863025">sex show live cam</a>

RobertDONA (not verified)

Tue, 26/07/2016 - 20:51

Comment

Hey I know this is off topic but I was wondering if you knew of
any widgets I could add to my blog that automatically tweet
my newest twitter updates. I've been looking for a plug-in like this for quite some time and was
hoping maybe you would have some experience with something like this.
Please let me know if you run into anything.
I truly enjoy reading your blog and I look forward to your new updates.

My blog: <a href="http://shorl.com/prujarysyrada">free sex cam shows</a>