Understanding VCD DAT frames format

greenspun.com : LUSENET : Video CD : One Thread


If I want to write a program using VB or C to extract part of VCD or MPG. Is it possible? If yes then where do I will find the information on it. Coz I do not know how to search frames in the dat or MPEG.



-- Prashant (write2prashant@forindia.com), September 13, 2001


That software already exists. It's called TMPGEnc. You can load an MPEG file, view thru it to determine what to cut out.

-- ktnwin (ktnwin@excite.com), September 27, 2001.

Yes it is possible to write in C or VB.You should know dat and mpg formats. you need to write your own functions to capture FRAMES of vcd. file BITWISE AND and leftshift right shifs operations in C language will help you to capture vcd frames.


-- rk (x@x.com), October 10, 2001.

Sure it is possible. You might use open source mpeg decoders as reference. However, you will need steep understanding of MPEG 1 Systems structures since you may want to take care not only of video but also of audio sectors. For example it is relatively easy to search for the Sequence Header of MPEG 1 video containing the picture size and so on ( hex value 000001b3). Generally MPEG has 5 zeroes as start code indication (b3 is Sequence Header, b8 is Group of Picture Header). The MPEG encoding on a DVD ensures a Sequence Header before an Intra Frame Picture ( a Still Picture which can be separated from the stream) so it is quite sure that the following picture (picture start code 0x00000100) will be an Intra Frame. For VCD you need to analyze a few bits following the picture start code to distinguish the picture type.

Well, it is relatively easy to look up audio or video sectors in the raw area of a sector but if you want to do editing on a VCD you need to understand the Sequence Header/ Intra Frame positioning for video and the Frame Header positioning for audio first.

-- Axel (Axel.Kochale@ieee.org), November 07, 2001.

Moderation questions? read the FAQ