Sunday, September 27, 2009

Latte art 27

Poured 27 Sept 09 -- Rosetta.

I finally have my camera, so after a long break I was able to snap a shot of some latte art. Great timing, because this might be my best one yet :)


Wednesday, September 23, 2009

Start your Mediatomb transcode where you want!

One issue with using Mediatomb and transcoding to watch videos on the PS3 is that, if your network cuts out, the video stops, and you have to start all over again. Oh yeah, and Mediatomb doesn't support fast-forwarding for transcoded files.

Luckily, both programs I've been using to transcode support a "start offset" setting. For VLC, the commandline flag is "--start-time" and for mencoder it's "-ss".

Sure, we could edit our transcoder script every time we want to start somewhere other than the beginning, but that's a pain in the butt, especially if it's in a write-protected directory and you have to sudo.

Mediatomb + Mencoder

In my previous post on Mediatomb, I was using VLC to transcode the videos with the subtitles attached. This works the vast majority of the time, but sometimes the subtitles contain non-standard symbols, such as the curly quotes (They are the ones that are curved inward toward the text, unlike the standard quote symbol which is strictly vertical; I'm not sure what these are actually called) or an ellipses character, that you might see when using Microsoft Word. Unfortunately, VLC doesn't seem to support these characters (at least, my version doesn't) and instead of silently ignoring them, it leaves off any line containing them. Consequently, some shows end up with lots of un-subtitled parts, which can be a problem if I watch a Korean show, for example, as I don't know much more than the very basics.

What I'd been doing was using a script to temporarily strip out these characters into a separate file, keeping a copy of the original to be replaced fifteen or so seconds later, once the fixed file had been read. This works pretty well, but then of course you're often missing quotes, apostrophes and ellipses. Furthermore, this also sometimes failed miserably, resulting in the subtitle file being completely erased. In addition, I came across several videos that VLC simply refused to play.

My solution? Switch to mencoder. It was temporary at first, but now that I've uncovered the subtitle options and gotten them to display as I like, I'm much happier. So far, I've had no problems with videos not getting playing, and it even reads the characters that VLC choked on!

Enough talking, let's get down to business!

Tuesday, September 15, 2009

Using Thinkpad Dock Events

I've been using this for a while, but I always seem to forget to post up my coding stuff, so I thought I'd go ahead and throw this one up now.

If you don't know, I use a Thinkpad T61 laptop with one of their docks, into which I plug my external harddrives and mouse, etc. The nice thing about this is that it's really easy to just take out my laptop when I need it for class -- I don't have to unplug the ethernet cable, the usb drives, etc. one by one. The downside is that when I take it out, all of the entries in the Mediatomb database disappear! (I mentioned this in an earlier post when I discussed my Mediatomb config file.) Since I have the directories saved in the config file for Mediatomb, I need only restart the server to have it add them back in. But, it got to be a pain to call up a terminal and reset the server, so I decided to look into automation. Check out what I found after the break.