omxplayer - Seamless looping of a directory

208 Views Asked by At

I'm trying to make a script/program that will seamlessly loop through all video files in a directory using omxplayer. So far my best solution was using ffmpeg to concat the videos of the directory and loop the output using omxplayer --loop output, but I've kept running into issues with different framerates and codecs of videos and the concating itself takes way longer than I can afford. Does anyone have a clue or a snippet on how digital signage software solutions loop their videos?

1

There are 1 best solutions below

0
rijotech On

Try this.

#!/bin/sh
while : ;
do for f in /videos-location/*.mp4;
do omxplayer -n -l "$f";
done;
done