[FFmpeg-user] Identifying an MP4 file

Sreenath BH bhsreenath at gmail.com
Thu Mar 31 15:22:39 CEST 2016

Hi All,

We have a HTTP Live Streaming (HLS) setup where we transcode incoming
video files to H264 video and AAC audio and build playlist files from
that. We want to avoid this step if the input file is already a MP4

I know that MP4 is just a container and does not imply H264 and AAC.

I am planning to check the audio and video codec IDs in our program
after getting the stream information using avformat_find_stream_info.

So, if the video codec ID and Audio codec ID are respectively,


Is it sufficient to qualify it as a MP4 file?

The reason I ask is that there are some flv files that use the same
codecs, but I am not sure if it would be safe it to treat it on par
with an "authentic" mp4 file.

Are there any things that I need to check before concluding that the
video is fit for HLS streaming?


More information about the ffmpeg-user mailing list