darthpaul74
Posts: 2
Joined: Wed Sep 20, 2017 7:51 pm

Looping multiple videos with OMX player

Wed Sep 20, 2017 8:07 pm

Im trying to loop multiple videos using OMX player.

The following command works great for one video in /home/pi/.config/lxsession/LXDE-pi/autostart

x-terminal-emulator -e omxplayer --loop /home/pi/test1.mp4

But I'm not having much luck finding documentation on using several videos.

Any help would be greatly appreciated!

RobSteele
Posts: 2
Joined: Thu Oct 05, 2017 3:51 am

Re: Looping multiple videos with OMX player

Mon Oct 16, 2017 12:37 pm

I'm actually trying to do the same and all of the tutorials I have found are dated and do not seem to work anymore. Anyone know of any newly updated tutorials?

tvjon
Posts: 834
Joined: Mon Jan 07, 2013 9:11 am

Re: Looping multiple videos with OMX player

Tue Oct 17, 2017 5:38 pm

So you mean to play several videos, & then repeat playing those videos?

Tutorials? Where? How did you use them?

You can try this fairly simplistic approach:
loop-several.sh.zip
(267 Bytes) Downloaded 1889 times
Place this file in one of your executable paths, eg.,

/home/pi/bin

then from the folder containing your videos to loop:

$ loop-several.sh

RobSteele
Posts: 2
Joined: Thu Oct 05, 2017 3:51 am

Re: Looping multiple videos with OMX player

Sat Dec 23, 2017 10:46 pm

thanks tvjon, does this work for using a usb thumb drive to hold the videos ?

tvjon
Posts: 834
Joined: Mon Jan 07, 2013 9:11 am

Re: Looping multiple videos with OMX player

Mon Dec 25, 2017 8:23 am

You are welcome.

Yes, any attached storage that the RPi knows about will work.

Also, X-windows is not required, so Raspbian-lite will work for example.

Omxplayer is a very useful application. The script can also be used for audio files, so handy in a museum for example.

Attached is an improved version.
loop-several.sh.zip
(292 Bytes) Downloaded 1042 times

kgn
Posts: 2
Joined: Fri Feb 16, 2018 8:34 am

Re: Looping multiple videos with OMX player

Mon Feb 19, 2018 10:17 am

Hi,

between the two videos comes a desktop view. How to play all videos unbroken continuum.. :?:

tvjon
Posts: 834
Joined: Mon Jan 07, 2013 9:11 am

Re: Looping multiple videos with OMX player

Tue Feb 20, 2018 8:07 pm

Well, one simple way is to set your RPi to boot to cli.

When it has booted to the console prompt, type

startx

& you'll arrive at your desktop.

When you're ready to start your videos, mouse to the Raspberry menu, select the Shutdown submenu, then press on

Exit to cammand line

$ cd wherever-your-files-live

wherever-your-files-live $ loop-several.sh


I've also made a small change to one of the script's statements, attached.
loop-several.sh.zip
(290 Bytes) Downloaded 957 times
cli.png
cli.png (40.07 KiB) Viewed 11028 times
exit.png
exit.png (6.94 KiB) Viewed 11028 times

suffusion
Posts: 3
Joined: Wed Dec 04, 2019 6:53 pm

Re: Looping multiple videos with OMX player

Sat Dec 28, 2019 8:37 pm

Thanks for creating this looping program, but my pi crashes after running it for a few hours.

User avatar
rpiMike
Posts: 2105
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Looping multiple videos with OMX player

Sat Dec 28, 2019 9:01 pm

More info would help.

What video file types are you playing? Is it one particular file that causes the crash? What is the CPU usage and CPU temperature when it crashes? What is the memory usage? Which model Pi? Using latest Raspbian Buster fully updated?

Return to “Raspberry Pi OS”