]> git.sesse.net Git - vlc/blob - doc/demo.sh
Small script that generates huge command lines to be used in demos. Feel free to...
[vlc] / doc / demo.sh
1 #!/bin/sh
2
3 ########################################################################
4 # VLC demo command line generator
5 # $Id:$
6 ########################################################################
7
8 #TODO: change on Max OS X
9 VLC="./vlc --quiet --color "
10 CMD=""
11
12 pyschedelic()
13 {
14   echo -e "\n- Psychedelic demo -\nconfiguration\n"
15   echo -en "Please chose an input. Live camera feeds are best.\ninput? "
16   read input
17   echo -e "\n$VLC --sub-filter marq --marq-position 8 --marq-size 30 --marq-color 16776960 --marq-marquee \"VLC - Psychedelic video filter\" --vout-filter distort --distort-mode psychedelic $input"
18 }
19
20 gradient()
21 {
22   echo -e "\n- Gradient demo -\nconfiguration\n"
23   echo -en "Please chose an input. Live camera feeds are best.\ninput? "
24   read input
25   echo -en "Please chose a logo to display (or multiple logos according to the --logo-file syntax)\nlogo? "
26   read logofile
27   echo "new a broadcast enabled loop
28 setup a input $input
29 setup a output #duplicate{dst=mosaic-bridge,select=video}
30 control a play" > "`pwd`/demo.vlm"
31   echo -e "\n$VLC --sub-filter mosaic:marq:logo --mosaic-width 120 --mosaic-height 90 --mosaic-cols 1 --mosaic-rows 1 --marq-position 8 --marq-size 30 --marq-color 65280 --marq-marquee \"VLC - Gradient video filter\" --logo-file $logofile --vout-filter distort --distort-mode gradient --extraintf telnet --telnet-host localhost --vlm-conf `pwd`/demo.vlm $input"
32 }
33
34 mosaic()
35 {
36   echo -e "\n- Mosaic demo -\nconfiguration\n"
37   echo -en "Please chose a background input.\nbackground input? "
38   read bg
39   echo -en "Please chose a video to blend.\nvideo? "
40   read vid
41   echo "new a broadcast enabled loop
42 setup a input $vid
43 setup a output #duplicate{dst=mosaic-bridge,select=video}
44 control a play" > "`pwd`/demo.vlm"
45   echo -e "\n$VLC --sub-filter mosaic --mosaic-height 90 --mosaic-width 120 --mosaic-rows 1 --mosaic-cols 1 --mosaic-alpha 150 --extraintf telnet --telnet-host localhost --vlm-conf `pwd`/demo.vlm $bg"
46 }
47
48 cat << EOF
49 VLC cool demos script
50  1. psychedelic video filter
51  2. gradient video filter
52  3. mosaic
53 EOF
54
55 echo -n "demo number? "
56 read choice
57
58 case "$choice" in
59  1) pyschedelic;;
60  2) gradient;;
61  3) mosaic;;
62  *) echo "Wrong answer ... try again"; exit 1;;
63 esac
64
65 echo -e "\nUse the previous command to run the demo."
66 echo "Note: make sure that you reset your preferences before running these demos."