![]() |
aUDIOBOOK?
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.
|
Re: aUDIOBOOK?
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.
|
Re: aUDIOBOOK?
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:
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). |
Re: aUDIOBOOK?
Quote:
Unfortunately, I have no maemo or python programming experience and am not able to implement those changes. Hopefully, someone will in the future. |
Re: aUDIOBOOK?
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.
|
Re: aUDIOBOOK?
Why does everyone want to do everything with Python? :confused:
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. |
Re: aUDIOBOOK?
Quote:
Copy the following code to a file named, for example abplayer (from "audiobook player), or wathever you like: Code:
#!/bin/shThen, use it from the command line (xterm) like this: Code:
$ abplayer /route/to/audiobook.mp3If 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) Quote:
|
Re: aUDIOBOOK?
Quote:
Thanks, this looks good. However, when I tried this I keep getting "sh: abplayer: Permission denied" |
Re: aUDIOBOOK?
chmod +x abplayer
|
Re: aUDIOBOOK?
Quote:
I did that and it still says "/bin/sh: abplayer: not found" |
Re: aUDIOBOOK?
Is the location of abplayer on your PATH?
|
Re: aUDIOBOOK?
Yes. I am in /media/mmc2. Here is the xterm
/media/mmc2 # chmod +x abplayer /media/mmc2 # ./abplayer test.mp3 /bin/sh: ./abplayer: Permission denied /media/mmc2 # |
Re: aUDIOBOOK?
Quote:
Code:
$ /home/user/abplayer /path/to/audiobook.mp3Alternatively, you can put the executable at user scripts folder, named for example /home/user/bin, and add this folder to the PATH variable, by writting the following lines in your /home/user/.profile file: Code:
PATH=$PATH:/home/user/bin |
Re: aUDIOBOOK?
Quote:
|
Re: aUDIOBOOK?
Correct; by default FAT systems are non-executable on the Nokias.
|
Re: aUDIOBOOK?
Arrg. Now I moved the file to the /home directory and it says
/home # ./abplayer /bin/sh: ./abplayer: Permission denied /home # chmod +x abplayer /home # ./abplayer /home/test.mp3 /bin/sh: ./home/abplayer: not found /home # ./home/abplayer /home/test.mp3 /bin/sh: ./home/abplayer: not found |
Re: aUDIOBOOK?
Hmmm... I assume you have mplayer installed, and awk is installed by default.
It looks like you typed in the output? If the first line saying Code:
/bin/sh: ./home/abplayer: not found |
Re: aUDIOBOOK?
yea, i dunno. 1/2 the time i get permission denied. the other 1/2 i get abplayer not found. i am now strictly getting abplayer not found. i will reflash later and try again i guess
|
Re: aUDIOBOOK?
Reflashing has nothing to do with this.
Do you in fact have mplayer installed? |
Re: aUDIOBOOK?
Yea, i have mplayer installed. I can execute the test.mp3 file I have by entering mplayer /(path to file)/test.mp3
I don't know if something happened to my N800 or what, but I have gotten different results from typing in the same exact commands. Either not found or permission denied. For the permission denied message I may be able to run chmod +x abplayer on my laptop and then copy the file over to my tablet. The file is definitely there, so I don't know why I get the not found message. Have you tried to run the abplayer file and get it to work? If so, can you post you exact procedure, step by step, so I can delete the file and try again? |
Re: aUDIOBOOK?
Quote:
Code:
sh /home/abplayer /home/test.mp3Btw, /home is not a good place to leave things. Better at /home/user, which is you user folder. |
Re: aUDIOBOOK?
I don't have mplayer, alas.
Try going to where abplayer currently lives, and Code:
pwd |
Re: aUDIOBOOK?
I use Media Player. What i'd like to do is stuff the book into a directory and have Media Player play the directory. It can't. But it can play from a play list. But it can't create play lists.
So i wrote this shell script, and run it from xterm. #!/bin/sh for i in $1/*.mp3 ; do echo `pwd`/$i >> $1.mp3 done I call it 'mkplaylist'. I have it on my root filesystem. Use chmod +x mkplaylist to make it executable. For example: cd /media/mmc2/Audio ls Eldest mkplaylist Eldest ls Eldest Eldest.m3u Then, use Open in Media Player, select Eldest.m3u from the list. On close, Media Player remembers the last track you played. Unfortunately, if you want to listen to something else, like a pod cast, you need to remember where you were in your book. I used to have mkplaylist on the SD card. And, the SD card was VFAT. So, i'd say: sh mkplaylist Eldest to get it to run (can't run stuff from VFAT). But now i use ext3 on my SD card, so this is moot for me. I have xmms installed. However, it sometimes drops the last few seconds of a track. No idea why or what circumstances. But i'll often use xmms to listen to other stuff. Media Player then remembers where i was in my book. I use mplayer to watch movies. But i use an iPod in the car, etc., because the buttons work one handed. |
Re: aUDIOBOOK?
Mediaplayer can make playlists, but I don't think it can auto-generate one from a directory.
Here's a simpler version, though: Code:
#!/bin/shNot quite equivalent to yours, as this wipes the playlist if it already exists; I think this is more useful, but if you wanted it to append, you can change > to >>, of course. Edit: Oh, by the way, ditch media player, use mpd and powerlaunch, and the N800's one-handed, too. Or write your own non-powerlaunch app (could even live in a terminal), just to intercept keypresses and call mpc, thus avoiding the complex generality of powerlaunch. |
Re: aUDIOBOOK?
Quote:
My scripting skills are not so good... but this script works %) Code:
#!/bin/shthanks. |
Re: aUDIOBOOK?
ok, so i got the original abplayer script to work. any ideas how i can get mplayer to show stats such as current position in audiobook mp3 while the script is running?
|
Re: aUDIOBOOK?
Quote:
Code:
mplayer -ss $resumepoint "$1"|awk 'BEGIN{RS="\r"}{if ($1=="A:") {t=$2;printf $0"\r" > "/dev/stderr"}} END{print t}' > "$1".resumeI use printf instead of print, because print always add a "\n" at the end, and this will result in a lot of lines printed. Using "\r", each line is overimposed on the previous one, and thus appears as a single line which updates itself. I print $0, which means "the whole line as it was read", but if you prefer, you can parse it a bit. You have the current position in seconds in variable $2, and the current position in format "HH:MM:SS.dd" in variable $3. The total time in seconds is in $5, and the total time in format "HH:MM:SS.dd" in $7. Finally, $8 holds the CPU usage (not very useful, I would prefer a current position as a percentage of total). You can use this information and build your own status line, such as: Code:
mplayer -ss $resumepoint "$1"|awk 'BEGIN{RS="\r"}{if ($1=="A:") {t=$2;printf "Position: %s of (%s %5.1f%% played\r", $3, $7, $2*100/$5 > "/dev/stderr"}} END{print t}' > "$1".resume |
Re: aUDIOBOOK?
Quote:
Anyway... Quote:
Code:
mplayer -ss $RESPOINT $CPLIST | awk 'BEGIN{RS="\r"}/Playing/{print $2}/^A:/{t=$2}END{print t}' > $HOME/.mplayer/abook.resume |
Re: aUDIOBOOK?
Quote:
i dont know, why, but in busybox this script dont work... so, here is for busybox: Code:
#!/bin/shLASTFILE=`cat $HOME/.mplayer/abook.resume | tail -n2 | awk -Fmp3 '{print $1}'` s/mp3/ogg/ and it will work... Quote:
|
| All times are GMT. The time now is 03:14. |
vBulletin® Version 3.8.8