[Nottingham] Raspberry Pi and omxplayer loop

Brian Pickford brian at brianpickford.co.uk
Wed Jul 4 14:21:34 UTC 2012


Hello list,

I have an issue that I have posted on the RPi forum, but maybe there is
some one here that can spot my mistake:

a hoi hoi,

I have set up Raspbian and omxplayer from source. This is working well and
is doing a great job.

I want to be able to play a single video file in an endless loop on my
stand at the farnbrough air show next week, but my lack of bash skills id
defeating me. I hope some on can spot the error and help me out ...


#!/bin/sh

SERVICE='omxplayer'
while true; do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
echo "runing" # sleep 1
else
omxplayer -o hdmi video.mp4 United\ Springs\ Master.mp4 &
sleep 180
fi
done

This script and a few variants of it either return "Have a nice day [image:
;)]" or play the video once through then cycle the same message

Grateful for any pointers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/nottingham/attachments/20120704/8c8c573c/attachment.htm>


More information about the Nottingham mailing list