LinHES Forums http://forum.linhes.org/ |
|
mplayer-resumer.pl - How to reset bookmark ? http://forum.linhes.org/viewtopic.php?f=6&t=9785 |
Page 1 of 2 |
Author: | gfoster [ Mon Apr 24, 2006 11:40 am ] |
Post subject: | mplayer-resumer.pl - How to reset bookmark ? |
Noticed the mplaoyer-resumer.pl, and gave it a try. Thought things were busted until I found a post referencing problems handling filenames with spaces. (Put $inifile in single quotes on line 100, worked here). Is there a keypress in mplayer to start from the beginning of the video (short of seeking backwards). I was actually thinking that when the video finished, it would reset the position to the beginning, but no such luck. Any help would be appreciated. Greg. |
Author: | cyates [ Tue Apr 25, 2006 7:43 am ] |
Post subject: | |
I tried the mplayer-resumer.pl script last night. It worked fine for me. I let the movie play to the end. mplayer exits and I'm back at the myth screen. If I try to play the movie it returns me directly back to the myth screen. If I try it a second time it starts the movie from the beginning. Other than that bit of oddness it works like a champ. I really like this resume for mplayer. It's like a bookmark in the video and is transparent to the user. |
Author: | gfoster [ Wed Apr 26, 2006 5:02 am ] |
Post subject: | |
Hmmm. I'm still returning to the last frame each time. What's the 'command line' you're using for mplayer-resumer within myth for video ? |
Author: | cyates [ Sat Apr 29, 2006 8:34 pm ] |
Post subject: | |
After posting the previous message saying it works fine I'm now having issues. Some videos work fine, some continually repeat the last second of the movie. Hmmm...more research needed. |
Author: | gfoster [ Mon May 01, 2006 6:15 am ] |
Post subject: | |
Just wondering if file names with spaces is screwing things up somewhere else in the code. Will have to check when I get home. |
Author: | cyates [ Mon May 01, 2006 10:01 am ] |
Post subject: | |
Not for me. All my videos are space-less ![]() |
Author: | gfoster [ Mon May 01, 2006 10:04 am ] |
Post subject: | |
Anyone know if the return code on mplayer is different, depending on whether the movie finished by itself, or the user exited ? I suppose this would be the easiest way to script around nuking the 'resumer' stub. |
Author: | Human [ Mon May 01, 2006 1:03 pm ] |
Post subject: | |
Wow, people are actually using this ![]() If you're having trouble, the bookmark file is a useful resource. For a video at $path/$filename, the bookmark file is $path/.$filename.resume, e.g. /myth/video/movie1.mpg -> /myth/video/.movie1.mpg.resume The bookmark file contains an offset corresponding to the number of seconds from the start of the video. You can compare this with the offset reported by mplayer when you run it by hand. The kind of line we care about looks like this example: Code: A:1215.2 V:1215.2 A-V: 0.006 ct: 0.210 207/201 13% 0% 1.9% 0 0 68%
But all we care to look at is the first number. This should get you started if you want to help debug it. There are definitely bugs in the script and bugs (or lack of features) in mplayer preventing this from working 100%. I haven't looked at the script in a while, but see if you can determine a pattern in the contents of the bookmark file, mplayer's reported timecode, and the behavior you're seeing. If you just want to zap the bookmark, remove the bookmark file. |
Author: | cyates [ Tue May 02, 2006 5:25 am ] |
Post subject: | |
I've made a slight modification to the script. If the script is restarted within five seconds it will clear the xx.resume file and allow the movie to start from time 0. It can be found at http://knoppmythwiki.org/index.php?page ... ayerResume Make a backup of /usr/local/bin/mplayer-resumer.pl and move to the /usr/local/bin dir. Be sure it is chmod 755 by the root user. Good luck and let me know if it works. Chris |
Author: | Human [ Tue May 02, 2006 11:04 am ] |
Post subject: | |
cyates wrote: I've made a slight modification to the script. If the script is restarted within five seconds it will clear the xx.resume file and allow the movie to start from time 0.
That's fine as an initial workaround, though I would have just made use of the timestamp of $resumefile instead of writing a text timestamp into a second file. The root cause still needs to be addressed, though, and you've made it more usable in the current buggy cases. Good work ![]() |
Author: | cyates [ Tue May 02, 2006 3:09 pm ] |
Post subject: | |
Brilliant suggestion, why didn't I think of that ![]() I'll try the .resume file time code and see how it works. I'm a perl noob so every line of code is hard fought. Chris |
Author: | cesman [ Tue May 02, 2006 3:22 pm ] |
Post subject: | |
I'll have to update the ISO with the new version. |
Author: | gfoster [ Wed May 03, 2006 5:17 am ] |
Post subject: | |
Cesman: would a question in the install script asking if you wanted to enable 'resume' support for videos, and injecting the modified /path/to/mplayer-resumer.pl be viable ? |
Author: | cyates [ Wed May 03, 2006 7:17 am ] |
Post subject: | |
I've updated the script so it no longer writes .resumer-time files. It gets this info as suggested in a previous post. Script can be found at http://knoppmythwiki.org/index.php?page=mplayerResume or http://knoppmythwiki.org/index.php?bina ... fc7581.bin |
Author: | Human [ Wed May 03, 2006 8:35 am ] |
Post subject: | |
gfoster wrote: Cesman: would a question in the install script asking if you wanted to enable 'resume' support for videos, and injecting the modified /path/to/mplayer-resumer.pl be viable ?
Remember, the resumer won't yet work on certain video formats, or any videos played from read-only locations. If such a question is asked, it should be made clear that this is alpha code. |
Page 1 of 2 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |