Portál AbcLinuxu, 9. května 2025 00:53
-vo sdl?
#!/bin/sh # playm 0.2 # script for running mplayer with proper expand parameter # Radek Brich, 2005, http://brich.org # Optimized by Pichi, 2005 # test if movie file exists filename="$1" shift if [ ! -f "$filename" ]; then echo "File not found: '$filename'" exit 1 fi # get movie width and height from mplayer sizes=($(mplayer "$filename" -vo xxx 2> /dev/null | sed -n '/VIDEO:/{s/^.* \([0-9]\+\)x\([0-9]\+\).*$/\1 \2/;p}')) # calculate expand parameters exph=$(( ${sizes[0]} * 3 / 4 - ${sizes[1]} )) # play the movie in mplayer echo mplayer "$filename" -vf expand=0:-$exph:0:$(( $exph / 2 )) "$@"
--- main/libmpcodecs/vf_expand.c 2004-12-01 10:32:48.000000000 +0100 +++ main_moje/libmpcodecs/vf_expand.c 2005-03-10 16:39:39.909743089 +0100 @@ -29,2 +29,3 @@ int osd; + int exp_f; unsigned char* fb_ptr; @@ -34,2 +35,3 @@ 0, + 0, NULL @@ -164,2 +166,6 @@ // calculate the missing parameters: + if(vf->priv->exp_f){ + vf->priv->exp_h = -(width * 3 / 4 - height); + vf->priv->exp_y = -(vf->priv->exp_h/2); + } #if 0 @@ -365,2 +371,3 @@ {"osd", ST_OFF(osd), CONF_TYPE_FLAG, 0 , 0, 1, NULL}, + {"f", ST_OFF(exp_f), CONF_TYPE_FLAG, 0 , 0, 1, NULL}, { NULL, NULL, 0, 0, 0, 0, NULL }
--- main/libmpcodecs/vf_expand.c 2004-12-01 10:32:48.000000000 +0100 +++ main_moje/libmpcodecs/vf_expand.c 2005-03-10 18:11:20.602977640 +0100 @@ -164,2 +164,7 @@ // calculate the missing parameters: + if(vf->priv->exp_h == -1 && vf->priv->exp_w == -1 && + vf->priv->exp_x == -1 && vf->priv->exp_y == -1){ + vf->priv->exp_h = -(width * 3 / 4 - height); + vf->priv->exp_y = -(vf->priv->exp_h/2); + } #if 0
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.