[Libav-user] Determining video container format of streamed file after url_open

Alex Cohn alexcohn at netvision.net.il
Sun May 6 09:05:42 CEST 2012

On Sun, May 6, 2012 at 1:54 AM, Jean-Yves Avenard <jyavenard at gmail.com> wrote:
> Hi there.
> I would like to get help on the best way to determine what the
> container format is of a streamed media accessed via ffmpeg; right
> after calling url_open and before starting to use url_read
> What I'm trying to determine is if a file being accessed over http is
> either mp4 or m4v format.
> I was wondering if such a function existed...
> Thank you in advance
> Regards
> Jean-Yves

The difference between mp4 and m4v is often illusionary, see
http://en.wikipedia.org/wiki/M4V and
https://discussions.apple.com/thread/2309476?start=0&tstart=0 for some
details. The big issue is DRM, which may render the mv4 file
impossible to decode with ffmpeg. The AC3 (Dolby Digital) audio which
may be embedded in m4v, but never mp4 - is less of a problem for your

Alex Cohn

More information about the Libav-user mailing list