Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 7. Operating System » Script Video Player raspberry

Script Video Player raspberry

/home/pi/Downloads/videoplayer.sh

Simpan script dibawah ini dengan nama videoplayer.sh

#!/bin/sh

# get rid of the cursor so we don’t see it when videos are running
setterm -cursor off

# set here the path to the directory containing your videos
VIDEOPATH=”/home/pi/Downloads/videos”

# you can normally leave this alone
SERVICE=”omxplayer”

# now for our infinite loop!
while true; do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
sleep 0;
else
for entry in $VIDEOPATH/*
do
clear
omxplayer $entry > /dev/null
done
fi
done

Filed under: 7. Operating System

Leave a Reply

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>