Posted tagged ‘htpc’

Adding subtitles in MediaPortal (or any video player) by piping CoreAVC through ffdshow

12/03/2009

coreavcffdshow

Like I have mentioned previously, subtitle support in MediaPortal is still pretty much broken, and so I thought I’d share my ideas on how to bypass this problem for now and still get subtitles for your favorite series and movies. (Or permanently, the ffdshow subtitles are pretty nice!) I was googling for a solution and found this interesting post on the topic. The entire idea is pretty simple – you let CoreAVC handle the decoding  and then when you’re down to raw video – ffdshow takes over and just adds the subtitles on top before showing the entire video on screen. The best thing is that you’ll still get the speed of CoreAVC! The process can be summarized in just a few steps.

Install ffdshow tryouts
I am assuming you already have CoreAVC installed, but if not you should start with that. After you’re done with that, download and install ffdshow tryouts. I’ve included a link to the exact version I used, but the newest release should also work wonderfully.

Configure ffdshow
ffdshow_setup
Start up the ffdshow configurator and start at the “Codecs” tab, make sure you scroll all the way down to “Raw video“, and select “all supported” – also make sure that the H.264/AVC decoding is set to “disabled“.
Now go to the Subtitles tab and enable them. The default configuration should work, but you can increase the size, font and colour to your liking.

Configure MediaPortal
mediaportal_config
MediaPortal does not allow DirectShow by default, and we want that to show the subtitles properly. Go to the options followed by Videos -> Video Player and make sure to enable “Automatic Decoder Settings” and that should be it. Similar procedures apply to other players that do not default to the DirectShow configuration. Something I noticed was that for some reason my video got brighter when piping through ffdshow, although only in MediaPortal. I tried to find some sort of setting that would magically change that but eventually just settled with reducing the brightness somewhat in the CoreAVC preferences.

And that’s all folks!

What, you thought it would be longer?

Building a HTPC Media Center Using Windows XP and MediaPortal

16/02/2009

user53582_pic234_1233029457MediaPortal running the Bleazle skin

As of recently, I hadn’t taken the step into a full-fledged HDTV experience. For me, the Xbox continued to serve as the best media center there ever was. But since my plasma is HD-ready at 720p, I decided it was finally time to upgrade.
784-athlon64
The PC
I had some old pieces from my former stationary laying around, and decided to build it into a HTPC! The motherboard was an old Socket 754 with an AMD Athlon64 3000+ running at 2ghz, which is really pushing it in terms of processing power when it comes to decoding h.264 (the most common video format used in conjunction with high definition video), but there was nothing to lose by trying either! So I put in 1GB worth of RAM and an ATI Radeon 9200se graphic adapter. I was lucky to have a TV with VGA in, so I didn’t have to use any form av HDMI/DVI adapters or the like.

coreavcwc9The OS and software
After installing Windows XP on it I immediately installed the windows port of XBMC, but was very sad to see that regular playback of a h.264-encoded 720p file was running the processor at a good 80-95%, and that’s without any excessive motion on the screen, unfortunately finding a hi-def video that tried to push the CPU to its fullest proved to be a difficult task, but it was pretty clear that the poor soldier wasn’t going to make it. I had heard of CoreAVC, and decided to see if it performed better, as I was told that it was a far more efficient decoder than the one mplayer (which is what XBMC uses for playback) was using. Unfortunately, XBMC does not support the use of CoreAVC, and so with a little tear in my eye I set out to find a suitable replacement. I was earlier told of a windows-only fork called MediaPortal, and lo and behold – the 1.0.0 stable release had just come out! The software installed nicely, and you could select CoreAVC as the renderer for h.264 content. Now MediaPortal has its own flaws – despite being a direct fork of the XBMC project it has no support for playback from uncompressed RAR files. Also, subtitle support is simply broken in this particluar release, as you can not change the color or the size of the subtitles (they’re really miniscule by default!) which is outright embarrassing for a big release like this. Performing new tests on the same videos now showed a CPU usage ranging from 40-60%, which was an incredible improvement, and at 7.95 USD CoreAVC was definitely worth the cost for bringing flawless 720p playback to an old struggling computer.

large

The remote control
A remote control is something no media center should be without. MediaPortal has  support for multiple brands of remote controls, amongst them the Windows MCE Remote. Since they’re discontinued I couldn’t find a Swedish reseller and so I looked on eBay for some knockoffs, but I was afraid that there might be something that prevented it from working and that I’d have a nice 20 USD paper-weight (which wasn’t even especially heavy!) After some inspection of the market I decided that a full-fledged wireless keyboard would be out of the question too, seeing as they started at around 80 USD unless you wanted the low-end models. I was briefly looking at the Ione Scorpius P20 but was told that it had very bad syncing issues, where the receiver would lose contact with the unit itself after reboots, which would be very difficult to tolerate in the long run. Finally I arrived at my decision, a resonably priced Logitech Cordless Number Pad! Not only is it a quality product, it actually has somewhat of a remote control form factor thing going on, and it’s pretty stylish, although several people have said that it “looks like a calculator”, which truth be told isn’t really a compliment!

remapping

Remap hell
I had some hopes that the pad would run in “no num-lock mode” and would simply convert the numbers to corresponding arrows which works great for controls in MediaPortal, but that was not the case. The solution Logitech has implemented is actually very brutal. If you don’t have num lock enabled the drivers enable them for a split second on any attached keyboards when you press a button on the unit, which you can notice as the num lock icon flashes briefly on the secondary attached keyboard. I tried using the MediaPortal configuration utility, but even after removing all mapping to the 1-9 keys it was still giving me trouble with using them as controls. After some googling I found that the easiest way would be to remap keys under windows, but the key mapping software I tried (not naming any names) did not work properly. Finally I stumbled upon the Windows Server 2003 Resource Kit Tools (mirror), which contained the wonderful Remapkeys.exe utility. Unlike the other software I tried this worked like a charm. Since my keyboard keys are named in Swedish the picture above might not prove useful to you, but I remapped the keyboard arrows to 2,4,6 and 8, space to 0 and the escape key to 5, which makes for basic operations in MediaPortal.

Conclusion
Building and setting up a HTPC is a very fun and interesting project, not to mention that it gives you access to some high-definition glory!