shallway
21st July 2005, 10:27
I compress a video clip by using x264_vfw codec to a avi file from the virtual Dub. I find that a first frame is a I frame. After "00dc" ,the hex data is below:
---------------------------------------------------------
90 02 00 00 00 00 00 01 06 05 7f dc 45 e9 bd e6
... ...
80 00 00 00 01 67 42 00 28 9a 74 0a 05 34 20 01
e8 48 20 01 e8 48 10 80 00 00 00 01 68 ce 3c 80
00 00 00 01 65 88 80 20 00 2d 7f ff e1 e8 a0 00
20 b1 e4 ... ...
---------------------------------------------------------
the first segment between two "00 00 00 01" indications is the SEI, and the second and third are available for the ffdshow decoder. I found that when I convert the avi file to mp4 file by mp4creator the I frame's head data has been changed, the "00 00 00 01" indication has chenged to the length of the following segment, for example the first " 00 00 00 01" --> "00 00 00 83" and the second and third segment have been erased, the fore 4 bytes are below:
----------------------------------------------------------
00 00 00 83 ... ...
----------------------------------------------------------
when I intercept the frame data from the mp4 file and pass it to the ffdshow h264 decoder(libavcodec.dll) through the ICMDecompress() func, and it return -1 that showes the data is not available. when I intercept a complete I frame from the avi file that begin with the "00 00 00 01" indication, the decoder can work correctly.
I guess that the input data is not availabe for the decoder. Who can help me to explain the "vol" of the head of the I frame and which "vol" format that the decoder can recognizied.
Thank you very much!!!
---------------------------------------------------------
90 02 00 00 00 00 00 01 06 05 7f dc 45 e9 bd e6
... ...
80 00 00 00 01 67 42 00 28 9a 74 0a 05 34 20 01
e8 48 20 01 e8 48 10 80 00 00 00 01 68 ce 3c 80
00 00 00 01 65 88 80 20 00 2d 7f ff e1 e8 a0 00
20 b1 e4 ... ...
---------------------------------------------------------
the first segment between two "00 00 00 01" indications is the SEI, and the second and third are available for the ffdshow decoder. I found that when I convert the avi file to mp4 file by mp4creator the I frame's head data has been changed, the "00 00 00 01" indication has chenged to the length of the following segment, for example the first " 00 00 00 01" --> "00 00 00 83" and the second and third segment have been erased, the fore 4 bytes are below:
----------------------------------------------------------
00 00 00 83 ... ...
----------------------------------------------------------
when I intercept the frame data from the mp4 file and pass it to the ffdshow h264 decoder(libavcodec.dll) through the ICMDecompress() func, and it return -1 that showes the data is not available. when I intercept a complete I frame from the avi file that begin with the "00 00 00 01" indication, the decoder can work correctly.
I guess that the input data is not availabe for the decoder. Who can help me to explain the "vol" of the head of the I frame and which "vol" format that the decoder can recognizied.
Thank you very much!!!