View Single Post
Old 26th May 2016, 15:00   #1  |  Link
pyrisurfer
Registered User
 
Join Date: Apr 2012
Posts: 8
Extract m2v from custom video container

I'm sorry if this is in the wrong section, but I didn't know where else to put it.

I've got a few ".video" files, containing an I-Frame only MPEG2 stream. They all begin with an 8 byte header containing something like 0x56484D32 ("LAV09 "). After that a 40 byte long syncword followed by the MPEG-Header of the first frame. There is a syncword before each frame.
For some reason there are also Sequence End Codes scattered across the video stream.

I have now written a small Java tool which removes the header, the syncword and the SECs. However the output is somewhat unsatisfying. The resulting m2v can be played flawlessly in Windows Media Player and pretty much everything that is using hardware decoding. But there are problems with VLC and DGIndex.
Both those programs show flickering at the bottom half of the picture, which seems to increase along with the complexity of the image. DGIndex additionally shows a lot of "block errors", several "picture errors" and wants to fix a few field order transitions which (no matter if you fix them or don't) introduce a few glitches at theses points.

Here are a few examples:
https://dl.dropboxusercontent.com/u/...uxed%20(2).m2v (~50 MB)
https://dl.dropboxusercontent.com/u/...Transition.m2v (~1 MB)
https://dl.dropboxusercontent.com/u/...stFrames.video (~1 MB)

The .m2v files were cut out of a processed m2v stream using DGIndex. The .video file contains the first 24 frames directly out of one of the unprocessed source files (cut out with a hex editor).

I possess only rudimentary knowledge about the technical side of MPEG files, so I hope someone here can help me figure out what I'm missing.
pyrisurfer is offline   Reply With Quote