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.

Oliver Salzburg
  • 1,774
  • 1
  • 19
  • 33

2 Answers2

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.

Jivings
  • 22,538
  • 11
  • 90
  • 139
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.

DrakaSAN
  • 437
  • 1
  • 4
  • 11