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">
        <agent command="/usr/local/bin/mediatomb-mencoder-iso" arguments="%in %out"/>
        <buffer size="1000000" chunk-size="512000" fill-size="20480"/>

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:

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.

mediatomb transcoding

Hi Lennert,
i was wondering what version of MediaTomb you're using.
I'm using 0.12-svn shipped with ubuntu, but i could not make dvd iso reading work.
I do see them now on the PS3 but when i want to play the file the error 'corrupt data' appears.

Any clues?

Submitted by Someone on Wed, 20/01/2010 - 05:44.
Streaming DVD-ISOS from mediatomb Server to Android Bubble UPNP


are you still there ? I'd like to stream DVD-ISOS from mediatomb to Bubble UPNP. Your solution is interesting for me, your config.xml I see


and I don't have this Script:


Possible to post it ?

Submitted by Mahlman (not verified) on Fri, 30/03/2012 - 21:11.

Looong time since I used mediatomb :-) but don't worry about that import-custom.js; you wouldn't be able to use it anyway. It's a clone of the standard import.js, but fully tailored for my specific filesystem layout - you would have to have a media directory structure *exactly* like mine to have it work. Just use the standard import script; it won't change anything about functionality.

I would suggest you try the "lazy man's solution" I wrote earlier - check - since it has a lot of improvements, and should play virtually anything, including dvd isos.

Submitted by Lennert on Fri, 30/03/2012 - 23:44.

User login

Who's online

There are currently 0 users and 0 guests online.