[MPlayer-users] midentify ID_LENGTH wrong on mpegs, another option?

Giacomo Comes comes at naic.edu
Wed Feb 1 14:39:31 CET 2006


On Wed, Feb 01, 2006 at 08:21:58AM -0500, Steven Adeff wrote:
> I've been trying to use ID_LENGTH to do a 2-pass encode using a
> "length*desired average bitrate" formula, but I'm finding that it is hasn't
> been correct on any of the 13 files I've tried it on. I assume its due to a
> changing fps in the file (from between 23.97 to 29.97) screwing with the
> calculation, but whatever...
> 
> Does anyone know of another command line applications that will accurately
> give me the length of an mpeg? I don't mind it scanning/analyzing the file
> and taking some time to do it as long as I get an accurate value that I can
> grep/sed in my script.

mencoder source.mpg -ovc copy -nosound -o /dev/null -quiet 2>&1 | awk '/^Video stream:/{print $10+$10/$12}'

Giacomo




More information about the MPlayer-users mailing list