VOGONS


First post, by Roxor

User metadata
Rank Newbie
Rank
Newbie

This bug appears to affect the ZMBV codec that comes with the Windows version of DOSBox 0.65.

Encode a video file with DOSBox under x86 Windows - File plays correctly with the ZMBV codec.

Encode a video file with DOSBox under x64 Windows - File played with the ZMBV codec has the red and blue in the pallete swapped.

Evidently this bug only seems to manifest itself under x64 Windows, suggesting that x64 Windows may have trouble handling the output from the codec.

Reply 2 of 16, by Roxor

User metadata
Rank Newbie
Rank
Newbie
Kronuz wrote:

Hey, how did you manage to get ZMBV running under Windows x64!! ?

Some fiddling around with my codec pack's settings and a lot of luck. By default ZMBV is disabled in the K-Lite Codec Pack's settings even if you've installed it through the link supplied with DOSBox.

Reply 4 of 16, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Is there an official site where the latest version of ZMBV is maintained?

An interesting page: http://wiki.multimedia.cx/index.php?title=Dos … x_Capture_Codec

Reply 6 of 16, by Kronuz

User metadata
Rank Member
Rank
Member

I've tried to make it work in Windows x64 without any luck... could someone post more specific details on how to get it going working please? 😜
Thanks. 😁

Kronuz
"Time is of the essence"

Reply 7 of 16, by jbprime

User metadata
Rank Newbie
Rank
Newbie

In XP x64, after I installed the ZMBV codec using the DosBox link, I couldn't get the videos to play. I poked around in my registry a bit and tried to mirror the registry entries of my Divx codec (had to update a drivers.desc registry key and something under ControlSet002), but I'm more inclined to believe I fixed it by copying the zmbv.dll file from my Windows/System32 folder (where it installed) my Windows/SysWOW64 folder. I'd try copying the file first before messing with the registry.

Reply 8 of 16, by Kronuz

User metadata
Rank Member
Rank
Member

It seems the ffdshow zmbv decompression is inverting the blue with the red decoding pixels as BGR instead of RGB. I think that's the problem... perhaps the ZMBV "specs" say something about the pixel encoding format?

Kronuz
"Time is of the essence"

Reply 9 of 16, by Kronuz

User metadata
Rank Member
Rank
Member

Okay, I've fixed the libavcodec that comes with ffdshow...
I'm attaching a patch here, but I'll also send an email to the libavcodec guys to see if they can fix the issue in their source code too.

Although, honestly, I think the bug is in not in the ffdshow zmbv implementation but in the one we're using...
zmbv.cpp file, lines 491-493 are:

  *w++=palette[c*4+2];
*w++=palette[c*4+1];
*w++=palette[c*4+0];

I think they should be:

  *w++=palette[c*4+0];
*w++=palette[c*4+1];
*w++=palette[c*4+2];

Anyway, for a fix in the ffdshow, just copy and apply the patch to wherever the libavcodec.dll file is...
It should be in:
C:\Program Files\K-Lite Codec Pack\ffdshow

(or something like that)

Attachments

  • Filename
    libavcodec_ZMBV_fix_by_Kronuz.zip
    File size
    40.35 KiB
    Downloads
    3351 downloads
    File comment
    libavcodec ZMBV fix
    File license
    Fair use/fair dealing exception

Kronuz
"Time is of the essence"

Reply 11 of 16, by dissonant

User metadata
Rank Newbie
Rank
Newbie

This looks like a pretty old thread, but I'm stuck. I still have the red/blue colour inversion.

I tried the patch, but it says: No matches found or file(s) already patched. I'm using K-Lite Codec Pack 2.85, which seems to have a libavcodec.dll file that's newer than this thread. I'm using plain old Windows XP SP2.

Any updates or ideas?

Edit: Well, I got it to work by uninstalling K-Lite and installing the latest Defilerpak beta. Then installing ZMBV after that. Hooray!

Reply 12 of 16, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Yep, never install klite again. It always does weird crap like that.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 13 of 16, by Roxor

User metadata
Rank Newbie
Rank
Newbie

You might find this shader for Media Player Classic useful:

15=red-blue swap|ps_1_1|sampler s0 : register(s0);\nfloat4 main(float2 tex : TEXCOORD0) : COLOR\n{\n\tfloat4 c0 = tex2D(s0, tex);\n\treturn float4 (c0[2],c0[1],c0[0],0);\n}

Just add this to the end of the shader list in mplayerc.ini and change the number 15 at the start to something else if your list of shaders doesn't end at 14.

When playing a video file where the red and blue are swapped, just load up this shader, and PRESTO! Problem solved.

Reply 14 of 16, by romantic

User metadata
Rank Newbie
Rank
Newbie

Currently running fully updated Windows XP SP2 and too got problems recording with the “zombie” codec. Tried out all I could think of and the forum stuff – nothing has helped, so I tried reinstalling some programmes and eventually made it work, though in the Prince of Persia I the arrows at the bottom left of the screen while viewing recorded game now look not so sharp as before (even at low resolution there appear squares, rather than arrows, and in the same time arrows at the bottom right look fine).

Anyway here what brought right colours back in my case: first I have uninstalled the DOSBox and the ZMBV codec, then uninstalled the K-Lite Codec Pack which had informed me that the ZMBV codec was broken and prompted to remove any sign of it from the registry, which I of course agreed to. Then I installed the DOSBox again without installing the “zombie” codec and then installed K-Lite Codec Pack 3.5.3.

At present I’m able to capture right coloured video from the DOSBox without installing the ZMBV codec (which comes with it) at all. Although, when playing recorded videos with Media Player Classic from the K-Lite Codec Pack 3.5.3, the arrows in the bottom left of the monitor appear blur, after encoding video files into .mpg format, the arrows looks very sharp even in the full screen mode. The arrows remain sharp also after encoding the .mpg file into .vob or .avi one.

Hope this information will be helpful. In case you have questions, feel free to post them, and I’ll lay out some more details.

To be happy, just make the others feel the same way!

Reply 16 of 16, by romantic

User metadata
Rank Newbie
Rank
Newbie

As far as I’m concerned the K-Lite decoder is not bugged, but the KMPlayer one may be. Since my last post I’ve messed around with codec a little bit more and solved the problem with sharpness during playback on the Media Player Classic.

The thing which no one messing with codec should ever forget is not to mix together different codec patches, that is installing one and only one version of the same codec at a time.

My mistake was mixing together the ZMBV codec from K-Lite Codec Pack and the same codec from the DOSBox single codec patch. Because during playback the Media Player Classic uses codec not only from its internal directory, but also from the “system32” system folder, the conflict occurs as DOSBox ZMBV codec installs itself in the “system32” folder, and as a result the Media Player Classic try to use for playing back of the video files two ZMBV codec at the same time. That’s why if someone tries to play the same video encoded by DOSBox “zombie” codec on the Windows Media Player which doesn’t have a ZMBV codec of its own, but uses only the one installed in the “system32” folder, the colours will show up right. Unlike the Media Player Classic and the Windows Media Player, the KMPlayer uses codec only from its internal directory, and that is why it doesn’t get affected by the DOSBox ZMBV codec installed to “system32” folder.

Other important thing is that DOSBox encodes video with right colours no matter what, because it uses for encoding video files not the ZMBV codec installed to “system32” folder needed only for playing back recorded videos, but built in ZMBV codec, just like the KMPlayer uses only built in codec for media files playback. To check if it’s true, try not installing the DOSBox “zombie” codec – you will still be able to capture videos and to play them with right colours on the Media Player Classic, as I did (but you won’t be able to play videos with the Windows Media Player, because it does not have a ZMBV codec of its own). The only problem will be the rather bad sharpness, which can be solved simply by not installing the ZMBV codec which comes with the K-Lite Codec Pack.

To do that, while installing a K-Lite Codec Pack, make sure to deselect the function of playing the ZMBV and a few other codec at the bottom of the last window before starting the installation, since you won’t be able to disable this codec after installation is completed. After installing a K-Lite Codec Pack go to its “Video decoder configuration” and check if ZMBV codec is disabled, if not reinstall the Codec Pack and deselect the ZMBV codec playback function. In this way, for playing back videos encoded with a ZMBV codec, the Media Player Classic and Windows Media Player will use the ZMBV codec supplied by the DOSBox after you install it to the “system32” folder, and the video will be coloured and sharp at the same time.

To be happy, just make the others feel the same way!