[FFmpeg-devel] [PATCH] Demuxer for Leitch/Harris' VR native stream format (LXF)

Tomas Härdin tomas.hardin
Fri Aug 27 17:00:39 CEST 2010


Attached you'll find a demuxer for the format used by Leitch's video
servers. It's called the "VR native stream format", but more commonly
known as LXF for some reason. AFAICT it appears to be memory dumps from
said hardware.

The demuxer is based mostly off of my own reverse engineering efforts
and some documentation for a related API to fill in the gaps. I might
post my results on the wiki if anyone's interested (I need an account
first though).

Some limitations and quirks:

* VBI data is not handled, but skipped. I'm not sure how it should be
implemented. I also have no samples with such data

* There is at least two kinds of undocumented metadata (in the header
and next to the VBI data) which I also ignore

* PAL/NTSC is detected by checking the number of samples in the audio
packets. For PAL this is always 1920. For NTSC it uses one audio frame
per five video frames, so it is always 8008 samples

* Audio is stored in a planar fashion and is always 48 kHz. The audio
data is de-planerized by the demuxer

* 16-, 20-, 24- and 32-bit PCM is supported. I doubt there are any files
in the wild with any other sample depths. 20-bit PCM is in-place
expanded to 24-bit by the demuxer (the top 4 MSBs are copied to the
bottom 4 LSBs)

* It is possible for a packet to not contain data for all channels (it
uses a bitmask). In that case I'm not sure how to behave - probably
output silence for those channels

* No support for seeking. Using pkt->pos would probably work for seeking

* The format supports B-frames but the demuxer does not. So far I have
not received a sample the uses them, and the documentation regarding
them is limited

I uploaded a sample to the FTP in /MPlayer/incoming/lxf called
1sec-dv25.lxf. I contains one seconds of PAl DV25 video and 48 kHz
16-bit stereo PCM audio. I'm waiting for an OK to upload some MPEG-2
samples with 4-channel 20-bit and 24-bit audio as well. I have no NTSC

I bumped the minor version, added a Changelog entry and an entry in the
table in docs/general.texi. I also copied the copyright boilerplate and
added put my name in it.

I ran make test just in case, which of course worked fine.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxfdec.patch
Type: text/x-patch
Size: 14363 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100827/299ce9c3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100827/299ce9c3/attachment.pgp>

More information about the ffmpeg-devel mailing list