PDA

View Full Version : Divx dvd player replacement


dukey
25th October 2008, 14:37
So my divx dvd player has served me well for many years. However it won't play any of the new formats, h264, mkv container, etc.
So I built myself a HTPC out of a broken pc I had with a p3 3.4gig (shuttle). Only has minimal hdd, minimal ram, no internet or lan or wireless connection. Bought a ati x300 gfx card for it. £10 second hand off ebay. Gfx card is new enough to support shaders, but crap enough not to need a fan, or extra power connectors.

The next task get some nice software running on it. There are quite a few nice media centre solutions. Xmbc looks real nice, but it doesn't support directshow. Since it doesn't support directshow can't use coreavc. Since the pc I have is only a single core, coreavc is about the only thing fast enough to decode h264 on my pc. So the software must be directshow. Some of the other media centre solutions which use directshow use vrm7 or 9, and those renderers suck badly. They fail to render some of the YUV colour spaces properly, messing the brightness up.

So anyway .. to cut a long story short. I spent the last week in the evenings writing my own media centre solution. I wrote a renderer for direct show using opengl. It currently only accepts RGB 24, which means it ridiculously easy to support, since I can just pass a pointer to the data to opengl and it will render it directly. No processing needed. Also it means that the decoders will do the colour space conversion so I don't have to worry about having to do it correctly myself for each type. Then I wrapped a simple GUI around it. It looks like this atm.

http://img72.imageshack.us/img72/251/ianshtpcsv9.png

It currently plays just about anything that directshow will play, ie whatever codecs etc you have installed. Still got quite a bit of work to do on this, need to add some features to the renderer so you can see the current playing time etc on the video and whether the video is paused or not. And need to add remote control support. The software library LIRC looks promising, and an infa-red reciever for pc looks cheap to buy/build. My goal is to use the same remote control I use for my current divx dvd player.

Oh yeah, I also wrote some stuff to slow down the dvd drive, so when you are watching films off DVD, the drive won't be spinning at full speed making insane amounts of noise. Theres some nice api in windows where you can send raw atapi commands to the drive to do this.

So, dunno if anyone else is interested in this project. Maybe I'll just keep it for myself, maybe I'll try and sell it, maybe I'll open source it. I dunno, just depends if anyone else is interested i guess :)

avih
26th October 2008, 02:53
Nice!
Keep us posted :)

dukey
28th October 2008, 19:56
well it plays video :o
http://img523.imageshack.us/img523/6948/ianshtpc2ct8.png

Right now its somewhat hard coded to use the resolution 720x576 since that is the resolution i am using on my htpc. (Only an old tv .. :o)

The renderer now supports RGB24 and RGB32 so it's a little more compatable. I think rgb32 is somewhat faster. The renderer needs the opengl extension GL_TEXTURE_RECTANGLE, which I *think* is present on geforce2mx cards and radeon 7000 or so. So the requirements are pretty low :o.

I need still to do some work on the GUI, red text is practically unreadable on my tv.

dukey
7th November 2008, 02:31
So,
done a bit more work on this ..
Added some nice cd control.
If you want to load off CD it should automatically detect this and send a command to slow down the CD drive set a max read speed of say 4x. So you can watch films without disc spinning like mad. This settings lasts on the drive until you reboot, or close the program, whichever comes first.

theres a ini file which has the line
rootFolder=d:\
Set this to your cd/dvd drive of choice .. or a network drive maybe.

If it comes up with some crazy error on loading, install the visual studio run time libraries, i included them in the zip file. They are needed for some quite a few programs anyway, and will probably already be installed.

It should play whatever directshow can play. Ie i can play mpeg2, divx .. h264, ac3 files etc ... :)

Really pleased with this so far, works real nice on my tv. Just need to sort out remote control support.

IanD
30th November 2008, 06:03
It's quite impressive what you are doing, but can you briefly describe the advantages over say MPC-HC which can utilise CoreAVC and other directshow filters?

I'm guessing it's mainly the renderer, as MPC only uses the standard Microsoft renderers.

dukey
30th November 2008, 11:19
um
MPC-HC is a cool media player for your pc and on your desktop .. it draws the menus etc in win32, and uses any of the microsoft or haali's renderers.

Um, mine is rendered entirely in opengl, and has a big easy to see menu which u can control entirely with the keyboard .. and hopefully soon a remote control.. which is cool for my living room pc :o

I don't know what else to say really :)