[Libav-user] Identifying a MP4 file using libav libraries

Sreenath BH bhsreenath at gmail.com
Sat Apr 9 12:03:37 CEST 2016


Hi All,

I want to identify if a video file is a mp4 file with following properties:

1. Video codec is H264
2. Audio codec is AAC
3. Pixel format is YUV420P  and
4. container format is MP4

I am able to do the first three after calling

avformat_open_input  and
avformat_find_stream_info


Now for the container format, I am trying to use AVFormatContext:: iformat.

This has a member variable "name", but it has a list of comma separated names.

Here is what I find when I print the name member after opening a
sample MP4 file:

"mov,mp4,m4a,3gp,3g2,mj2"

My question is, how do I find which specific container format is the
input file using? I checked other members of the AVFormatContext and
could not find any clues.

Appreciate any help in this regard,

-Sreenath


More information about the Libav-user mailing list