PS3 video playing via DLNA streaming with firmware 2.40, and mkv streaming
By AkH, 12 months ago, modified July 5, 2008
In the long list of strange problems with 2.40 firmware...
Video playing from the network just stop working, I have used eyeconnect on my mac, for 3 months without any problem, but since the 2.40 firmware, it complains about a network problem each time playing a video.
That's why I'm trying a new (free) solution Mediatomb, an opensource DLNA server, for Unix/mac.
First intall macports and issue a sudo port install mediatomb in a terminal.
Start mediatomb a first time: /opt/local/bin/mediatomb wait two seconds then kill it with Control + C.
Edit the file config.xml file which is in your home in a subdir called .mediatomb (you can browse this dir with the finder just type open .mediatomb in terminal.
Change it to yes
<protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->
Uncomment this line, remove <!-- and -->
<!-- Uncomment the line below for PS3 divx support -->
<!-- <map from="avi" to="video/divx"/> -->
After <import hidden-files="no">, paste this:
<filesystem-charset>UTF-8-MAC</filesystem-charset>
<metadata-charset>UTF-8-MAC</metadata-charset>
Run mediatomb, if you have multiple interface run /opt/local/bin/mediatomb -e en1 or just /opt/local/bin/mediatomb
Fire up your browser on the url given by mediatomb, in fact http://youlocalip:49153, browse and add the directories you want to share.
Don't forget to deactivate the web GUI, for security purpose.
<ui enabled="no"/> in config.xml or set a login password.
And the great news on the fly mkv conversion is working !! (tested with 720p mkv) to do that:
Create a file called /opt/local/bin/mediatomb-transcode-video:
#!/bin/bash
FFMPEG_PATH="/opt/local/bin/ffmpeg"
INPUT="$1"
OUTPUT="$2"
VIDEO_CODEC="mpeg2video"
VIDEO_BITRATE="4096k"
VIDEO_FRAMERATE="25"
AUDIO_CODEC="mp2"
AUDIO_BITRATE="192k"
AUDIO_SAMPLERATE="48000"
AUDIO_CHANNELS="2"
FORMAT="dvd"
exec "${FFMPEG_PATH}" -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \
-r ${VIDEO_FRAMERATE} -acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -ar ${AUDIO_SAMPLERATE} \
-ac ${AUDIO_CHANNELS} -f ${FORMAT} - > "${OUTPUT}" 2>/dev/null
chmod a+x /opt/local/bin/mediatomb-transcode-video
Change <transcoding enabled="no"> to yes.
And add a transcode mapping :
<transcode mimetype="video/x-matroska" using="video-common"/>
Add the profile video common:
<profile name="video-common" 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="/opt/local/bin/mediatomb-transcode-video" arguments="%in %out"/>
<buffer size="10485760" chunk-size="262144" fill-size="524288"/>
</profile>
and mkv map: <map from="mkv" to="video/x-matroska"/>
Your PS3 is now playing MKV.
Here is my config file: config.xml, don't forget to change the path for your home.
EDIT: thx prune for the comment, but you still remains a hobbit ;)


Comments
Énorme le MKV, je vais peut-être pouvoir acheter une PS3 maintenant :)
Be carefull that the explanations on this blog are uncomplete. Better use the config.xml file, which seems to be good.
Else, don't forget to change the "no" to "yes" in :
<transcoding enabled="no">
and add a transcode mapping :
<transcode mimetype="video/x-matroska" using="video-common"/>
If you want some debug (it's not working for me with 2.3x firmware, change the ffmpeg script and add just after #!/bin/bash :
set -x
Hobbits rocks !
Gnome are better
I'm having some trouble with this, and it seems like it's related to mediatomb-transcode-video script.
When I run the script with an .mkv file and an output name, the file comes back empty. I tried running ffmpeg manually (with the options specified in the script), and I get the following output:
$ /usr/bin/ffmpeg -i filename.mkv -vcodec mpeg2video -b 4096k -r 25 -acodec mp2 -ab 192k -ar 48000 -ac 2 -f dvd - > output
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 15:36:03, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu4)
[matroska @ 0x7fec46a31160]Ignoring seekhead entry for ID=0x1549a966
[matroska @ 0x7fec46a31160]Ignoring seekhead entry for ID=0x1654ae6b
[matroska @ 0x7fec46a31160]Ignoring seekhead entry for ID=0x114d9b74
[matroska @ 0x7fec46a31160]Unknown entry 0x73a4 in info header
[matroska @ 0x7fec46a31160]Unknown track header entry 0x55aa - ignoring
[matroska @ 0x7fec46a31160]Unknown track header entry 0x23314f - ignoring
[matroska @ 0x7fec46a31160]Unknown track header entry 0x55ee - ignoring
[matroska @ 0x7fec46a31160]Unknown track header entry 0xaa - ignoring
[matroska @ 0x7fec46a31160]Unknown track header entry 0x55aa - ignoring
[matroska @ 0x7fec46a31160]Unknown track header entry 0x23314f - ignoring
[matroska @ 0x7fec46a31160]Unknown track header entry 0x55ee - ignoring
[matroska @ 0x7fec46a31160]Unknown track header entry 0xaa - ignoring
Input #0, matroska, from 'filename.mkv':
Duration: 00:06:37.1, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 1232x720, 23.98 fps(r)
Stream #0.1: Audio: 0x0000, 48000 Hz, 5:1
Output #0, dvd, to 'pipe:':
Stream #0.0: Video: mpeg2video, yuv420p, 1232x720, q=2-31, 4096 kb/s, 25.00 fps(c)
Stream #0.1: Audio: mp2, 48000 Hz, stereo, 192 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Unsupported codec (id=86020) for input stream #0.1
I've tried googling around for 'id=86020' as a video codec, and I didn't have much luck figuring out exactly what video codec that is.
Anyone run into this, or happen to know what video codec id 86020 belongs to? Maybe it's something not-super-hard like a missing dependency.
Thanks,
Derrich
I followed the instructions and made the appropiate changes, but i still can't see any mkv files listed (or ogg files for that matter) on my ps3. i just upgraded my ps3 to firmware 2.50 before i tried this, perhaps that's the problem. Anyone else here has any experience with firmware 2.50? That is, before i spend a week trying to get something to work that is impossible.
just read on the mediatomb forums that someone upgraded to 2.50 and nothing seems to have broken or fixed, so that's not the problem.
noromamai: Try adding this to your config.xml
<mimetype-contenttype>
<treat mimetype="video/x-matroska" as="mkv"/>
And then remove your video files from the library and rescan your directories. I was having the same problem as you, and after I did this the files started showing up.
thanks loki,
i rescanned and nothing changed, then i removed everything like you suggested and readded all the media files and now it works. now all there is left is to get ogg working (following the instructions online doesn't work, forcing ogg to list as musictrack will make them show up as pcm, but still not play) and hack something so the mkvs will play with subtitles.
Thanks for all this information! I already had Mediatomb up and running, but getting the transcoding working was beyond me. Now, some of my .mkv's will play, others won't, and the ones that do are very choppy, playing about 3 or 4 seconds at a time, pausing, then continuing.
I assume this is a matter of adjusting buffer settings, but so far I haven't noticed any difference when I increased or decreased the numbers in the config.xml.
Also, when I try to play a .flv file, I'm getting this error:
INFO: Arguments: -I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit
dyld: Library not loaded: @executable_path/lib/vlc_libintl.dylib
Referenced from: /sw/bin/vlc
Reason: image not found
Any ideas on what I can try there? Thanks again for this info, I feel like it's within my reach! :) Thanks.
Saw on http://soowei.com/2008/11/27/streaming-mkv-in-mediatomb-to-ps3/
In case of 5.1 audio you can forward the sound directly to the PS3 to delegate the sound treatment. Can optimize a littile bit the ressource of the mediatomb server.
If you have a bloody Debian (like me) you can update your ffmpeg on http://debian-multimedia.org/ to get the mpeg2video format. But be careful you won't be able to use the mediatomb package anymore because of ffmpeg version conflict. I've used the static version of mediatomb from their website.
Have a nice day and happy easter ;o)
Excellent instructions! I was off watching videos on my PS3 in minutes :)
Followed all the steps and successfully compiled and installed GM http://file.sh/gnome+torrent.html , but while adding it to a panel I get the hit to enable it via preferences. So I click preferences which show me a minimal dialog, resizing this the dialog doesn't contain any widgets (settings). Help...