]> git.sesse.net Git - vlc/blob - doc/demo.sh
Small fixes/changes
[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 "VLM batch file saved to `pwd`/demo.vlm"
32   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"
33 }
34
35 mosaic()
36 {
37   echo -e "\n- Mosaic demo -\nconfiguration\n"
38   echo -en "Please chose a background input.\nbackground input? "
39   read bg
40   echo -en "Please chose a video to blend.\nvideo? "
41   read vid
42   echo "new a broadcast enabled loop
43 setup a input $vid
44 setup a output #duplicate{dst=mosaic-bridge,select=video}
45 control a play" > "`pwd`/demo.vlm"
46   echo "VLM batch file saved to `pwd`/demo.vlm"
47   echo -e "\n$VLC --sub-filter mosaic:marq --marq-marque \"VLC - mosaic\" --marq-position 6 --mosaic-width 120 --mosaic-height 90 --mosaic-rows 1 --mosaic-cols 1 --mosaic-alpha 150 --extraintf telnet --telnet-host localhost --vlm-conf `pwd`/demo.vlm $bg"
48 }
49
50 cat << EOF
51 VLC cool demos script
52  1. psychedelic video filter
53  2. gradient video filter
54  3. mosaic
55 EOF
56
57 echo -n "demo number? "
58 read choice
59
60 case "$choice" in
61  1) pyschedelic;;
62  2) gradient;;
63  3) mosaic;;
64  *) echo "Wrong answer ... try again"; exit 1;;
65 esac
66
67 echo -e "\nUse the previous command to run the demo."
68 echo "Note: make sure that you reset your preferences before running these demos."