MediaTomb 12 on Debian 5 for DirecTV MediaShare/DLNA
- December 24th, 2009
- Posted in Linux . Software
- By Jason Zerbe
- Write comment
I have been trying unsuccessfully for the past couple of months (on and off) to stream content from my home Linux servers to several DirecTV HR20-700′s. This latest attempt, actually worked and I wanted to document my exact setup as no other literature has done.
Stuff you need:
- Debian 5 installed on a computer with ~ 1GHZ CPU, 256MB RAM, hard drive with media content on it
- reliable Internet connection
- a DirecTV HR2x
Here are the exact commands you need to run, I’ll explain them later.
apt-get update
apt-get upgrade
apt-get -y install screen vlc vorbis-tools mpg123 ffmpeg unzip subversion build-essential autoconf automake curl libexpat-ocaml-dev libsqlite3-dev libcurl-ocaml-dev libid3-3.8.3-dev libtagc0-dev libavformat-dev libexif-dev
svn co https://svn.mediatomb.cc/svnroot/mediatomb/trunk/mediatomb mediatomb
cd mediatomb
autoreconf -i
./configure
make
make install
cd
wget http://vraidsys.com/article-includes/mediatomb.zip
mv mediatomb.zip /etc/
cd /etc/
unzip mediatomb.zip
rm mediatomb.zip
mkdir /var/lib/mediatomb
chmod -R 777 /var/lib/mediatomb/
cd
mv /etc/mediatomb/mediatomb /etc/init.d/
vi /etc/init.d/mediatomb < -- change line so ethX reads eth0, eth1, or whatever your LAN network interface card is assigned to
chmod +x /etc/init.d/mediatomb
update-rc.d mediatomb defaults
The idea is that the default MediaTomb install found in the repos (version 11) doesn’t support transcoding quite right for the DirecTV HR2x. So we do an install from the repos for a bunch of dependencies for the latest code (version 12) that we then checkout from the project SVN repo. A new configuration script that I built is downloaded and installed. It has support for transcoding ogg, mp3, flac, flv, avi, mkv, mov, and a few other formats (pretty easy to add support for other formats check out –> http://mediatomb.cc/dokuwiki/transcoding:transcoding#directv_hr2x_transcoding).
MediaTomb will be automatically started on boot. It can also be stopped and started manually by: /etc/init.d/mediatomb stop or /etc/init.d/mediatomb start.
You can then go to the webui of MediaTomb and update your media library. –> http://hostname:49152/
This was super helpful thanks!
There are two things I came across that you may want to add.
1. The installation of mediainfo in order for the scripts on the mediatomb.cc site to work
2. The native version of FFMPEG on Deb 5 didn’t support the mpegts codec an is generally lame compared to the versions found on debian-multimedia.org
@Alan
Yeah the installation help on mediatomb.cc was getting me nowhere, so I just decided to cut my losses and start from square one. Although I did use the built-in ffmpeg version and just transcode to Mpeg-1.
To include support for custom Javascript virtual-directories; you need to install Mozilla’s SpiderMonkey. Do this before before running ./configure.
apt-get install libmozjs-dev libmozjs1dAnd then to use the custom virtual-directories, change <virtual-layout type=”builtin”> to <virtual-layout type=”js”>.
You can grab my custom import.js and common.js files: http://vraidsys.com/article-includes/mediatomb/
Finally copy these files into the /usr/local/share/mediatomb/js/ directory, after backing up the previous copies.
Looks great and I have followed it but I get an error in my browser “no items for file tags found”. Any ideas?
I continued to get that message after a new m3u playlist was loaded in. Just reload mediatomb and/or the host box.
Hello. Thank you for this article. I was able to get everything up and running on the first shot. The one issue I am having it the video is not being formatted to wide-screen ( 16:9 aspect ratio ). What settings should I edit to obtain this desired behavior?
@Jayson
It isn’t a matter of the transcoding being an issue, but the client. When I watch from my Wii, PS3, or PC the aspect ratio is just fine. But what I have found is that whatever aspect ratio that last show you were watching from the List/Live TV, will be the aspect ratio you will get while using MediaShare. I suppose you could try to jimmy around with the scripts to force 16:9 viewing [post on DBSTalk.com].