kamiwa's Blog


Dr. DivX Beta 6 available

Nah, it still ain't finished, but I managed to fix some obvious bugs, as there were:

  • Dr. crashed, when you had defined a custom profile and under preferences had made it your default profile. I'm not sure, but I think that a few other ones were related to this one. At least after I had squashed that one, a few others magically disappeared. For example Watch Folders are working here again!
     
  • The full size video preview wasn't working anymore. Fixed that one as well!
     
  • Updated a few german and russian translations.

There's still more to be done, but as this bug-fix seemed to have improved stability quite a bit here, I felt I should give you another interim release!

There's a new installer available on SourceForge. Source for anybody wanting to help is here.

DivX Connected: Another hack

As I already said here there is no way of getting the Haali Splitter to split MPEG-I files. So what we would need is another splitter.

The only two splitters freely available for splitting MPEG-I I could find are MPEG-I Stream Splitter, which is included in quartz.dll, the central library of the Microsoft DirectShow installation and Gabest’s MPEG Splitter.

Unfortunately both of them confront us with a new problem. The original Microsoft filter additionally needs a file source filter which it then can connect to. This would mean we’d need to insert two filters to the demuxer section for one media type, which we can’t.

Gabest’s MPEG Splitter comes in two variations, as MPEG Splitter (same problem as with the MS filter, it additionally needs a file source filter to work) or as a combined MPEG Source / Splitter filter which is actually the same way as Haali works.

Unfortunately the filter from Gabest will always create an output pin for subtitles, even if the media file doesn’t contain any subtitle streams. It seems that the Connected Server software doesn’t like that fact, and doesn’t know how to deal with this pin and thus will fail.

In other words, it seems that we’re in general pretty much limited to media that can be dealt with by the Haali splitter, as it is one of the few filters that comes as a source- and demuxer-filter combination.

This leaves us two possibilities: Either re-encode unsupported media to DivX or wrap your footage into the one container that Haali splitter originally was made for. And that is: MATROSKA!

The advantage of this solution is, that it is fast (a matter of two or three minutes for a 90 minute movie) and that video and audio will stay as they were, untouched. We only move them from one container format into another one. (It’s similar to unpacking a present from the manufacturer’s box and putting it into a gift box! The present will still be the same, but it’ll look nicer!)

So how’d you do that? Normally you’d use MKVMerge from MKVToolnix. Download it here!

For MPEG-I this unfortunately won’t work, as MKVMerge, prior to muxing your media into Matroska container, needs to split the files into it’s elementary video and audio streams. For doing this it relies on the Haali splitter. And as we already found out, Haali can’t split MPEG-I files.

Fortunately there’s gdsmux.exe! It comes with the Haali Splitter. You should find it under C:\Program Files\Haali\MatroskaSplitter .

Start it through double-clicking,  right click on its work area, "Add Source", set the file filter to "All files" and pick your MPEG file. Select your output destination by clicking on the “...” – button and enter a file name, ending with “.mkv”. Then click the “Start” -  button. A few minutes (or seconds, depends on your file size) you got a Matroska file that will play on your box like a cham.

@ae from www.connunity.com: This method should actually solve your VOB problems as well! It seems that your problems don’t come from the de-/encoding process, but from seeking in the VOB container. Haali’s support for Matroska is much better than for VOB. (You even have the choice! You can use MKVMerge or gdsmux.)

Allow me a personal comment: I know that for you guys this most likely will only seem to be a dirty hack. For me and and some others from the DivX forum, it means a wish came true:

DivX is finally going MATROSKA! Hooray!

Merry Christmas to you all!
 

DivX Connected: Getting ffdshow audio settings right

Remember I said, I couldn't get AC3 playback with ffdshow to work? Well, meanwhile I figured it out! So for those off you still having problems with AC3 here's what to do:

1. Delete the AC3 Filter from the config file and make Connected use ffdshow instead

Find the following section and get rid of it!

<decoder type = "audio">
  <
codecId>0x2000</codecId>
 
<driver>dshow</driver>
  <guid>
   
0xA753A1EC, 0x973E, 0x4718, 0xAF, 0x8E, 0xA3, 0xF5, 0x54, 0xD4, 0x5C, 0x44
  </
guid>

</
decoder>

Then find the ffdshow audio configuration section:

<decoder type = "audio">
  <codecId>0x50</codecId>
  <codecId>0x55</codecId>
  <codecId>0x706D</codecId>
  <codecId>0x20434141</codecId>
  <codecId>0x33706D2E</codecId>
  <codecId>0x5500736D</codecId>
  <codecId>0x4134504D</codecId>
  <codecId>0x50434141</codecId>
  <codecId>0x6134706D</codecId>
  <codecId>0xFF</codecId>
  <driver>dshow</driver>
  <guid>
   
0x0F40E1E5, 0x4F79, 0x4988, 0xB1, 0xA9, 0xCC, 0x98, 0x79, 0x4E, 0x6B, 0x55
  </
guid>
</decoder>

and add

<codecId>0x2000</codecId>

ffdshow section should now look  this.

<decoder type = "audio">
  <codecId>0x2000</codecId>
  <codecId>0x50</codecId>
  <codecId>0x55</codecId>
  <codecId>0x706D</codecId>
  <codecId>0x20434141</codecId>
  <codecId>0x33706D2E</codecId>
  <codecId>0x5500736D</codecId>
  <codecId>0x4134504D</codecId>
  <codecId>0x50434141</codecId>
  <codecId>0x6134706D</codecId>
  <codecId>0xFF</codecId>
  <driver>dshow</driver>
  <guid>
    0x0F40E1E5, 0x4F79, 0x4988, 0xB1, 0xA9, 0xCC, 0x98, 0x79, 0x4E, 0x6B, 0x55
  </
guid>
</decoder>

Save the config file!

2. Configure the ffdshow audio decoder for AC3

Start->Programs->ffdshow->Audio-Decoder-Configuration (translated from German, look for something that matches)

 

a) Make sure AC3 decoding is enabled
ffdshow-codecs.gif
b) Set the Mixer to Stereo Output

ffdshow-Mixer.gif

c) Set Output to 16 Bits

ffdshow-output.gif

d) Set processing to 16Bit

ffdshow-processing.gif

 

Click on Apply and then on OK. Ignore the Error message you might be getting when closing the configuration.

Now close DivX Connected Server, go to Windows Services and restart the DivX Content Management Service, restart DivX Connected Server and do a rescan. (If you want to be on the safe side, or don't know where to find the DivX Content Management Service, a reboot will do nicely here!)

Got it working? Hooray!

Merry Christmas and a Happy New Year to all of  you couch potatoes!

 

 

 

 

Dr. DivX Updated for DivX 6.8 Codec

Dr. DivX LogoHis heart is still beating! The Dr. has been updated to support the DivX Codec 6.8. Get the installers from the download page.

For interested developers, a compilable source is available on Sourceforge.net.

CREDITS :
=======

SeaBass without him kicking me in the butt it would have never happened
LordRPI for cursing with me about C++
d00kl1 for helping to find the code lines to alter

DivX Connected: More than „just DivX“

For several months now, I’ve been a beta tester of DivX Connected. For those of you, who don’t know what DivX Connected is, it is a small (size of a cigar box) electronic device that sits on your TV-set and via (W)LAN connects your network PCs to your TV, enabling you to play any DivX video you got stored on your PCs. Additionally it does work as MP3 juke box and slide viewer for your family photos.

For a few weeks now the box is out of beta and can be bought through Amazon. Here’s a link with more detailed specs.

For me the solution is just great. Finally I can access all my files without having to burn them on disks, can comfortably zap through the movies with the included remote control without having to move my bottom from the sofa to change a disk. I could have had all this by simply connecting my pc to the TV of course, but after a while the sound of the fans in the pc turned out to be quite annoying.

The offside of the solution was (apart from the fact that I put on even more weight) that I had lost the capability to watch my none DivX media. Well, thanks to an info that SeaBass from DivX “leaked” on the Connected forum, these days are over!

For the last two versions of the Connected server software, DivX had implemented support for Windows Media files. Could well be that this was their part of the deal with MS, who have recently announced that they are going to support DivX in the Windows Media Extenders. To support WMV the server application simply decodes the Windows Media files with the help of the corresponding Direct Show filters, on the fly re-encodes them to DivX and streams them to the box. Mission accomplished, here is support for WMV!

“So,” me* thought to himself, “what is possible for WMV, should be possible for other media formats as well!”

So first of all let’s take a look at the configuration file that SeaBass posted on the forum, to see how WMV support is configured (BTW: Shouldn’t it be there already, it goes to “C:\Program Files\DivX\DivX Connected\Bin\DivX Connected”.

Open the file in a text editor and you will see that it’s simply an XML file.

The first entry in the config section is a specification that describes a demuxer. A demuxer is the part of a DirectShow graph that is able to split a video into its elementary parts, normally a video and an audio stream.

<demuxers>
  <demuxer>
    <formatId>ASF</formatId>
    <formatId>WMV</formatId>
    <formatId>WMA</formatId>
    <demuxerGuid>
     
0x187463a0, 0x5bb7, 0x11d3, 0xac, 0xbe, 0x0, 0x80, 0xc7, 0x5e, 0x24, 0x6e
    </
demuxerGuid>
 
</demuxer>
</demuxers>

ASF, WMV and WMA are file extensions being used for Windows Media files. The GUID is a globally unique ID for the Microsoft’s WM ASF Reader filter that works as file source filter and demuxer for any Windows Media file. Globally unique means, you’re pretty save to use it anywhere on this planet, and it will specify this filter. Not sure though, what the Martians use!

So, if we wanted to use other files than Windows Media with our box, we would need something that can demux them. Probably the best demuxing filter around is Haali’s Simple Media splitter, as it supports splitting of almost any media file I came across so far. The Matroska (MKV) project relies on it as well. You can get it here. Download and install it.

But hey, what’s the GUID for Haali?

How do we find out? Best tool I could find is RadLight Filter Manager. It does list all filters that are currently installed on your system, and apart from offering the great opportunity to completely bleep up your computer’s Audio/Video setup it will tell you the CLSID (Class ID, other term for GUID) of each and every filter on your system. Get it here

If you’ve done like I told you and installed Haali’s Media Splitter, after opening RadLight, you should see a branch named DirectShow filters in the tree that it displays. Click on the plus-sign to expand it and scroll down to “Haali’s Simple Media Splitter”. Click on the entry and then click the Copy CLSID button.

If you paste it here, you’ll get {8F43B7D9-9D6B-4F48-BE18-4D787C795EEA}.

Hm. This looks different from what the entry for WM ASF Reader looked. Well, it is just a different notation really.

Remove the curly brackets and the hypens and you end up with
8F43B7D99D6B4F48BE184D787C795EEA

Now group the characters, to make them match the following scheme
8-4-4-2-2-2-2-2-2-2-2
=>
8F43B7D9 9D6B 4F48 BE 18 4D 78 7C 79 5E EA

Finally, to tell the system that these values are in hexadecimal notation, add a leading 0x (zero x) to each group and separate each group from the other by a comma.

You’ll end up with
0x8F43B7D9, 0x9D6B, 0x4F48, 0xBE, 0x18, 0x4D, 0x78, 0x7C, 0x79, 0x5E, 0xEA

Voila, that’s the GUID for our new additional splitter in a format that the XML file can deal with.

Now we only need to specify which file extensions we want to see supported by it. I added MKV, MOV MPG TS and VOB to my setup, as these were the files I wanted to be supported.

So the complete section for our new demuxer looks like this

<demuxer>
  <formatId>MKV</formatId>
  <formatId>MOV</formatId>
  <formatId>MPG</formatId>
  <formatId>TS</formatId>
  <formatId>VOB</formatId>
  <demuxerGuid>
   
0x8F43B7D9, 0x9D6B, 0x4F48, 0xBE, 0x18, 0x4D, 0x78, 0x7C, 0x79, 0x5E, 0xEA
  </demuxerGuid>
</demuxer>

As we don’t want to loose the already existent support for WMV, we add it to the already existent demuxer for Windows Media. So the whole demuxer block will now look like this

<demuxers>
  <demuxer>
    <formatId>ASF</formatId>
    <formatId>WMV</formatId>
    <formatId>WMA</formatId>
    <demuxerGuid>
     
0x187463a0, 0x5bb7, 0x11d3, 0xac, 0xbe, 0x0, 0x80, 0xc7, 0x5e, 0x24, 0x6e
    </
demuxerGuid>
  </demuxer>
  <
demuxer>
    <formatId>MKV</formatId>
    <formatId>MOV</formatId>
    <formatId>MPG</formatId>
    <formatId>TS</formatId>
    <formatId>VOB</formatId>
    <demuxerGuid>
     
0x8F43B7D9, 0x9D6B, 0x4F48, 0xBE, 0x18, 0x4D, 0x78, 0x7C, 0x79, 0x5E, 0xEA
    </
demuxerGuid>
  </demuxer>
</demuxers>

So we now implemeted the capability to demux our files. But in order to enable the server software to re-encode them to DivX, we need to decode them as well. Thus we need to add support for the according video and audio formats, that we want to play.

This could be a real PITA if we had to do this for each and every format. Fortunately there is a one in all decoder, you already might have heard of: ffdshow (Thank you DivX for making me look so bad on DivX Labs. Now I can proove what I’m really worth).

Get the latest tryout version from here (preferably get the latest nightly build from clsid) and install it.

To cut things a bit shorter:

The GUID for ffdshow video decoder is:
<
guid>
  0x04FE9017, 0xF873, 0x410E, 0x87, 0x1E, 0xAB, 0x91, 0x66, 0x1A, 0x4E, 0xF7
</
guid>

The FOURCCs (IDs) for the video formats we want to add support for are as follows 
DivX = DX50 (I needed it to support DivX video in Matroska container.)
H264 = avc1
MPEG-1 = MPG1
MPEG-2 = MPG2

So the block for the video decoder looks as follows:

<decoder type = "video">
  <codecId>avc1</codecId>
  <codecId>DX50</codecId>
  <codecId>MPG1</codecId>
  <codecId>MPG2</codecId>
  <driver>dshow</driver>
  <guid>
   
0x04FE9017, 0xF873, 0x410E, 0x87, 0x1E, 0xAB, 0x91, 0x66, 0x1A, 0x4E, 0xF7
  </guid>
  <module></module>
</decoder>

The guid for the ffdshow audio decoder is as follows:

<guid>
 
0x0F40E1E5, 0x4F79, 0x4988, 0xB1, 0xA9, 0xCC, 0x98, 0x79, 0x4E, 0x6B, 0x55
</
guid>

Here’s a usefull table to find the ID’s of the different audio codecs.

My audio decoding part looks like this (Supports MP4, MPA and MP3 iirc)

<decoder type = "audio">
  <codecId>0x50</codecId>
  <codecId>0x55</codecId>
  <codecId>0x706D</codecId>
  <codecId>0x20434141</codecId>
  <codecId>0x33706D2E</codecId>
  <codecId>0x5500736D</codecId>
  <codecId>0x4134504D</codecId>
  <codecId>0x50434141</codecId>
  <codecId>0x6134706D</codecId>
  <codecId>0xFF</codecId>
  <driver>dshow</driver>
  <guid>
   
0x0F40E1E5, 0x4F79, 0x4988, 0xB1, 0xA9, 0xCC, 0x98, 0x79, 0x4E, 0x6B, 0x55
  </
guid>
</decoder>

AC3 decoding gave me some grief. I couldn’t get it to work with ffdshow. Can be that it is due to my surround setup. So I additionally downloaded and installed AC3Filter from here.

So I got an additional block responsible for AC3 decoding.

<decoder type = "audio">
  <
codecId>0x2000</codecId>
 
<driver>dshow</driver>
  <guid>
   
0xA753A1EC, 0x973E, 0x4718, 0xAF, 0x8E, 0xA3, 0xF5, 0x54, 0xD4, 0x5C, 0x44
  </
guid>

</
decoder>

Put these three decoder blocks (ffdshow Video, ffdshow Audio and AC3Filter) into the decoders section and you should be done.

If you prefer to try for yourself, if you can get AC3 to work with ffdshow,  just take the <codecId>0x2000</codecId> line and add it to the block of codec ids supported through ffdshow. In that case you can then delete the complete AC3Filter decoder block.

A few hints for ffdshow and AC3Filter configuration should you have troubles getting it to work.

- Ensure that the audio output of the filter is set to stereo.
- Limit the output sample rate to 16Bit PCM
- Disable all audio/video postprocesing filters
- Make sure, that the codecs you are using through ffdshow aren’t disabled

And most off all, don’t try to do this on a 8.5 MHz XT CPU! Remember the server needs to transcode your videos on the fly to DivX!

For those of you, who hate typing as much as I do, here’s the modified config for download. It works on my setup. Doesn’t necessarily mean it'll work at your place!

Now, send the kids to play and the wife to do some shopping. Happy hacking and most of all enjoy the show.

Have a nice weekend!

P.S.: Thanks to the guys who made all this possible. You're my heroes!