Answer the question
In order to leave comments, you need to log in
How to loop video on Raspberry Pi?
It is necessary to make a monitor + video player based on "raspberries".
Actually the video is normally played through omxplayer. For looping, a script taken from an Internet is used
#!/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="/mnt/storage/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 1;
else
for entry in $VIDEOPATH/*
do
clear
omxplayer $entry > /dev/null
done
fi
done
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question