[FFmpeg-user] Getting H264 elementary stream from mp4

Shashank Pathak shashank.pathak at einfochips.com
Thu Oct 30 12:32:06 CET 2014


Hi All,

We are having one mp4 file with h264 codec.
we want to feed this file to a video decoder but the decoder requires elementary stream.
So we tried to extract H264 elementary string from mp4 with below ffmpeg commnd,

ffmpeg -i input.mp4 -vcodec copy -vbsf h264_mp4toannexb output.h264

Now with this command we are getting h264 file but this file is not having I-frame in it.
We viewed the file in Hex editor and found that it contains,
00 00 00 01 67 --> SPS frame
00 00 00 01 68 --> PPS frame
But we couldn't find,
00 00 00 01 65 --> I-frmae.

VLC is not able to play the generated h264 file.
ffplay plays the file but very fast (higher fps).

Can anyone suggest what we are doing wrong?
or Any other method to get H264 file?

--
Best Regards,
Shashank Pathak
Senior Engineer | PES

[cid:part1.05050907.05040709 at einfochips.com]
Product Engineering Services
Software | Embedded | Semiconductor

Frost & Sullivan Company of the Year 2013-14
************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************


More information about the ffmpeg-user mailing list