Resume Function

General discussion about Universal Media Server (no support or requests)
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Resume Function

Post by SharkHunter »

Hi,

As some may have noticed we've added a "Resume Function" to UMS. The short story on resume can be found in the tool-tip in the GUI. Here I'll lay out the words a bit more.

First of all what is resume? Resume means that if you haven't watched the WHOLE video (currently only implemented for video) you can come back and resume your viewing from where you left at a later time. This means that if you stop viewing after 2 hours of that 4 hour marathon movie you can pick up viewing and don't need to see the first 2 hours again.
So how does this works in UMS?

First there is (as always) a "on/off" switch for the feature. If you set it to off UMS will not do any resume handling.
When a video stops UMS will look if the WHOLE video has been played. If it has nothing more happens. If the WHOLE video hasn't been played UMS will note how long into the video you've watched store this information on disc (which means that it survives restarts of UMS/the computer) and create IN THE SAME folder an entry with the same name prepended with "Resume: ". Now you'll have two entries in the folder which are the same video. The resume entry which will start from your resume point and the "regular" one which will start from the beginning again. An important note here is that there can only be one resume entry (per video) at a given time. If you start playing the "regular/original" video from start again it will overwrite/update any old resume that exists.
If you look at the video via the resume entry and you watch the WHOLE video the resume entry is removed, if you didn't watch the WHOLE video the resume entry is updated.
IN THE SAME folder means exactly that. You must follow the exact same path to get the resume. For file based videos this is normally no big issue but for web based it can be. If you place the exact same video in two different web folders you can only get resume from the folder where you did the first play.

Now to some real gory tech details.
What is the WHOLE video? A movie that is 1.54h is of course played once all 1 hours and 54 minutes has passed or? Now we work with computers here and we will not get that exact timeing. A movie might be reported to be 1.54.00 but the render stops playing at 1.53.45 thus skipping the last 15 secs. To account for this UMS consider the whole movie to be played if a percent factor of the expected movie was played. By default it is 92% but you can configure it to other values (set "resume_back=x" where x is the %).
Since timers of stop/start are not 100% correct UMS will "rewind" the stop time a little bit to make sure you don't miss anything. By default this rewind time is 17 seconds which means you' see the last 10-15 seconds one more time. This time can be modified as well (set "resume_rewind" to desired time). Finally to avoid videos that crashed or was unplayable etc. the video must play at least a "long enough" time. By default it is 10 secs (configurable "min_playtime", "min_playtime_file","min_playtime_web").

Resume is a generic option and should work regardless of how the media entry is added to the UMS (be it disc,web,plugin or whatever). However some type of videos are by there nature not resumeable (like live streams) or the media might not support timeseeking and for those resueme of course doesn't work.

This is a new feature and even though we've tested it quite much there might be things that doesn't work as expected so pls help us with bugs. Don't forget to upload full logs...
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
Auka
Posts: 3
Joined: Sat May 18, 2013 7:54 am

Re: Resume Function

Post by Auka »

Hello,

This may sound silly, but how do I get rid of the temporarily resume file after I've finished watching the video?

Thanks in advance.
User avatar
Madoka
Posts: 328
Joined: Fri Jun 01, 2012 12:51 pm

Re: Resume Function

Post by Madoka »

You can delete the "resume" file in the UMS folder in the Program data file. It's in a folder in the data folder, IIRC.

SH,

How long does the file stay? Until you resume it and watch to the end?

Here's my issue. I do like the idea of the resume function. But I have a ton of TV shows, and sometimes I will forget which one I last watched. So, say I think my next file is Ep 6. I'll start it and realize that I've seen it. I stop it and watch Ep 7. Now I have a resume file for Ep 6 that I don't really intend to resume.

Maybe we can have a user defined time to remove resume files (like Remove after X days where we can chose X) or maybe easier, a button that would delete all resume files?

Just a thought. Thanks for a great program!!
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: Resume Function

Post by SharkHunter »

Auka - If you watched the whole video there should be no resume file. It should be removed automatically. It might be a bug. Upload logs...

Madoka - forever is the correct answer (or until you watched the whole video). When I started this I also thought I should have some auto cleanup of the resume files but somewhere along the line I changed my mind. I think adding a auto cleanup setting is a good idea so I'll most likely add it.
To solve your problem right now you could set the "min_playtime". This controls how much you must have watched before resume kicks in. So set this to 2-3 minutes or something.
Note that the min_playtime should be set in milliseconds thus 2 mins is 120000..
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
User avatar
Optimus_prime
Posts: 678
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: Resume Function

Post by Optimus_prime »

Sharkhunter, Auto Cleanup sonds good but what about a button/setting in the gui to cleanup when the user wants to. Just a thought
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: Resume Function

Post by SharkHunter »

I'm too fast for my own good. I already added auto cleanup + the possibility to remove resume files (all or one by one). Not from the gui (since the gui is cluttered as it is) but from the server settings folder on the XMB.
It's merged and will be part of the next release.
Once released set the "resume_keep_time" to the number of days you want to keep your resume file.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
User avatar
Optimus_prime
Posts: 678
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: Resume Function

Post by Optimus_prime »

I walked away for 5 mins and you've already done it. You guys are fast :D
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum
User avatar
Madoka
Posts: 328
Joined: Fri Jun 01, 2012 12:51 pm

Re: Resume Function

Post by Madoka »

Been trying out a2.

When trying to resume an .mp4 file that's streamed to my PS3, I get a data cannot be played error.

I am able to resume a transcoded .avi file with subtitles, but it says the files is 24:00 long (ok) but the time starts at the start of the file instead of the actual time I stopped/resumed the file.
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: Resume Function

Post by SharkHunter »

Madoka wrote:Been trying out a2.

When trying to resume an .mp4 file that's streamed to my PS3, I get a data cannot be played error.

I am able to resume a transcoded .avi file with subtitles, but it says the files is 24:00 long (ok) but the time starts at the start of the file instead of the actual time I stopped/resumed the file.
Pls upload some the logs. I haven't tried with the PS3 but I suspect that it behaves completely different from the others (sigh). But I think the logs will show that.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
User avatar
Madoka
Posts: 328
Joined: Fri Jun 01, 2012 12:51 pm

Re: Resume Function

Post by Madoka »

Just to clarify, with the resume avi file I mentioned, the file starts playing at the time I stopped (say @ 15:00), but the time bar starts at the beginning of the file, so jumping back doesn't work as the PS3 thinks I'm at the start of the file.

In the log, the first file is the mp4 that fails, and the second file was stopped at 2 minutes into the file. It resumes at 2 minutes, but the time bar starts at 0:00:00 again.
Attachments
debug.7z
(8.89 KiB) Downloaded 603 times
Post Reply