[FFmpeg-user] 'Duration: N/A' for some videos ?
krueger at lesspain.de
Fri Aug 30 14:44:08 CEST 2013
On Fri, Aug 30, 2013 at 1:18 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Robert Krüger <krueger <at> lesspain.de> writes:
>> I assume that for some formats tools like mediainfo
>> take that approach but I have not verified that by
>> looking at their code.
> (Is this really true? Sounds unlikely to me.)
I think so because the results looked good and e.g. for transport
stream files this is really fast but you cannot know for sure. I
certainly think it makes sense for tools which focus on metadata
extraction as it is the best thing that can be done but again, that's
just guessing from observations and what I think makes sense.
>> <at> Carl: Of course you may interprete parsing
>> headers as a subset of decoding, I just wanted to
>> make sure he did not get the impression he had to
>> decode (as in decoding image data) the whole
>> video to get a correct duration.
> You are (most probably) right but I think answers
> should be (or at least are) based on (current)
> FFmpeg here, it is of course not wrong to mention
> what would be possible if FFmpeg would behave (in
> this case: very) differently.
That's why I mentioned the ffprobe scripting approach. IIRC there are
people who use this in production as it is currently the only way to
achieve it with FFmpeg tools (for formats that do not have the
duration in the container header).
More information about the ffmpeg-user