15

I want my Raspberry Pi to start looping a predefined .mp4 movie (/home/oliver/awesome.mp4) as soon as possible after attaching power to the device.

This has to happen without any user interaction and I would prefer it if no OSD is distracting the playback. I want to use this next to a POS for entertainment purposes.

4
  • Would you be trying to set it up as a Splash page? also how long?
    – Kaminara
    Commented Jun 13, 2012 at 0:51
  • The best way to do this varies depending on the distro. Which are you using?
    – Jivings
    Commented Jun 13, 2012 at 0:56
  • @Jivings: I assume to be using Debian. Commented Jun 13, 2012 at 0:57
  • 1
    "I want to use this next to a POS for entertainment purposes." Sorry, I couldn't help but laugh! ;)
    – berry120
    Commented Jul 3, 2012 at 21:12

2 Answers 2

7

Firstly make sure you boot straight into X. For details on this, please see this question: Auto-start X-windows / gdm on the standard Debian build

Then edit your ~/.xinitrc file. It needs to contain the command that starts your media player:

vim ~/.xinitrc
omxplayer -p -o hdmi /home/oliver/awesome.mp4

This will make the video begin as soon as X does.

6
  • If you're going down this route for the answer, could you provide details on how to make your Pi go straight into X?
    – recantha
    Commented Feb 20, 2013 at 9:08
  • @recantha I think that would be out of the scope of this question. But you should be able to find it somewhere on this site.
    – Jivings
    Commented Feb 20, 2013 at 17:57
  • I know how to do it, it would just be a more complete answer if you provided the details.
    – recantha
    Commented Feb 25, 2013 at 13:53
  • @recantha See this question
    – Jivings
    Commented Feb 25, 2013 at 17:48
  • 3
    omxplayer works also from the command line, so it's not necessary to start X at all. How about starting omxplayer from /etc/rc.local ?
    – Frepa
    Commented Feb 26, 2013 at 8:15
1

As proposed by Frepa, there is a faster way.

Here a way to auto login and start a script: http://www.akeric.com/blog/?p=1976

Sust make the script to start omxplayer with the video you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.