Tuesday, May 26, 2009

Mediatomb -- Making it work

After I dual-booted my laptop with Linux Mint, there was just one thing that kept me booting back into Windows on a fairly regular basis. That is, I really enjoy watching Asian dramas. But, rather than watching them on my little laptop screen, I would much prefer to stream them to my PS3 so I can watch on my TV. In Windows, in combination with my SeriesTracker program, I would accomplish this using TVersity. In Linux, however, I just couldn't get anything to work right. I tried FUPPES with no luck whatsoever, and MediaTomb would stream, but wouldn't put the subtitles on for me like TVersity would.

Fortunately, after several tries, I discovered a solution. To save anyone in a similar situation to myself, I thought I would post my full settings, so nobody will have to surf Google for hours and mess around a lot like I did. Check it out after the break

Here is my config file (~/.mediatomb/config.xml):

Note of course that you'll have to change the information on how you store your data (I used MySQL because I happen to have a server running for various other stuff, but you can certainly just use SQLite). Also, I used the <autoscan> tag because my files are on an external harddrive, and I would have to re-add the folders every time I removed the drives and reconnected. This saved some headaches there.

Here's my transcribe script (/usr/bin/mediatomb-transcode-video):

Note here the two commented-out lines. Those run some scripts I wrote to clean up subtitle files that have non-printing characters in them, as those cause VLC to skip that whole line -- a problem when you don't speak very much Korean! I'll probably post those later.

Also, there's a variable START_OFFSET which is interesting. MediaTomb has an unfortunate problem where you can't probably pause/play or, well, anything when using PS3. So, if your router is crappy, as mine is, and your network gets interrupted while you're watching a show, which it has to me, you'll be able to change this variable and start the stream again, starting where you left off. It is in SECONDS. Also, don't forget to set back to 0 when you're done.


No comments:

Post a Comment