[FFmpeg-user] ffmpeg treats m4v as container not elementry video format

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Jan 23 09:42:45 CET 2013

Francois Visagie <francois.visagie <at> gmail.com> writes:

> > You have to add the extradata to the output file:
> > $ ffmpeg -i input -vcodec copy -f m4v -vbsf dump_extra out.m4v
> What is this extradata and why does it need to be added in this 
> instance and not normally when using iDevice format? Thanks.

The extradata is always required for MPEG4 decoding.
(That is what I assume because of the report, I did 
not check.)
If a "real" container (like mov) is chosen for 
output, the muxer places the extradata into the 
header of the output file where decoders will 
find it.
If instead of a "real" container "m4v" (MPEG-4 
elementary stream as opposed to mov variant "ipod") 
is chosen, no extradata can be written by the muxer, 
it gets lost and decoding is impossible.
The bitstream filter apparently takes the extradata 
and places it into the first packet of the 
videostream (or something similar).

Carl Eugen

More information about the ffmpeg-user mailing list