Reply
Thread Tools
Posts: 118 | Thanked: 16 times | Joined on Sep 2007
#1
What music player is best for audiobooks? The most important feature I am looking for is the ability to place bookmarks or have the app remember the last position of play. I have large audiobooks that are set up as a continuous audiobook so it is imperative that the player has some way to resume playback. I have heard of kabook for KDE, but I am looking for something that runs on the general OS.
 
Posts: 112 | Thanked: 28 times | Joined on Mar 2008 @ Victoria, BC
#2
I have been puzzling over this same question and have arrived at the conclusion that none of the media players for the Nokia nXX support audiobooks. None have a resume function or a bookmark function.
 
jldiaz's Avatar
Posts: 48 | Thanked: 40 times | Joined on Apr 2008 @ Spain
#3
Mplayer could be a candidate. It can play a wide range of audio formats, and in the latest version it is able to resume the last file played.

However, in order to be a good audiobook player some changes are needed:
  1. The GUI only shows videos. It does not show audio files (although it can play them if they are selected through the "Open" button)
  2. The resume capability is only present in the GUI (as far as I know), so it is limited to video files.
  3. The resume capability only remembers the resume point of the last file player. It would be very useful if it could remember a resume point for *each* file played. I don't think this is a technical limitation. The resume point is stored in the file ~/.mplayer/video.position and currenty only contains one line. It would be possible to include several lines here, one per file played.
  4. It does not provide bookmarking, but perhaps it would be not difficult to add it using the same mechanism than the one used for resuming.

However, it is also possible to use mplayer from command line, to play an audio file. The command-line version allows for the option -ss to start playing at any specified offset in the file (specified as seconds, or as HH:MM:SS). This would allow for a python script which manages the bookmarks and calls mplayer with the appropiate -ss options. Mplayer is continuosly printing the playing position in the standard output, so the python script could parse this information, in order to store the time offset at which mplayer is stopped, and save it as a resume point (to be used with option -ss in the next play).
__________________
--ル Diaz
 
Posts: 118 | Thanked: 16 times | Joined on Sep 2007
#4
Originally Posted by jldiaz View Post
Mplayer could be a candidate. It can play a wide range of audio formats, and in the latest version it is able to resume the last file played.

However, in order to be a good audiobook player some changes are needed:
  1. The GUI only shows videos. It does not show audio files (although it can play them if they are selected through the "Open" button)
  2. The resume capability is only present in the GUI (as far as I know), so it is limited to video files.
  3. The resume capability only remembers the resume point of the last file player. It would be very useful if it could remember a resume point for *each* file played. I don't think this is a technical limitation. The resume point is stored in the file ~/.mplayer/video.position and currenty only contains one line. It would be possible to include several lines here, one per file played.
  4. It does not provide bookmarking, but perhaps it would be not difficult to add it using the same mechanism than the one used for resuming.

However, it is also possible to use mplayer from command line, to play an audio file. The command-line version allows for the option -ss to start playing at any specified offset in the file (specified as seconds, or as HH:MM:SS). This would allow for a python script which manages the bookmarks and calls mplayer with the appropiate -ss options. Mplayer is continuosly printing the playing position in the standard output, so the python script could parse this information, in order to store the time offset at which mplayer is stopped, and save it as a resume point (to be used with option -ss in the next play).

Unfortunately, I have no maemo or python programming experience and am not able to implement those changes. Hopefully, someone will in the future.
 
Posts: 112 | Thanked: 28 times | Joined on Mar 2008 @ Victoria, BC
#5
I am not up to this task either. I am in the process (very slow) of cloning the OS so I can try GArnet VM and pocket tunes on a much larger partition. I will be able to load books onto the same partition as GVM and still have tons of room. I'll post my results.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#6
Why does everyone want to do everything with Python?
Shell scripts, awk, etc. are more than sufficient for this task. If you need limited graphical interaction with the user, gxmessage is in these forums.

What format are your audiobooks? mpg123 might seem a more natural choice than mplayer, if they're mp3; otherwise mplayer might be better.
 

The Following User Says Thank You to Benson For This Useful Post:
jldiaz's Avatar
Posts: 48 | Thanked: 40 times | Joined on Apr 2008 @ Spain
#7
Originally Posted by Benson View Post
Why does everyone want to do everything with Python?
Shell scripts, awk, etc. are more than sufficient for this task.
You are right. Using python for everything is a tic. I accomplished this task with a simple shell script and a little of awk. Here is how:

Copy the following code to a file named, for example abplayer (from "audiobook player), or wathever you like:

Code:
#!/bin/sh
if test -f "$1".resume
then
 resumepoint=`cat "$1".resume`
else
 resumepoint=0
fi
mplayer -ss $resumepoint "$1"|awk 'BEGIN{RS="\r"}{if ($1=="A:") t=$2}END{print t}' > "$1".resume
Put this file in a place where your shell can find it (I have a "bin" folder in my $HOME, and a line in the .profile for adding this folder to the PATH variable). Make executable this file (chmod +x abplayer).

Then, use it from the command line (xterm) like this:
Code:
$ abplayer /route/to/audiobook.mp3
The audio begins to play. When you press 'q', the player is exited, and a new file is created, with name /route/to/audiobook.mp3.resume which contains the time in which the playback was quitted. Next time you use abeplay, it will search for this file. If it founds it, the playback is resumed from that point. If not, it is restarted again from the beginning.

If the player exits unexpectedly and the .resume file is corrupt, you have to delete it (or you can write a correct one with any editor, it only contains the time where the playback has to be resumed, in the format hh:mm:ss.ff, being ff any fraction of second, for example: 3:21.52)

Originally Posted by Benson View Post
What format are your audiobooks? mpg123 might seem a more natural choice than mplayer, if they're mp3; otherwise mplayer might be better.
I used mplayer because I have it already installed, and supports a wide range of formats. As for mpg123, I did not find it with apt-cache...
__________________
--ル Diaz
 

The Following 4 Users Say Thank You to jldiaz For This Useful Post:
Posts: 118 | Thanked: 16 times | Joined on Sep 2007
#8
Originally Posted by jldiaz View Post
You are right. Using python for everything is a tic. I accomplished this task with a simple shell script and a little of awk. Here is how:

Copy the following code to a file named, for example abplayer (from "audiobook player), or wathever you like:

Code:
#!/bin/sh
if test -f "$1".resume
then
 resumepoint=`cat "$1".resume`
else
 resumepoint=0
fi
mplayer -ss $resumepoint "$1"|awk 'BEGIN{RS="\r"}{if ($1=="A:") t=$2}END{print t}' > "$1".resume
Put this file in a place where your shell can find it (I have a "bin" folder in my $HOME, and a line in the .profile for adding this folder to the PATH variable). Make executable this file (chmod +x abplayer).

Then, use it from the command line (xterm) like this:
Code:
$ abplayer /route/to/audiobook.mp3
The audio begins to play. When you press 'q', the player is exited, and a new file is created, with name /route/to/audiobook.mp3.resume which contains the time in which the playback was quitted. Next time you use abeplay, it will search for this file. If it founds it, the playback is resumed from that point. If not, it is restarted again from the beginning.

If the player exits unexpectedly and the .resume file is corrupt, you have to delete it (or you can write a correct one with any editor, it only contains the time where the playback has to be resumed, in the format hh:mm:ss.ff, being ff any fraction of second, for example: 3:21.52)



I used mplayer because I have it already installed, and supports a wide range of formats. As for mpg123, I did not find it with apt-cache...

Thanks, this looks good. However, when I tried this I keep getting
"sh: abplayer: Permission denied"
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#9
chmod +x abplayer
 
Posts: 118 | Thanked: 16 times | Joined on Sep 2007
#10
Originally Posted by Benson View Post
chmod +x abplayer

I did that and it still says "/bin/sh: abplayer: not found"
 

The Following User Says Thank You to MstPrgmr For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 08:51.