[Ffmpeg-devel] XMV Decoder

Benjamin Larsson banan
Mon Oct 10 15:55:35 CEST 2005

Hi, I was wondering if you have made any progress on the XMV demuxer ?

Benjamin Larsson

James Slater wrote:

> Hi,
> I'm writing a demuxer for the XMV video format used by many Xbox
> games. After examining some sample files I've worked out the basic
> structure of the format and have some of them decoding (almost)
> correctly in ffmpeg.
> The file structure is entirely new as far as I can tell, but the video
> data is WMV2 and the audio either PCM - in most of them - or a custom
> ADCPM variant that I haven't devoted any time to yet.
> Two questions:
> 1. For some reason the WMV2 data appears to be stored byte swapped, so
> after each get_buffer I am currently doing bswap_32 on every four
> bytes. Is there a more sensible way? Can anyone think _why_ the data
> might be stored in this way?
> 2. The header seems to contain the same fields as the normal WMV2
> extradata, but in a strange order - after figuring that out last night
> I quickly wrote this:
> hack[2] = get_byte(pb);
> hack[3] = get_byte(pb);
> hack[0] = get_byte(pb);
> hack[1] = get_byte(pb);
> Each _byte_ then needs reversing. The whole thing is then passed to
> the WMV2 decoder as normal extradata.
> ff_reverse isn't in libavformat so I had to put my own in for the
> moment. Am I doing this in the wrong place or could the bit
> manipulation functions maybe be moved to libavutil?
> Thanks,
> James

More information about the ffmpeg-devel mailing list