Wednesday, December 30, 2009

BluRay updates

Well, in the past month I've had a bit of a chance to play around with bluray playback, as well as doing an upgrade to MythTV 0.22 and a VDPAU capable graphics card.

The Upgrade

A big incentive for making the upgrade to 0.22 was to take advantage of some of the advancements that make BluRay playback better. At present time, no system is capable of software-based BluRay decoding without multithreading support, and unfortunately ffmpeg's current multithreaded implementation only works on some BluRay discs (a very small subset, based on my experiments). I was sick of having to spend an hour ripping a BluRay movie, only then to have to turn around a spend another several hours (5+ hours) transcoding to something that mythtv can handle in software.

With MythTV 0.22 and VDPAU support, I can now play nearly everything without having to do any transcoding. Full bitrate decoding is handled perfectly by the VDPAU card, and DTS-HD audio is handled by MythTV's included libraries. The only problem I've had so far was with a movie that used TrueHD for the master audio track. At present time, that results in unwatchable playback. However, I think that I'll be able to work around this without transcoding by simply extracting the core audio subtrack from within the TrueHD master track. That should work just great without adding to the ripping time. I'll post an update once I get around to testing it (such a small thing to test, but with all the stuff I've got on my MythTV todo list, small things don't necessarily get done more quickly)

Seektables needed for playback

One thing I forgot to mention before was that playing back an m2ts file doesn't work very well without building a seektable for the file. I wish that weren't the case, but luckily it's not a very difficult thing to do. A simple call to the mythtranscode program (don't aren't actually doing any transcoding) will generate the seektable for the m2ts file rather quickly. A 2 hour movie takes about 5 minutes to process on my system.

mythtranscode --mpeg2 --buildindex --allkeys --showprogress --video --verbose most --infile "$filename"

The one downside is that this leaves behind a 0 byte file that you need to delete. To deal with this, and so that I don't have to remember what parameters to use, I've written a shell script to handle this all for me. I simply call the script, pass it the filename, and it does everything.

Download the m2ts_buildindex shell script. here to read more!