videoplayer new

This commit is contained in:
Rmys
2021-02-13 17:25:59 +03:00
parent 7c3a5646f7
commit 798430e11a
99 changed files with 262777 additions and 290548 deletions
@@ -0,0 +1,54 @@
#!/bin/bash
# a tiny script to test webcams using mplayer
# options are self explanatory :)
DEVICE="video0"
AUDIO=":noaudio"
FILTER="-vf-add pp=hb:a/vb:a,hqdn3d,mirror"
V4L=""
EXTRA=""
WIDTH="640"
HEIGHT="480"
RESOLUTION="-x 800 -y 600"
FPS=""
for x in $*; do
case "${x}" in
video[0-9]*)
DEVICE="${x}"
;;
-v4l2)
V4L=":driver=v4l2"
FPS="-fps 60"
;;
-v4l)
V4L=":driver=v4l"
FPS="-fps 60"
;;
-audio)
AUDIO=""
;;
-w[0-9]*)
WIDTH=`echo "${x}"|cut -c 4-`
;;
-h[0-9]*)
HEIGHT=`echo "${x}"|cut -c 4-`
;;
-forcefps)
FPS="-fps 30"
;;
-nores)
RESOLUTION=""
;;
-nofilter)
FILTER=""
;;
*)
EXTRA="$EXTRA ${x}"
;;
esac
done
# main
mplayer tv:// -tv device=/dev/$DEVICE:width=$WIDTH:height=$HEIGHT$V4L$AUDIO $RESOLUTION $FILTER $FPS $EXTRA