Solved How to start XBMC to auto play movie?
#1
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.
Reply
#2
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)" )
Reply
#3
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?
Reply
#4
Is your volume turned down by default?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
(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=Lis..._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
Reply
#6
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.
Reply
#7
Worked! interesting, thank you very much!!!!
Reply
#8
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!
Reply
#9
The path will be to whereever you put the playlist file!
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#10
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)" )
Reply
#11
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
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#12
Smile 
(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.
Reply
#13
what would be the code if i want to play all content of my movie folder automatically from startup and repeatall.

Thanks.
Reply
#14
Just create a smart playlist (wiki) for Movies where Path starts with your desired folder's path. The rest is the same as above.
Reply
#15
Marked thread solved
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
How to start XBMC to auto play movie?00
This forum uses Lukasz Tkacz MyBB addons.