3 posts
by Nelsonator » Thu May 18, 2017 7:19 pm
Hi all: I have an issue where I need to take a mp4 video and loop within raspbian. The code have so far in lxterminal is:

omxplayer -o local --loop /home/pi/Videos/3Brothers.mp4

I have it looping already, but need it to start at bootup. Any answers would be greatly appreciated.
HP Senior Systems Engineer (Retired)
Posts: 1
Joined: Mon Apr 24, 2017 6:16 pm
by topguy » Thu May 18, 2017 8:31 pm
One solution:
Disable automatic login and disable boot to desktop with raspi-config.
Enable SSH so you can log in from another computer and fix stuff if you break the boot.
Put the command at the end of "/etc/rc.local" and put a "&" at the end of it.

Now it should load pretty fast into the video without using time to load the desktop, but to stop it you probably have to log in via ssh and kill the process.
User avatar
Posts: 3221
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway
by ian_g » Fri May 26, 2017 11:19 am
in terminal
Code: Select all
crontab -e

then add at bottom
Code: Select all
@reboot omxplayer -o local --loop /home/pi/Videos/3Brothers.mp4 > /dev/null 2>&1

or with some log file
Code: Select all
@reboot omxplayer -o local --loop /home/pi/Videos/3Brothers.mp4 >> /path/to/mylogfile.log 2>&1

edit: oops forgot >
Posts: 36
Joined: Fri May 26, 2017 1:04 am
Location: East Midlands, UK