Monday, January 28, 2008

MPEG4 .m4v file ( it is in raw format

Transport Stream :
----------------------
we opened the .mp4 file in a GraphEdit , 1.Dumped the MPEG2VideoInfo's dwSequenceHeader in to a file.
BYTE* pbData = (BYTE*) dwSequenceHeader[0];
cbSequenceHeader is having the size of the header. 2. Dumped the Encoded data in to a file.
Now we are creating a new file by merging a header and Encoded content.and Named it as .m4v , we can play this file in a media playerotherwise name it as .bits and we can decode this file using ffmpeg as follows :
ffmpeg -vcodec mpeg4 -i "EncodedWithHdr.bits" -vcodec rawvideo EncodedWithHdr.yuv
But Program stream and Transport Stream is not always same.

we can also create the .m4v by the following command :
ffmpeg -i D:\highway.avi -f m4v D:\highway.m4v

No comments: