Portál AbcLinuxu, 17. března 2026 14:09
vf=expand=0:-60:0:0
A nebrani to v dalsich pokusech s ostatnimi vystupy. Ja osobne preferuji -vo xv.
cat ~/bin/nmplayer
#!/bin/sh
mplayer -identify -frames 0 "$1" | grep ^ID_VIDEO > ~/tmp/mplayer-atributes
. ~/tmp/mplayer-atributes;
SCR_W=1152 # screen width
SCR_H=864 # screen height
BAR_H=100
A_VIDEO_H=$SCR_H
A_VIDEO_W=$[ $ID_VIDEO_WIDTH*($SCR_H-$BAR_H)/$ID_VIDEO_HEIGHT ]
B_VIDEO_H=$[ $BAR_H+$ID_VIDEO_HEIGHT*$SCR_W/$ID_VIDEO_WIDTH ]
B_VIDEO_W=$SCR_W
if [ $A_VIDEO_H -le $B_VIDEO_H ]
then
S_BAR_H=$[ $BAR_H*$ID_VIDEO_HEIGHT/($SCR_H-$BAR_H) ]
SUB_POS=$[ 100*($A_VIDEO_H-$BAR_H)/$A_VIDEO_H ]
else
S_BAR_H=$[ $BAR_H*$ID_VIDEO_WIDTH/$SCR_W ]
SUB_POS=$[ 100*($B_VIDEO_H-$BAR_H)/$B_VIDEO_H ]
fi;
DIAG=$[ $ID_VIDEO_HEIGHT * $ID_VIDEO_WIDTH ]
if [ $DIAG -lt "105000" ]
then
FONT_SCALE=8
elif [ $DIAG -lt "130000" ]
then
FONT_SCALE=7
elif [ $DIAG -lt "160000" ]
then
FONT_SCALE=6
else
FONT_SCALE=5
fi;
mplayer \
-vo x11 \
-font /usr/X11R6/lib/X11/fonts/truetype/arial.ttf \
-subfont-encoding cp1250 \
-vop expand=0:-$S_BAR_H:0:0 \
-zoom -subpos $SUB_POS \
-stop-xscreensaver \
-subfont-text-scale $FONT_SCALE "$1" > ~/.logs/mplayer.stdout 2> ~/.logs/mplayer.errout
takze staci spustit jen
nmplayer movie.avi
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.