Thanks for the pointer, in taking a closer look, I found the issue and this is now working fine.<div><br></div><div>Many thanks</div><div><br></div><div><div>#!/bin/sh -x</div><div><br></div><div>SERVICE='omxplayer'</div>
<div>while true; do</div><div>if ps ax | grep -v grep | grep $SERVICE > /dev/null</div><div>then</div><div>echo "runing" # sleep 1</div><div>else</div><div> omxplayer -o hdmi United\ Springs\ Master.mp4</div>
<div><br></div><div>fi</div><div>done</div><div><br></div><div>The issue was: omxplayer -o hdmi <u>video.mp4</u> United\ Springs\ Master.mp4 &</div><div><br></div><div>I tested the script with vlc on an ubuntu box, and I must have left this extraneous video4.mp4 from there</div>
<div>/me slaps forehead</div><div><br></div><br><div class="gmail_quote">On 4 July 2012 16:20, Dan Mackdermott <br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Brian,<div><br>
<br>
On 04/07/12 15:23, Brian Pickford wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have set up Raspbian and omxplayer from source. This is working well<br>
and is doing a great job.<br>
<br>
I want to be able to play a single video file in an endless loop on my<br>
stand at the farnbrough air show next week, but my lack of bash skills<br>
id defeating me. I hope some on can spot the error and help me out ...<br>
</blockquote>
<br></div>
Have you tried/considered using 'wait' or running it in the foreground?<br>
<br>
e.g.<br>
#!/bin/sh<br>
while true; do<div><br>
omxplayer -o hdmi video.mp4 United\ Springs\ Master.mp4 &<br></div>
wait<br>
done<br>
<br>
or...<br>
#!/bin/sh<br>
while true; do<div><br>
omxplayer -o hdmi video.mp4 United\ Springs\ Master.mp4 &<br></div>
done<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This script and a few variants of it either return "Have a nice day ;)"<div><br>
or play the video once through then cycle the same message<br>
</div></blockquote>
<br>
You could also use '#!/bin/sh -x' to get more output from your script.<br>
<br>
Cheers,<br>
<br>
Dan<br>
<br>
<br>
______________________________<u></u>_________________<br>
Nottingham mailing list<br>
<a href="mailto:Nottingham@mailman.lug.org.uk" target="_blank">Nottingham@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/nottingham" target="_blank">https://mailman.lug.org.uk/<u></u>mailman/listinfo/nottingham</a><br>
</blockquote></div><br>
</div>