Sync PO files
[vlc.git] / doc / demo.sh
blobaf3f4d64168148720de7fc48e8adab8105ceed80
1 #!/bin/sh
3 ########################################################################
4 # VLC demo command line generator
5 # $Id$
6 ########################################################################
8 #TODO: change on Max OS X
9 if test ".`uname -s`" = ".Darwin"; then
10 VLC="./VLC.app/Contents/MacOS/VLC --quiet --color "
11 else
12 VLC="./vlc --quiet --color "
14 CMD=""
16 pyschedelic()
18 echo -e "\n- Psychedelic demo -\nconfiguration\n"
19 echo -en "Please chose an input. Live camera feeds are best.\ninput? "
20 read input
21 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"
24 gradient()
26 echo -e "\n- Gradient demo -\nconfiguration\n"
27 echo -en "Please chose an input. Live camera feeds are best.\ninput? "
28 read input
29 echo -en "Please chose a logo to display (or multiple logos according to the --logo-file syntax)\nlogo? "
30 read logofile
31 echo "new a broadcast enabled loop
32 setup a input $input
33 setup a output #duplicate{dst=mosaic-bridge,select=video}
34 control a play" > "`pwd`/demo.vlm"
35 echo "VLM batch file saved to `pwd`/demo.vlm"
36 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"
39 mosaic()
41 echo -e "\n- Mosaic demo -\nconfiguration\n"
42 echo -en "Please chose a background input.\nbackground input? "
43 read bg
44 echo -en "Please chose a video to blend.\nvideo? "
45 read vid
46 echo "new a broadcast enabled loop
47 setup a input $vid
48 setup a output #duplicate{dst=mosaic-bridge,select=video}
49 control a play" > "`pwd`/demo.vlm"
50 echo "VLM batch file saved to `pwd`/demo.vlm"
51 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"
54 opengl()
56 echo -e "\n- OpenGL cube demo -\nconfiguration\n"
57 echo -en "Please chose an input.\ninput? "
58 read input
59 echo -e "\n$VLC -V opengl --opengl-effect transparent-cube $input"
62 wall()
64 echo -e "\n- Video wall demo -\nconfiguration\n"
65 echo -en "Please chose an input.\ninput? "
66 read input
67 echo -en "Do you want to use rotated laptops/screens ?\n[y/N] "
68 read rot
69 case "$rot" in
70 "y"|"Y"|"yes")
71 echo -e "\nLeft hand side:\n$VLC --vout-filter wall:transform --transform-type 90 --wall-cols 2 --wall-rows 1 --wall-active 0 $input"
72 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"
75 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"
76 echo -e "\nRight hand side:\n$VLC --vout-filter wall --wall-cols 2 --wall-rows 1 --wall-active 1 $input"
78 esac
81 cat << EOF
82 VLC cool demos script
83 1. psychedelic video filter
84 2. gradient video filter
85 3. mosaic
86 4. OpenGL cube
87 5. video wall
88 EOF
90 echo -n "demo number? "
91 read choice
93 case "$choice" in
94 1) pyschedelic;;
95 2) gradient;;
96 3) mosaic;;
97 4) opengl;;
98 5) wall;;
99 *) echo "Wrong answer ... try again"; exit 1;;
100 esac
102 echo -e "\nUse the previous command to run the demo."
103 echo "Note: make sure that you reset your preferences before running these demos."