[MEncoder-users] Retrieve video infos from batch file

DaveG mplayer01 at dgmm.net
Fri Mar 2 21:24:15 CET 2007


On Friday 02 March 2007 16:48, totob at libero.it wrote:
> Hello everybody,
>
> I have a batch script that uses mplayer to get the thumbnail of a video. I
> would like to get also the FramePerSecond property of the video and store
> in a batch variable. It would be good to use also mencoder if it allows me
> to get this data.
>
> I would like to have something like
> SET FPS = 'mencoder/mplayer input.flv -SOMEOPTION'
> and then use the variable %FPS% in the operations of my script.
>
> Is this possible someway? With which software?
> Thanks everyone:)

I needed the same thing and came up with this :-)

vbitrate=`mplayer -identify -frames 0 "${srcfile}" | grep ID_VIDEO_BITRATE | 
sed -e 's/.*RATE=//'`
##Note, that's all one line.

vbitrate=$(($vbitrate / 1000))


-- 
Dave



More information about the MEncoder-users mailing list