Auto play a video on startup

I tried searching but couldn't find anything.

I have a streaming video file that plays a live web channel. I'd like to have it autoplay when XBMC starts without having to manually select and play the video.

How can I accomplish that?

Running Confluence on Win 7.

You need to create a file called in the folder %appdata%\xbmc\userdata (appdata is an environment variable containing something like C:\Users\<username>\AppData\Roaming) and in this file put:

import xbmc


When you start XBMC it will execute and the above code will attempt to open C:\somepath\somefile.strm just as if you had opened manually in XBMC.

If it doesn't work enable debug logging and hopefully xbmc.log will contain a helpful error message. Note that in Pythion code \ is an escape character so you need to use \\ where you want a single \ in the file name. You might be able to put the URL in directly, though I haven't tried it.

This works a treat for me. I have used this to autostart a video on XBMC.

In my case it autoplays on boot from the raspberry pi, using OpenELEC.

For me the video file to autoplay was on an attached usb dongle. I checked the address using the built in file manager, which was

This then translated to an containing the following text

import xbmc

This was saved into the OPENELEC > Userdata folder using Finder from my mac over the network.

It can also be transferred to the device using the same usb dongle, then using the built in file manager to copy the file to the Profile Directory.

I also needed one further tweak. By defauly XBMC would ask whether to start from beginning or resume the video file at previous point. I therefore made an advancedsettings.xml file which told it to ignore resume within a number of settings (i chose 36000 seconds, or 10 hours). This file sits in the same directory as the above. OPENELEC > Userdata.

Here is the advancedsettings.xml file:

Finally, I had to remove the bookmark for the file, which is one of the options during playback. With the bookmark removed the file autoplays on booting the device.

I think this could be a great Kiosk style application...

Logout Mark Read Team Forum Stats Members Help
Auto play a video on startup0
This forum uses Lukasz Tkacz MyBB addons.