View Full Version : Resume video/music playback on startup (like car-stereo's memory feature)
jamacianjon
2004-06-04, 19:15
my feature that i would like the most would be video resume.
if i am to stop playing a video either from a network share or stopping in the middle of a dvd video. maybe when i want to finiish watching the video tomorrow i would like xbmc to ask if i want to resume playback from where it last left off.
i know there is a bookmark function, but i would like to just press stop or eject the dvd with out having to add a bookmark.
hi,
i've bought my xbox especially for in-car use. with xbmc, the xbox becomes the ultimate mp3/movie playback system! xbmc is installed as default dash, so it starts up right away.
the problem is, that when i start my car and power-up my xbox again, i have to manually start that album over again...
and since xbmc doesn't support .cue files yet, it's hard to listen to an album when you make short rides in your car.
so, is there some kind of sollution, that when i turn-off my xbox, that it saves the current album playing, inclusing the track nr. or seconds.
and when i start xbmc again, it resumes the audio playback of the album?
(this is actually a kind of "pauze" function... the "pauze" starts when i turn off my xbox and will resume playback after turning it back on).
hope anyone had an idea...
tnx
oh, here's a picture of my install:
http://www.mpday.nl/fotos/bravo/stage_2/dsc00549.jpg
it's a 7" tft screen. works perfect.
on the bottom-left, you can see some switches for turning on the 230v supply and the xbox. there's also an rj-45 ethernet connector for uploading/downloading files to the harddrive.
hi
i like your xcarbox, nice creative use of the xbox and xbmc..
just today i saw a item about auto playlist startup..
http://www.xboxmediaplayer.de/cgi-bin....;t=2586 (http://www.xboxmediaplayer.de/cgi-bin/forums/ikonboard.pl?act=st;f=21;t=2586)
good luck ....
tnx for your reply! :d
well, i've been reading the thread about the playlist startup and it sounds very nice, but... you'll need python in order to get it to work.
i have the latest build (06-06-2004), but this release doesn't include python.rar.
any idea where i can get it?
if i download an older version of xbmc with the python.rar file included, can i extract the rar file and use python with my latest build 06-06-2004??
tnx
okay, well, i've download python.rar and added the directories to my xbmc dir.
i've also created an autoexec.py and an autoplay.py file with the proper code in it.
but... i have about 1000 mp3 files on my xbox harddrive, but how can i create a playlist file of these files?? sounds like a n00b question, but i can't seem to find that option in xbmc.
when i enter "my music" it simply displays all the albums in the f:\mp3 directory, but there's no option to create an .m3u file of it...
how can i do this?
creating a playlist is not that difficult and i must admit i didn’t know until asking either, though it's simple! select a file / folder and press 0 on the remote. using the title menu you enter the play list itself. you also can create one on the pc but i experience it’s more work to calculate the relative paths where the songs are….
well,
i've been using a python script for some time now, and is loads the playlist and starts playing the first song in the list (or shuffle).
actually, that's a part of the feature that i'm looking for...
the only thing that needs to be added, is that somehow python saves a (text)file, with the current song playing, inclusing minutes & seconds, when i press the 'shut down' button in the main menu.
when starting-up xbmc again, pyhton opens the (text)file and resumes the songs, starting at the according minutes & seconds.
that's it :d
does any of you guys have an idea how to do this? i have no experience with python, so i really need your help. i guess it's a nice feature, because there are more people like me who use an xbox with xbmc for in-car use.
the only thing that needs to be added, is that somehow python saves a (text)file, with the current song playing, inclusing minutes & seconds, when i press the 'shut down' button in the main menu.
when starting-up xbmc again, pyhton opens the (text)file and resumes the songs, starting at the according minutes & seconds.
that would be very cool, ..... but i don't know how!
ok, i'm just checking out the the my music part of xbmc.
one thing i just keep on forgetting is saving a playlist.
isnt it possible to have it remember the last playlist even if you have not given it a name or saved it?
pressing black should bring it up.
you can already easily clear it from there if people want to.
Mr_Maans
2005-01-04, 17:15
hey
i realy like the way this prodject is coming along. and here is an sugestion for the future.
on my regular dvd-player i have a function that if i press stop och switch it off i can always resume the movie from the point there i stoped watching... this feature i´d would like to see in xbmc aswell.
it´s mostly for the movies i think but i would like this feature to remember the moviepossition if i: stop the movie, turn off the box, switch to weather, music, games/program aswell..
tell me what you think!
thankz emil
muzzakus
2005-01-07, 14:28
resume playback is highly desirable from where i'm sitting !
also a recently played files list...so i know what episode i left those damn futuramas at.
:)
muz
DJDiggler
2005-02-13, 22:02
i've set up my xbox in my car as the center of my stereo. one thing i really miss about my cars normal mp3 cd player is the resume feture, which starts a mp3 from the exact point where it left off when you shut off the car. would this be possible in xbmc? i imagine it would be farily complicated....
i would like to have a simple pop up after pressing "b" when watching a video. instead of just exiting, the pop-up would ask 3 options:
bookmark | exit | resume
the problem is that i seem to always loose my place after clicking b...
if there is already an option, please let me know.
jmarshall
2005-03-08, 12:04
it's a reasonable idea, but i think that it can be enhanced somewhat. eg there's nothing stopping xbmc always saving the last position of the film - that way you don't need to explicitly do so. then a button on the osd for resume from last saved position would do the trick.
any other ideas?
yes that sounds good.
so after exiting w/ b, and you scroll thru the list of movies, there will be a 'greyed out' button that becomes active if there's an auto bookmark.
simple, i like it.
jmarshall
2005-03-09, 22:36
added to cvs :)
cool feature... cannot wait to use!!!
nice feature thanks jmarshall.
quick note :
if you have a xvid file with an mp3 soundtrack and its not enabled in the osd then this feature does not work as the counter stays at 0:00:00
the audio stream bug has been around a while now but i fixed by manually selecting it then the database remembers.
???
not a major issue and quite difficult to explain as i guess it would have been mentioned before otherwise.
i've compiled the latest cvs but this feature doesn't work for me. the "resume video" option is always disabled.
11-03-2005 13:32:09 error cvideodatabase::addbookmarktomovie(smb://192.168.1.3/videos/sample.avi) failed
i've deleted the video database but the problem is still there.
do you have sound on the video as i stated above?
i don't think sample.avi does if its the clip i think it is...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
look above your last post - 1 line up :)
i tried different avis/mpgs from samba and from the xbox hard drive but none worked.
jmarshall
2005-03-11, 15:41
there may be a bug - iirc i may have missed a part of the update code. are you trying to add a bookmark when you play the item, or does it present that error in the logs just when you click on the item?
the error appears when i click on the item.
btw, i don't know if this is related (database problems?), but if i change the video zoom/pixel ratio with the osd, those settings aren't kept the next time i play the video.
how strange before deleting video.db and redoing my thumbs from imdb the resume feature worked... now it does not?
jmarshall
2005-03-12, 11:16
yeah, there was a bug - i forgot to update the create table command in one of the functions.
i fixed it in cvs last night.
cheers,
jonathan
can you explain how this is supposed to work as it does not seem to work for me at all and i've tried several builds up to 3/22.
thanks
jmarshall
2005-03-29, 18:16
1. play file.
2. stop file at some point.
3. press white on file.
4. press resume playback.
5. enjoy.
i've modified my copy of the startupmp3 script ( mp3.py ) to save the current playing state every 10 seconds and use that on bootup to resume to the last song & approximate position.
its a quick and nasty script but it works :)
it sounds like what you need :
[code]import xbmc
import os
from time import *
try:
lastfh = open( 'q:\\scripts\\currentfile.txt', 'r' )
lines = lastfh.readlines()
trackfile = lines[0].rstrip(" \n")
trackpos = lines[1].rstrip(" \n")
lastfh.close()
xbmc.player().play(trackfile)
xbmc.player().seektime(float(trackpos))
except:
file = 'q:\\scripts\\startupmp3\\startup.mp3'
xbmc.player().play(file)
sleeptime = time()+10
while true:
if time() < sleeptime:
sleep(1)
else:
if xbmc.player().isplaying():
filehandle = open( 'q:\\scripts\\currentfile.txt', 'w' )
filehandle.write( xbmc.player().getplayingfile() + "\n" )
filehandle.write( str(xbmc.player().gettime()) )
filehandle.flush()
filehandle.close()
else:
try:
os.remove('q:\\scripts\\currentfile.txt')
except oserror:
sleep(1)
sleeptime = time()+10
/code]
when you don't finish a movie in one shot, you currently have to do quite some actions to continue where you left off:
-menu
-select bookmark submenu
-(clear old bookmarks)
-create bookmark
-exit menu
-stop
& on resuming:
-start movie
-menu
-bookmarks submenu
-select bookmark
this could be simplified to:
-press stop (xbmc saves movie name and bookmark in background)
and to resume:
- a "resume last" button in video screen (perhaps some seconds before the current position, but that could apply to any bookmark)
what do you think?
ezd
ps december last year a formal req was entered, but i guess getting the xbmc core in top shape was then priority #1 :)
jmarshall
2005-05-28, 13:42
nope.
just stop the movie at any point. then just press white on the movie you wish to resume. we have an idea to improve this further, by making a popup button during the first 5 seconds of movie play "press here to resume movie".
cheers,
jonathan
wow, great this is already implemented in that way, i was already puzzled by the changelog mentioning resume, but thought it might have meant "resume from pause" or something similar.
the popup indeed sounds extra luxurious, but this is already wonderful!
:bowdown:
thanks,
ezd
funkydude101
2005-08-09, 21:57
i have my xbmc in my car...and it would be great if when it started up, if i could have the option of playing a song where it left off, or at least start in the album directory where i was last.
wouldn't have to be the same position in the song (because i guess it would have to constantly save the location of the song in the event the xbox turns off) but perhaps just the song itself.
anyways this is my first post on this forum so hello guys!
funkydude101
2005-08-28, 00:34
i've modified my copy of the startupmp3 script ( mp3.py ) to save the current playing state every 10 seconds and use that on bootup to resume to the last song & approximate position.
its a quick and nasty script but it works :)
it sounds like what you need :
[code]import xbmc
import os
from time import *
try:
lastfh = open( 'q:\\scripts\\currentfile.txt', 'r' )
lines = lastfh.readlines()
trackfile = lines[0].rstrip(" \n")
trackpos = lines[1].rstrip(" \n")
lastfh.close()
xbmc.player().play(trackfile)
xbmc.player().seektime(float(trackpos))
except:
file = 'q:\\scripts\\startupmp3\\startup.mp3'
xbmc.player().play(file)
sleeptime = time()+10
while true:
if time() < sleeptime:
sleep(1)
else:
if xbmc.player().isplaying():
filehandle = open( 'q:\\scripts\\currentfile.txt', 'w' )
filehandle.write( xbmc.player().getplayingfile() + "\n" )
filehandle.write( str(xbmc.player().gettime()) )
filehandle.flush()
filehandle.close()
else:
try:
os.remove('q:\\scripts\\currentfile.txt')
except oserror:
sleep(1)
sleeptime = time()+10
/code]
i tried this...but for some odd reason it only worked once...and now i can't seem to get it working again...i have no idea why.
this is my autoexec.py (i just saved the code as startup_playlist.py)
import xbmc, time
xbmc.executescript('q:\\scripts\\startup_playlist. py')
i've also tried without importing time. still doesn't work. :help:
los93sol
2005-09-03, 23:44
just stop the movie at any point. *then just press white on the movie you wish to resume. *we have an idea to improve this further, by making a popup button during the first 5 seconds of movie play "press here to resume movie".
cheers,
jonathan
bumping this one as well...would love to see something similar to what jmarshall has described only slightly different. if xbmc saves the point you left off then on resume i would like to see if do a popup before even starting the video "would you like to resume playback where you left off?" then a simple "yes" or "no" dialog. would be a huge enhancement to the usability of this feature in my opinion.
regards,
los93sol
Gamester17
2005-09-04, 01:09
powerdvd (for windows pc) have auto-resume implemented in a nice way; if press 'pause' before 'stop' then (and only then) the position is saved, like a hidded bookmark, ...when later play the same video-file (or insert the same cd/dvd which kicks of auto-start) then it gives you the option to resume (by asking with a simple yes" or "no" dialog). however if a movie is stopped by just the 'stop' button then no bookmark is saved. powerdvd does this for dvd's by checking and remembering the discid.
los93sol
2005-09-04, 02:55
that is pretty much the perfect system, i would have to question whether users would know if it was there or not though since most of the time when i stop watching a movie i am in a hurry and just press b to close it then open the shutdown menu and click shutdown. i still think it is best to just let it do it on stop. would be interesting to see what other ideas people have to completely automate the system. i believe if you are withing a certain distance of the end of a file it does not resume, if not, i would think it should work something like if you are within 5 minutes of the end of a movie you wouldn't want to resume...perhaps something like that could be a user configurable setting, "do not resume if within xx minutes of the end of a video" or something to that effect.
regards,
los93sol
is there a way to resume play after a full dvd-disc stop? divx/xvid etc. have this capabiliti in xbmc...
krl
Gamester17
2005-09-13, 17:17
is there a way to resume play after a full dvd-disc stop?no, there's no such option coded for xbmc (would be a nice feature for c++ beginner programmers to look into for xbmc)
pointing out there is no "white" on the xbox remote :) how do we perform this with the remote only?
Gamester17
2005-09-14, 09:33
pointing out there is no "white" on the xbox remote :) how do we perform this with the remote only?huh?, xbmc doesn't have a native 'resume video playback on startup' function so why do you ask that in this topic thread? *
(...if it regards the mentioned python script the you should instead post in the python support forum, thanks in advance).
awaldram
2005-09-14, 21:00
youve lost me gamester 17
just after jonathon stated 'added to cvs' in this thread he states
1. play file.
2. stop file at some point.
3. press white on file.
4. press resume playback.
5. enjoy.
so if xbmc does not have a resume feature whats that about?????
i also would like to know whether this works with remote cant test at present (young children have hogging xbox)
awaldram
2005-09-14, 21:08
nasty dad cant wait.
kids kicked off
its the title button on the remote to access the resume video feature
ah i think i get it this is not an auto resume but a manual resume.?
awaldram
2005-09-14, 21:24
the 'resume play' thread is linked to the 'resume play when xbmc starts'
thats where the confusion has come from.
hi,
it would be great if the xbmc could automatically start playing the "last played song before shutdown" (and continue from there on in the corresponding folder/playlist) when starting up. :o
regs
coyote
is it possible to resume music or audio after a reboot?
i ask because this is my current situation. i have installed an xbox in my car with all of my music on the hard drive. i get in the car, browse through my whole music library (278 albums) and find one i want to listen to. i stop for gas, turn off the car... get back in turn the car back on and i have to go through the whole boot/browse/play routine and it's getting to be a bit of a hassle. especially if i want to play something that is near the end of the list.
is it possible for xbmc to "remember" where it was at as it was playing a particular file and resume where it started directly after a reboot? i've googled/read through the faq/searched this forum and there isn't really any reference to it.
thanks in advance for your help and suggestions.
-mess
no, there is no resume after reboot.
** edit **
but, it may be possible with a playlist and a python script to fake it. python has access to the currently playing song so it could keep writing the current song into a text file. then on reboot, autoexec.py could process the playlist, skipping until it gets to the last song that was recorded, and resume playing from there.
thank you for your reply. i don't know python but i guess now's going to be the time to learn. i imagine this would be a stupid simple feature to impliment natively if a dev wouldn't mind taking the time.
i'll look into it and post what i come up with if i can figure something out via python.
thanks again for your reply!
***edit***
mods could you move this to the feature request forum? thanks!
*********
it's been a few months and i haven't been able to get this resolved. any chance this can get rolled into a cvs? thanks in advance.
bump. if anyone has any information on how to impliment this via python (i tried the script posted earlier in this thread and it's buggy to say the least) or some other way could you please reply? thanks in advance for your help.
i'm just like herpes, i won't go away. anyway, if anyone can take a look at this i'd be willing to give my first born to get a resolution to this! thanks!
you could consider to not shutting down your xbox. lol :p .
(use pauze)
sollie
funkydude101
2006-05-25, 05:45
really this feature should be implemented.
tons of people like myself have xbmc in our car and when starting up going through a whole list of albums is tedious.
anyone who is fluent with python, can you tell me why this script only works the first time and never again? it seems like a problem with writing over a file if it only works the very first time.
import xbmc
import os
from time import *
try:
lastfh = open( 'q:\\scripts\\currentfile.txt', 'r' )
lines = lastfh.readlines()
trackfile = lines[0].rstrip(" \n")
trackpos = lines[1].rstrip(" \n")
lastfh.close()
xbmc.player().play(trackfile)
xbmc.player().seektime(float(trackpos))
except:
file = 'q:\\scripts\\startupmp3\\startup.mp3'
xbmc.player().play(file)
sleeptime = time()+10
while true:
if time() < sleeptime:
sleep(1)
else:
if xbmc.player().isplaying():
filehandle = open( 'q:\\scripts\\currentfile.txt', 'w' )
filehandle.write( xbmc.player().getplayingfile() + "\n" )
filehandle.write( str(xbmc.player().gettime()) )
filehandle.flush()
filehandle.close()
else:
try:
os.remove('q:\\scripts\\currentfile.txt')
except oserror:
sleep(1)
sleeptime = time()+10
back for the millionth time. please please please, can someone take a look at this. i will toss in my second born now for a resolution to this problem!
another month, another round of begging for this to be implimented. http://www.xboxmediaplayer.de/forums/non-cgi/emoticons/cry.gif
PerceBal
2006-06-15, 02:38
mess, i want to support you in this "quest".
right now the only feature i miss in xbmc is music playback resume on reboot.
the xbox is my main living room media center. sometimes i want to play music for a short time, for example while having breakfast, but i have to switch on the tv, navigate through the menus, choose what to play... so most mornings i leave the xbox off. it wouldn't be the same if i only had to power on the console and the amp... just like i used to do with my old stereo.
of course i'm not demanding anything, i'm only suggesting what imho is the feature which would make xbmc absolutely perfect.
greetings!!!
mesh, i want to support you in this "quest".
right now the only feature i miss in xbmc is music playback resume on reboot.
the xbox is my main living room media center. sometimes i want to play music for a short time, for example while having breakfast, but i have to switch on the tv, navigate through the menus, choose what to play... so most mornings i leave the xbox off. it wouldn't be the same if i only had to power on the console and the amp... just like i used to do with my old stereo.
of course i'm not demanding anything, i'm only suggesting what imho is the feature which would make xbmc absolutely perfect.
greetings!!!
hey, thanks for the support. really, for the kind of refinement that xbmc is at right now. this really seems pretty rudimentary. but, like i said, i would really, really love for some developer to take this on! i would be eternally greatful!
thanks again for the support! :kickass:
for anyone that happens upon this thread, it was started almost exactly 2 years ago. compare how many thread views this one has had to the other requests on this board. :verysad:
sourceforge.net - feature request page (http://sourceforge.net/tracker/index.php?func=detail&aid=987751&group_id=87054&atid=581841)
please! hook up a resume! :lookaround:
:help:
hi all.
i'm putting my second x-box in my car, connected to my navi lcd.
it'll be used for video, when i'll be stopped or when the passenger looknig at, and for this is enough the remote...
but when i'm alone it'll be used for music. i can start a random song when xbmc start... but i'll be really better if i can resume the last song and start form when it stopped.
i can understand that, since i "kill" the power, the xbox cannot remember the time... but at least the last song in the playlist or in the folder i'm playing...
ok, amplying...
the best thing at all will be:
build a system mode, whe can call it "car mode", with this:
1) modified skin, without graphic, but better navigation, grater font and a little place with the album cover, or the equalizer, or the video playing... in car you have a small lcd, from 4" to 7" usualy...
2) a system that, during playing, record in the hd the track playing, the configuration, and, second by second, the time of the track, so, when i shutdown, i always have track of my music, and when i power on, i auto-resume the song and start playing... with all the parameters i was using...
3) an additional system info. in car i can use th xbox as a pc, using it for storing info i can need in my car. witch info?
contacts, most of all with the address and the indication for driving right into their kitchen....
for who don't have a navi the map and driving info... imagine, i go on... http:://www.viamichelin.com ? i search for a driving direction, then i save the html page and move this to the xbox. then i simply scroll down the page and have all the info i need...
text reader...
simply plug-n-play for usb connection... and copying file tool from usb to hd...
photo viewer...
3) (cooool) a sync system. i can plug my ethernet cable or, better, use my wireless lan, to sync all the hing i want: music, video, games, images, info...
this can also be used in home, specialy for who can connect xbox to small lcd video and use this as an hi-fi...
this is enough for you?!?!?
stanley87
2006-09-13, 01:02
hey, i think it would be a good idea in XBMC to be able to enable a memory feature. So when you turn off your xbox playing half way through a song/movie. When you turn it on the next time it remembers this and reloads back to the same place and carries on playing the media. This could be done by XBMC exporting this information to a xml or something just before it is shut down or on a regular basis (every 10 secs) or something so if xbox is shut down suddenly it can still remember, and when XBMC is loaded up again it imports the data from the xml and carries on.
Just an idea, would be handy for when i put the xbox in the car and use it for my music etc. So acc is switches off and when it is switched on again, it goes right back to the playlist or whatever i was on
Stan
one one side is people who ask: why must xbmc access the HDD ?
then we have people like you, who would like it to access it every 10 secs
L O L
after 2.0 we plan to add virtual memory support, then this can be done aswell
stanley87
2006-09-13, 03:41
yeh, well, i would turn xbmc off via the off button so i wouldnt need the 10 sec feature, just a thought, im a car audio technician so love the memory feature. Any way, cheers for the reply and greetings from New Zealand
:-D
one one side is people who ask: why must xbmc access the HDD ?
then we have people like you, who would like it to access it every 10 secs
L O L
after 2.0 we plan to add virtual memory support, then this can be done aswell
Nuka1195
2006-09-13, 07:39
somebody was writing a script to do that, post a message in there
hey guys, any updates on this yet? version 2 is out now....
I'd be willing to pay someone to code this for me, drop me an email - robert_aus@hotmail.com
I will pay 100$ for the implementation of this feature and it's incorporation into an SVN. Please feel free to PM me for details.
If anyone would like to donate to this feature implementation, I will personally hold donations for this implementation where all funds will be given to the programmer who successfully implements this feature. I will repost with the total after every donation (if any). Thanks.
Last year I've created a simple Python script combination which does just this; the Stop key is remapped to call a script which saves the state, and another script can be called through the GUI resuming that file from that position.
See http://xbmc.org/forum/showthread.php?t=23489
This script could of course also be immediately started through the Autoexec py file.
Only annoying issue currently is that once in a while during resuming XBMC hangs, I believe that may have to do with setting the position while the movie is not yet completely loaded.
Since the script is rather straightforward, perhaps a dev may find it easy to track down the solution to this problem.
Cheers,
ezd
(if this helps out any donation planner, help out the core dev team with it :-) )
there is already a script out for this. please use that, called resumeX i belive
there is already a script out for this. please use that, called resumeX i belive
Fantastic news. Thank you so much for this. I have been waiting for over 3 years for this.
stanley87
2007-10-07, 08:34
Yeh, now wheres my money?
Oh, heres a download link for ResumeX by the way.
http://www.xbmcscripts.com/index.php?option=com_docman&task=search_result&Itemid=Array&search_mode=phrase&search_phrase=ResumeX%20v0.4
If you have any thoughts etc on the script, let me know.
Cheers,
Stanley87