[MEncoder-users] zoom to fit resolution

briaeros007 briaeros007 at gmail.com
Thu Aug 21 13:53:26 CEST 2008


2008/8/21, John Deas <john.deas at gmail.com>:
> On Thu, Aug 21, 2008 at 12:53 PM, RC <cooleyr at gmail.com> wrote:
>
>  > On Thu, 21 Aug 2008 12:05:33 +0200
>  > "John Deas" <john.deas at gmail.com> wrote:
>  >
>  > > Maybe there is another way to achieve what I want then ?
>  >
>  > A little math, and -vf scale.
>  >
>  > Please don't top-post in the future.
>  >
>
>
> -vf scale did not allow me to maintain the aspect ratio, and I suppose that
>  in order to do maths, I must have the size of the input file at one point.
>  However, I am using this command line in a script, to batch convert videos,
>  so I don't have the input resolution a priori.
>
> _______________________________________________
>  MEncoder-users mailing list
>  MEncoder-users at mplayerhq.hu
>  https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>

if you want to have the width and height of the video, you can use mplayer
With a bash script
TOTO=`mplayer -vo null -identify -frames 1 $1 2>&1 | grep '^ID_'`
WIDTH=`echo $TOTO|sed 's/.*VIDEO_WIDTH=\([0-9]\+\).*/\1/'`
HEIGHT=`echo $TOTO|sed 's/.*VIDEO_HEIGHT=\([0-9]\+\).*/\1/'`


-- 
-------------------------------------------------------------------
Subete ga wakatta toki…watashi ga anta wo korosu.



More information about the MEncoder-users mailing list