[MEncoder-users] Finding out file duration

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Oct 31 16:56:39 CET 2005


Hi,
On Mon, Oct 31, 2005 at 04:41:36PM +0100, Guillaume POIRIER wrote:
> On 10/31/05, Jean Hoderd <jhoderd at yahoo.com> wrote:
> > Is there an option in mplayer/mencoder to return
> > the duration of a movie file?  Sorry if the solution
> > is obvious, but I could not find any other way
> > other than to use -benchmark, which is of course
> > very slow.
> 
> That's probabaly the best solution as some containers such as MPEG
> can't be safely trusted to report the correct duration.
> What you may do though is speed-up the decoding process using the
> lavdopts decoding options, and/or use "-nosound"

mplayer -benchmark -vc null -vo null -nosound
is very fast and quite often accurate (maybe not always though).
mencoder -oac copy -ovc copy -o /dev/null
might give good results, too (and also gives the bitrate etc).

Greetings,
Reimar Döffinger




More information about the MEncoder-users mailing list