Startup video playback troubles
#1
i've taken the startupvideo script a bit further by changing the script to select a playlist composed of music videos, randomize it and play it instead of the default animation that came with the script. for some reason, on only 2 xboxes can i get it running flawlessly but on others, no matter which skin i select, it randomly freezes. i have the least amount of freezes on pmiii while the ce and le versions of pmiii freeze the most often. the script goes as follows:

Quote:import xbmc

file = 'q:\\albums\\playlists\\videos.m3u'
pls = xbmc.playlist(2)
pls.load(file)
pls.shuffle()
xbmc.player().play(pls)
xbmc.executebuiltin('xbmc.activatewindow(0)')

i do not know if it depends on the xboxes or the bioses/chips, but my personal xboxes through multiple builds of xbmc has had no problems up to date. maybe it could be an issue with the script but i'm not sure. the amount of videos do not seem to matter as with large or small playlists it still randomly freezes. any help or feedback is appreciated.
Reply
#2
ok so i did a little experiement with a friend's xbox running a setup very similar to mine: x3 chip with the latest bios and the 7-17-2005 rocafellasquali build. he is also running the same script as mine. he ran into no problem at all so if a moderator can move this post to another forum of relevance i would greatly appreciate it.

also, still any feedback or help is appreciated to as i want to find out why it tends to freeze on music videos as not on mp3s. thanks again.
Reply
#3
alright i was able to fix the script to pretty much work... i tested it out on an xbox that had problems and two lines of code seemed to fix the problem... the new script goes as follows:

Quote:import xbmc
from time import sleep

file = 'q:\\albums\\playlists\\videos.m3u'
pls = xbmc.playlist(2)
pls.load(file)
pls.shuffle()
xbmc.player().play(pls)
sleep(0.3)
xbmc.executebuiltin('xbmc.activatewindow(0)')

feel free to use this script for your own pleasure... Smile
Reply
#4
well, here's mine and it's been great. one video gives me problems, but i blame that on the vid. works on 4 other xboxs, too.

file = 'q:\\albums\\playlists\\startup.m3u'
pls = xbmc.playlist(0)
pls.load(file)
pls.shuffle()
xbmc.player().play(pls)
xbmc.executebuiltin('xbmc.activatewindow(0)')
Reply
#5
well maybe its that 2 i have there or maybe not... ive come to learn that scripting is fickle and one little offset like that can cause lots of hair pulling... yours looks exactly the same as mine except for that 2 and the sleep delay, but as long as it works right? :d try putting in the sleep delay to see if that video that never works actually works now and post your findings... would be great to know
Reply
#6
i added that sleep command and now that video works fine.

great work donuts! thanks.

one thing though.. after the first video finishes do your videos go fullscreen? it's as if xbmc.executebuiltin('xbmc.activatewindow(0)') only runs once.

i wonder if it runs a check to see if it's already open and then ignores the command if so. it could probably be fixed by making the last two lines
Quote:xbmc.executebuiltin('xbmc.activatewindow(x)')
xbmc.executebuiltin('xbmc.activatewindow(0)')

first you'd have to find a good value for 'x' (a blank screen would be best) but then you'd run the risk of having the screen blinking between videos.

i'm not even sure it's worth looking into, but there you go.
cheers!
Reply
#7
i use to have that problem but now it just continues playing the next video minimized... dont know what it can be but try the script i got and post your results... so far everything is working dandy for me!
Reply

Logout Mark Read Team Forum Stats Members Help
Startup video playback troubles0