diff options
Diffstat (limited to 'Script/launch_video.sh')
-rwxr-xr-x | Script/launch_video.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Script/launch_video.sh b/Script/launch_video.sh new file mode 100755 index 0000000..6b23c87 --- /dev/null +++ b/Script/launch_video.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# +# Launch web cam +# + +touch /home/app/gstvid-pid +alreadyrunning=`cat /home/app/gstvid-pid` + +#URL=http://intel07.vannes/~sdx/Downloads/Amazing%20Nature%20full%20HD%20720p.mp4 +#URL=http://intel07.vannes/~sdx/Videos/big_buck_bunny_480p_surround-fix.avi +#URL=http://intel07.vannes/~sdx/Videos/caminandes_480p.avi +URL=file:///home/app/AmazingNature_480p.mp4 + +if [ $(echo $alreadyrunning | wc -w) -lt 8 ] ; then + echo "create new" + gst-launch-1.0 playbin uri=$URL & + echo $! >> /home/app/gstvid-pid +else echo "already running" + for x in $alreadyrunning; do kill -9 $x; done + rm -rf /home/app/gstvid-pid +fi + + |