[MPlayer-dev-eng] Saving position and Bookmark functionality.

Michal Majchrowicz m.majchrowicz at gmail.com
Wed Aug 22 14:15:09 CEST 2007


Hi
I would like to help in implementing two things in mplayer:
1) Saving the position of current file when quting the mplayer and
loading this position when the file is opened the next time.
2) Add possibility to manually save/load file position at any moment
for instance using key combinations.
Here is an example of implementation that explains the details:
When mplayer plays some file it creates ".mplayer" directory in
current dir. So for instance we are playing file /opt/my_movie.avi so
we create the directory /opt/.mplayer/ In that directory we create a
file for every file we play. In our exmple we create file
/opt/.mplayer/my_movie.avi.pos These file contains something like
this:
0  - 0
1 - 1:30:00
2 - 0:20:00
3 - 0
....
q - 1:34:12
Lines with numbers (from 0 to 9) refer to bookmarks(The format is
"bookmark number - position in file"). When user hits Ctrl+1 The
position of current playback is saved in second line (1 - 1:30:00).
When user hits Alt+1 the bookmark from second line is loaded (which
means settings the playback position to 1:30:00). It is very usefull
when every member of family wants to watch the same movie in different
moments. They only have to save/load their bookmarks and don't have to
wonder "when did I finish last night :)". The line with may be called
the "default bookmark" Everytime you quit mplayer it should save the
current position there and load it when opening the file again.
Similar functionality ("default bookmark") is added by this script:
http://www.spaceparanoids.org/trac/bend/wiki/mplayer-resume
I hope we can find some mplayer-friendly way of implementing it in mplayer :)
I count on your suggestions and advice.
Regards Michal.



More information about the MPlayer-dev-eng mailing list