[FFmpeg-user] Is there a video or audio file can't be seekable or can't get it's duration?

littlebat dashing.meng at gmail.com
Thu Sep 13 16:21:18 CEST 2012

On Thu, 13 Sep 2012 14:43:34 +0100
"Rhodri James" <rhodri at kynesim.co.uk> wrote:

> On Thu, 13 Sep 2012 14:28:35 +0100, littlebat
> <dashing.meng at gmail.com> wrote:
> > Sorry, I am writing a script try to deal with all kinds of videos or
> > audios, I need to know which kind of files we can't get it's
> > duration before play it really or can't be seekable or both. I have
> > no these kinds of sample files, so I can't try them really.
> Consider video or audio streams.  None of those are seekable
> (without trick-play) as they come in across the network, and I
> regularly curse people who forget this and assume their demuxer can
> seek as much as it likes.  Some of them may give you a duration, some
> may have an indefinite duration (e.g. internet radio), some may lie.

How about the regular files exist in the disks? 

I know some kinds of
videos, e.g., MPEG-TS or MPEG-PS files report a zero duration using
"mplayer -identify -vo null -ao null -frames 0 filename" command, but
"ffmpeg -i filename" will give an estimated duration, some people call
ffmpeg's duration for these two kinds of files is a guessing way. These
two kinds of files report as a seekable file using the "mplayer
-identify ..." command. See: [MPlayer-users] mplayer -identify reports
incorrect information for some files: 

I don't know any other kind of regular video or audio file existed in
the disk can't get its duration priorly or isn't seekable. I will write
some extra lines to deal with them if there are these kinds of files

More information about the ffmpeg-user mailing list