]> git.sesse.net Git - vlc/blob - doc/demo.sh
Add OpenGL rotating cube and video wall demos
[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 opengl()
51 {
52   echo -e "\n- OpenGL cube demo -\nconfiguration\n"
53   echo -en "Please chose an input.\ninput? "
54   read input
55   echo -e "\n$VLC -V opengl --opengl-effect transparent-cube $input"
56 }
57
58 wall()
59 {
60   echo -e "\n- Video wall demo -\nconfiguration\n"
61   echo -en "Please chose an input.\ninput? "
62   read input
63   echo -en "Do you want to use rotated laptops/screens ?\n[y/N] "
64   read rot
65   case "$rot" in
66     "y"|"Y"|"yes")
67       echo -e "\nLeft hand side:\n$VLC --vout-filter wall:transform --transform-type 90 --wall-cols 2 --wall-rows 1 --wall-active 0 $input"
68       echo -e "\nRight hand side:\n$VLC --vout-filter wall:transform --transform-type 90 --wall-cols 2 --wall-rows 1 --wall-active 1 --sub-filter marq --marq-marquee \"VLC - Video wall\" $input"
69       ;;
70     *)
71       echo -e "\nLeft hand side:\n$VLC --vout-filter wall --wall-cols 2 --wall-rows 1 --wall-active 0 --sub-filter marq --marq-marquee \"VLC - Video wall\" $input"
72       echo -e "\nRight hand side:\n$VLC --vout-filter wall --wall-cols 2 --wall-rows 1 --wall-active 1 $input"
73       ;;
74   esac
75 }
76
77 cat << EOF
78 VLC cool demos script
79  1. psychedelic video filter
80  2. gradient video filter
81  3. mosaic
82  4. OpenGL cube
83  5. video wall
84 EOF
85
86 echo -n "demo number? "
87 read choice
88
89 case "$choice" in
90  1) pyschedelic;;
91  2) gradient;;
92  3) mosaic;;
93  4) opengl;;
94  5) wall;;
95  *) echo "Wrong answer ... try again"; exit 1;;
96 esac
97
98 echo -e "\nUse the previous command to run the demo."
99 echo "Note: make sure that you reset your preferences before running these demos."