This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7276 - mpegplayer plugin - resume video feature
Attached to Project:
Rockbox
Opened by jim hagani (jimh_jimh) - Saturday, 09 June 2007, 00:53 GMT+2
Last edited by Robert Kukla (roolku) - Tuesday, 09 October 2007, 23:42 GMT+2
Opened by jim hagani (jimh_jimh) - Saturday, 09 June 2007, 00:53 GMT+2
Last edited by Robert Kukla (roolku) - Tuesday, 09 October 2007, 23:42 GMT+2
|
DetailsThis patch adds a resume feature to the mpegplayer plugin.
With this patch, mpegplayer will create a .resume file in the same directory as the video file. The resume file contains the byte location where playing was stopped. Also, added option to plugin that controls how resuming is handled: ALWAYS (ie, if resume file is found for this video, playing will begin at resume point), PROMPT (ie, if resume file is found for this video, plugin will prompt user whether he/she wants to resume; or NEVER (always start video at byte 0). This patch has been tested ONLY on my gigabeat F40 - please report results on other platforms... |
This task depends upon
Closed by Robert Kukla (roolku)
Tuesday, 09 October 2007, 23:42 GMT+2
Reason for closing: Duplicate
Additional comments about closing: FS#7487 has been committed (provides same functionality and more)
Tuesday, 09 October 2007, 23:42 GMT+2
Reason for closing: Duplicate
Additional comments about closing:
Also, CAPITAL LETTERS IN SPLASHES are not very nice.
also, you shouoldnt use lcd_puts*... you should use FOR_NB_SCREENS(i) {rb->screens[i]->puts*(); } which makes the plugin compatable with targets with more than 1 screens (lcd remotes, etc)
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- rockbox-bleeding\apps\plugins\mpegplayer\mpegplayer.c 2007-05-19 19:38
:22.000000000 -0400
|+++ cygwin\home\j\rockbox\apps\plugins\mpegplayer\mpegplayer.c 2007-06-09 17:05
:03.302509200 -0400
--------------------------
File to patch:
---------------------------------------------------------------------------------
... any suggestions,
Try this patch - I've successfully tested it with the file you provided in the link. All I needed to do was increase the size of the initial read buffer...
I think the files you are having trouble with (like this bigad.mpg) are encoded with audio at 160kbs, not 128kbs like I use for my files...
Please try this patch with all your videos and if any continue to cause problems, please include a link if at all possible.
The attached patch has also two cosmetic changes:
- very small percentages were displayed as huge percentages (probably overflow in the division)
- the interactive prompt would use a buffered button (and not prompt as a result)
EDIT:
Okay, after some more experimentation I can confirm it is the bitrate - not so much the audio bitrate as it is only a fraction of the whole bitrate, but mainly the video bitrate. If one stays below 600 is seems to be okay. I have upped my buffersize to 256*1024 to be on the safe side now, although it is probably a waste of memory.
Rockbox Revision: 13659
Video bit rate: 175
Audio bit rate: 128
Video Length is about 45 minutes.
Resume function says: "Resuming play back at n%", but starts video from beginning for a few seconds, then says "* End of Video *"
The ideal solution would be for the mpegplayer plugin to first calculate all of the .mpeg specifications (video bitrate, audio bitrate, CBR/VBR, total running time, etc) - all of which would be useful. If we had the bitrate (or max bitrate for VBR), we could dynamically set that initial buffer to the correct size for each given video. I don't have a clue how to extract that info from an .mpg file, so I hope that some .mpeg expert can someday enhance the plugin in this regard.
http://lycoloco.thephlogiston.com/files/kylexy-samp.mpg
No idea about the second issue (lockup). File works fine here.
I've never sent a diff, I hope it was created properly.
"I've been using the Cpchan build with the mpeg-resume patch, and its been great mostly, since there's always some reason I have to stop my movie and come back to it later. I've used it successfully on a few different videos that were about an hour long or so. Today however, I was watching a video that was a little more than 2 hours long, and about 86% into it I had to stop it to do something else. Well when I came back to it, it let me resume back to where I was, and the audio played fine, but the video was extremely slow and lagged way behind. I tried messing with the FPS Limit and Frame Skip, and with those off the video was smooth, but way off sync, so I turned them back on, I'm sure they need to stay on. This is like the 4th mpeg I've watched on my Sansa with the resume patch, and definitely the longest, and its the first time I've had a problem with video playback. I started it from the beginning again, and it plays fine, and continues to play fine as long as I don't try to stop and resume it. I can also stop and resume just fine when I'm early into the video, it only happens late in the video.
I don't know if this is a known issue or not, so I just thought I'd let you guys know about it. I'm sure bugs like these will be worked out over time (and fast forwarding would be nice too). In the meantime I'll try to split long videos in half and see if that helps."
- Jim
"The mpeg file is a rip I made of Steve Vai: Live at Astoria, it is exactly 2:20:56 long, and 391 MB (410,374,144 bytes). I ripped it with DVD Shrink and then ran it through AutoGK to make an .avi, then WinFF to convert it to mpeg. I used the default settings for the Sansa e200 series, same as I've been doing for all the rips i've made so far. According to my player on my computer it is encoded at 29.97 fps, which is probably too much for the Sansa because they all do skip a little (I read that 15 fps is about the most it can handle), but I didn't have this problem resuming with any other mpegs. Watching back through the file on my computer, I'd say I quit it and tried to resume it at about the 2 hour mark, which should be right because it tried to resume at 86%. Once I tried to resume it, the problem started, the video was running at maybe 2 or 3 frames per second, but the audio kept playing as normal. I rebooted my Sansa, and tried to resume several times, and it kept doing the same thing. I restarted the video from the beginning and let it play for about 15 minutes before I tried to test it again, and resuming worked no problem then. Strange problem?
I hope this info helps pinpoint the problem. I don't know how many other people are watching 2hr 20min videos on their mp3 players, but its bound to happen again to somebody. I'll let the video play again for 2 hours and try to resume again, maybe it was just an isolated incident. I have a question about the resume patch though, when you leave a video early it adds that resume file to the video folder. I opened one of them up and it just had some numbers in it, I didn't know what they meant. Is there any way to edit the resume file to resume somewhere far into a video without having to watch that far? If its done by byte location, how can I know how many bites equal how many minutes?
Thanks for looking into this."
Gentlemen, we have been working on a means to seek within a movie for sometime now; prior to the start of this patch posting. We have now reached a point where we can post what we have done. There is some overlap in functionality with this resume patch in addition to having more features. The patch we posted includes additional features such as thumbnail preview and movie time seek as well as a ressume feature. This new post has a patch id number 7487. We did not intend to redo other peoples efforts, but we think our approach has a number of advantages. Please, consider it.