Kodi Community Forum
Solved How to start XBMC to auto play movie? - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
---- Thread: Solved How to start XBMC to auto play movie? (/showthread.php?tid=157120)

Pages: 1 2


How to start XBMC to auto play movie? - hyiu00 - 2013-02-22

I have installed raspbmc XBMC on Raspberry Pi, and try several skins. There is an option in the skin setting menu to run a playlist at startup. However, there is another setting called the "startup window" and I have to select "Home Window" in order for the movie to appear automatically when powered up. But the home menu is always there when the background is playing the movie. Is there a way to go directly to play video without showing the home menu?

Or, is there a simple way to just play and loop a video file automatically at power up, without showing any menu, etc.?

I know there must be many ways to do this simple things, but as I am a beginner, I just want the most simple way to make this work.


RE: How to start XBMC to auto play movie? - hyiu00 - 2013-02-22

Oh, I found the answer here in this forum:

Just put a file name "autoexec.py" in the "/home/pi/.xbmc/userdata/" directory. The file contain this code:

import xbmc
xbmc.executebuiltin( "PlayMedia(/home/pi/.xbmc/userdata/playlists/video/All.m3u)" )
xbmc.executebuiltin( "PlayerControl(repeat)" )


RE: How to start XBMC to auto play movie? - slowfamily - 2013-08-15

Thanks for this. This worked for me, except it appears that audio does not work when the autoexec runs. Is there some other command that should be ran to enable audio?


RE: How to start XBMC to auto play movie? - nickr - 2013-08-15

Is your volume turned down by default?


RE: How to start XBMC to auto play movie? - zagonep - 2013-08-20

(2013-02-22, 12:09)hyiu00 Wrote: Oh, I found the answer here in this forum:

Just put a file name "autoexec.py" in the "/home/pi/.xbmc/userdata/" directory. The file contain this code:

import xbmc
xbmc.executebuiltin( "PlayMedia(/home/pi/.xbmc/userdata/playlists/video/All.m3u)" )
xbmc.executebuiltin( "PlayerControl(repeat)" )

This works on startup but does not repeatHuh I have the list of functions from http://wiki.xbmc.org/index.php?title=List_of_built-in_functions and have tried repeatone and repeatall but repeat will still not work. The following is my autoexec.py file.

import xbmc
xbmc.executebuiltin( "PlayMedia(/home/pi/.xbmc/userdata/playlists/video/Video.MP4)" )
xbmc.executebuiltin( "PlayerControl(repeat)" )

Thank you for the help


RE: How to start XBMC to auto play movie? - artrafael - 2013-08-20

Try launching a playlist that plays your Video.MP4 file instead of the file itself, as was done by the OP in post #2 above.


RE: How to start XBMC to auto play movie? - zagonep - 2013-08-21

Worked! interesting, thank you very much!!!!


RE: How to start XBMC to auto play movie? - chuco61 - 2013-10-01

Hi

What would the path be if i am running my video from a USB?

I just need my raspberry pi to power up and run the video i tell it to and loop infinitely.

Thanks!


RE: How to start XBMC to auto play movie? - nickr - 2013-10-01

The path will be to whereever you put the playlist file!


RE: How to start XBMC to auto play movie? - zivodevo - 2013-11-08

Hi there,

If you add this script to the userdata folder, do you also need to select 'Enable playlist at startup' under the Skin settings?

Disregard. As I was using Openelec on a Pi, the path was a little different. Working now.

Code:
import xbmc
xbmc.executebuiltin( "PlayMedia(/storage/.xbmc/userdata/playlists/video/All.m3u)" )
xbmc.executebuiltin( "PlayerControl(repeat)" )



RE: How to start XBMC to auto play movie? - nickr - 2013-11-08

Hello fellow kiwi. I am not sure, but in the time it has taken for you to get a response, you could have tried it both ways Smile


RE: How to start XBMC to auto play movie? - zivodevo - 2013-11-08

(2013-11-08, 03:13)nickr Wrote: Hello fellow kiwi. I am not sure, but in the time it has taken for you to get a response, you could have tried it both ways Smile

@nickr

Smile I did and it don't work either way but got it sorted now. Path was different on Pi for Openelec.


RE: How to start XBMC to auto play movie? - marqueejen - 2013-11-18

what would be the code if i want to play all content of my movie folder automatically from startup and repeatall.

Thanks.


RE: How to start XBMC to auto play movie? - artrafael - 2013-11-18

Just create a smart playlist (wiki) for Movies where Path starts with your desired folder's path. The rest is the same as above.


RE: How to start XBMC to auto play movie? - Kib - 2013-11-18

Marked thread solved


This forum uses Lukasz Tkacz MyBB addons.