layplay from mjpegtools 1.3 Beta 3 won't play MJPEG
AVIs (software playback) created under Windows with
either the Morgan Multimedia or MainConcept (MainActor)
MJPG CODECS. They play fine with xanim. lavplay reports
"Huffman table 0x00 wasn't defined".
Ben
Logged In: NO
I'll look at the lavplay source when I have a little time,
but maybe you're just expecting the AVI frames to include
the huffman tables?
The MJPG spec. (actually there are two - Microsofts and
OpenDML's) says that MJPG AVI's use an implicit huffman
table (built into the encoder/decoder) to save space.
Logged In: YES
user_id=50127
Hmmm.... the usual MJPEG mess...
Let me know if you find anything. A good test is to
try lav2yuv as it uses the JPEG libs in a much less
hacked-about form. If that works and lavplay doesn't
the reason will be the optimisations.
Any URL's pointing to the current specs would be much
appreciated!
Logged In: NO
I don't remember where I got the MS & OpenDML MJPG specs,
but they're pretty small - I'll e-mail you them when I get
home.
I've just built my own test MJPG codec, based on libjpeg
(jpeg-6B) for an AVI framework I've written, and it turns
out there are a few issues here:
1) The "Huffman table 0x00 wasn't defined" error is because
libjpeg doesn't assign the default huffman tables for
decode! For encode it's done in the set defaults call, but
for decode they're not initialized and it therefore relies
on them being present in the AVI. Since the MJPG specifies
that they should NOT be present in an MJPG AVI, you need to
copy the default table setup code and call it when you
initialize the decoder.
2) The Morgan Multimedia and MainConcept CODECs both require
the extended bitmapinfo header (AVI "strf" chunk for the
video stream) to be present with the jpeginfoheader as
defined by microsoft.
3) The MM and MC codecs only work for 4:2:2, not for 4:2:0
YUV
4) The MM and MC codecs, contrary to the spec, do require
the huffman tables to be present in an AVI for them to be
able to play them. I havn't fully explored this - it may be
they just need them in the first frame.
Ben