Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2012, 10:08 AM   #1
xbqo
Junior Member
xbqo began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2012
Device: kindle
MPD for Kindle : AAC/FLAC/MP3/OGG/... local and streaming, + Shuffle mode !

//The title is copied from the mplayer post....

It takes me about two days to get a working mpd, so I just put the result here to save others' effort.
You will need launchpad if you don't want to usbnetwork into your kindle.
The binary I compiled *should* support aac/flac/ape/ac3/mp3/ogg/wav/wma/mpc playback (haven't tested all), streaming from http/mms protocol and last.fm (haven't tested), and playing files in zip/bzip2 archives (haven't tested).
The launchpad config file contained in the package should be easy to understand. If you are familiar with mpd, you could add a couple of new commands yourself.

Typical mpd cpu usage is around 5%~10% while playing, if resample is needed, it will go up to like 20%~40%.
If you don't want this, you could change this line in mpd.conf:
Code:
samplerate_converter		"2"
to
Code:
samplerate_converter		"internal"
After you downloaded the package, put mpd/mpc/mpd.conf in 'mpd' directory, mpd.ini in 'launchpad' directory, and then create a '.mpd' directory, it should work.

Feedback is welcome, but I don't guarantee I will fix any of your problems.

Update:
//In case you are not a linux user and/or not familiar with mpd:

If you want to custom your mpd configuration, there is a manual here: http://linux.die.net/man/5/mpd.conf

If you want to know how to use mpc, there is a manual here: http://linux.die.net/man/1/mpc

My launchpad config file actually lacks some important command, like add songs to the playlist:

Code:
mpc ls | xargs mpc add
Attached Files
File Type: gz mpd.tar.gz (2.97 MB, 426 views)

Last edited by xbqo; 02-16-2012 at 11:06 AM.
xbqo is offline   Reply With Quote
Old 02-15-2012, 11:02 AM   #2
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
I didn't know about the last.fm thing! Do you think that making it work with the integrated 3g would be seen as 'abuse' of the service? It would be great though, unlimited songs while on the go with no storage use...
giorgio130 is offline   Reply With Quote
Advert
Old 02-15-2012, 11:43 AM   #3
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Consuming 3g traffic with streaming media is not a good idea when amazon is paying for that traffic.

Just put your songs on the USB Drive and play them from there.
geekmaster is offline   Reply With Quote
Old 02-15-2012, 04:03 PM   #4
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
Or better, I'll do it while I'm home and I have wifi available:-)
giorgio130 is offline   Reply With Quote
Old 02-17-2012, 09:42 AM   #5
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
Tested local file playing and it works! As a note, spaces in filenames cause errors. Could you have a look at that?
giorgio130 is offline   Reply With Quote
Advert
Old 02-18-2012, 08:34 AM   #6
giorgio130
Time Waster
giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.giorgio130 ought to be getting tired of karma fortunes by now.
 
Posts: 422
Karma: 289160
Join Date: May 2011
Device: Kobo Glo and Aura HD
However I'm failing with last.fm streaming (over wifi):
Code:
Feb 18 14:20 : client: command_process_list: process command "load "lastfm://artist/Beatles""
Feb 18 14:20 : session='d14d1ca438f755643e1df685f9f3f22e'
Feb 18 14:20 : playlist: queue song 1:"http://play.last.fm/user/7127820745a4fb6619a6ba172e97e0a8.mp3"
Feb 18 14:20 : client: command_process_list: command returned 0
Feb 18 14:20 : client: [1] process command list returned 0
Feb 18 14:20 : client: [1] expired
Feb 18 14:20 : client: [1] closed
Feb 18 14:20 : client: [2] opened from localhost
Feb 18 14:20 : client: [2] process command "next"
Feb 18 14:20 : playlist: play 1:"http://play.last.fm/user/7127820745a4fb6619a6ba172e97e0a8.mp3"
Feb 18 14:20 : output: closed plugin=alsa name="My ALSA Device"
Feb 18 14:20 : decoder_thread: clearing mixramp tags
Feb 18 14:20 : decoder_control: mixramp_start = NULL
Feb 18 14:20 : decoder_control: mixramp_prev_end = NULL
Feb 18 14:20 : client: [2] command returned 0
Feb 18 14:20 : playlist: queue song 2:"http://play.last.fm/user/2fe0aea885f26c704d9eb66af5464483.mp3"
Feb 18 14:20 : client: [2] process command list
Feb 18 14:20 : client: command_process_list: process command "status"
Feb 18 14:20 : client: command_process_list: command returned 0
Feb 18 14:20 : client: command_process_list: process command "currentsong"
Feb 18 14:20 : client: command_process_list: command returned 0
Feb 18 14:20 : client: [2] process command list returned 0
Feb 18 14:20 : client: [2] expired
Feb 18 14:20 : client: [2] closed
Feb 18 14:20 : ffmpeg: detected input format 'mp3' (MPEG audio layer 2/3)
Feb 18 14:20 : ffmpeg/mp3: Estimating duration from bitrate, this may be inaccurate
Feb 18 14:20 : decoder: audio_format=44100:16:2, seekable=true
Feb 18 14:20 : ffmpeg/mp3: incomplete frame
Feb 18 14:20 : ffmpeg: decoding failed
Feb 18 14:21 : client: [3] opened from localhost
Feb 18 14:21 : client: [3] process command "next"
Feb 18 14:21 : playlist: play 2:"http://play.last.fm/user/2fe0aea885f26c704d9eb66af5464483.mp3"
Feb 18 14:21 : decoder_thread: clearing mixramp tags
Feb 18 14:21 : decoder_control: mixramp_start = NULL
Feb 18 14:21 : decoder_control: mixramp_prev_end = NULL
Feb 18 14:21 : client: [3] command returned 0
Feb 18 14:21 : playlist: queue song 3:"http://play.last.fm/user/0f0476e52a4760a6253b7babea85fea9.mp3"
Feb 18 14:21 : client: [3] process command list
Feb 18 14:21 : client: command_process_list: process command "status"
Feb 18 14:21 : client: command_process_list: command returned 0
Feb 18 14:21 : client: command_process_list: process command "currentsong"
Feb 18 14:21 : client: command_process_list: command returned 0
Feb 18 14:21 : client: [3] process command list returned 0
Feb 18 14:21 : client: [3] expired
Feb 18 14:21 : client: [3] closed
Feb 18 14:21 : ffmpeg: detected input format 'mp3' (MPEG audio layer 2/3)
Feb 18 14:21 : ffmpeg/mp3: Estimating duration from bitrate, this may be inaccurate
Feb 18 14:21 : decoder: audio_format=44100:16:2, seekable=true
Feb 18 14:21 : ffmpeg/mp3: incomplete frame
Feb 18 14:21 : ffmpeg: decoding failed
that's the relevant part of the log. Do you know how I can get it to be more verbose?
giorgio130 is offline   Reply With Quote
Old 02-24-2012, 05:55 AM   #7
xbqo
Junior Member
xbqo began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2012
Device: kindle
Quote:
Originally Posted by giorgio130 View Post
However I'm failing with last.fm streaming (over wifi):
Code:
Feb 18 14:20 : client: command_process_list: process command "load "lastfm://artist/Beatles""
Feb 18 14:20 : session='d14d1ca438f755643e1df685f9f3f22e'
Feb 18 14:20 : playlist: queue song 1:"http://play.last.fm/user/7127820745a4fb6619a6ba172e97e0a8.mp3"
Feb 18 14:20 : client: command_process_list: command returned 0
Feb 18 14:20 : client: [1] process command list returned 0
Feb 18 14:20 : client: [1] expired
Feb 18 14:20 : client: [1] closed
Feb 18 14:20 : client: [2] opened from localhost
Feb 18 14:20 : client: [2] process command "next"
Feb 18 14:20 : playlist: play 1:"http://play.last.fm/user/7127820745a4fb6619a6ba172e97e0a8.mp3"
Feb 18 14:20 : output: closed plugin=alsa name="My ALSA Device"
Feb 18 14:20 : decoder_thread: clearing mixramp tags
Feb 18 14:20 : decoder_control: mixramp_start = NULL
Feb 18 14:20 : decoder_control: mixramp_prev_end = NULL
Feb 18 14:20 : client: [2] command returned 0
Feb 18 14:20 : playlist: queue song 2:"http://play.last.fm/user/2fe0aea885f26c704d9eb66af5464483.mp3"
Feb 18 14:20 : client: [2] process command list
Feb 18 14:20 : client: command_process_list: process command "status"
Feb 18 14:20 : client: command_process_list: command returned 0
Feb 18 14:20 : client: command_process_list: process command "currentsong"
Feb 18 14:20 : client: command_process_list: command returned 0
Feb 18 14:20 : client: [2] process command list returned 0
Feb 18 14:20 : client: [2] expired
Feb 18 14:20 : client: [2] closed
Feb 18 14:20 : ffmpeg: detected input format 'mp3' (MPEG audio layer 2/3)
Feb 18 14:20 : ffmpeg/mp3: Estimating duration from bitrate, this may be inaccurate
Feb 18 14:20 : decoder: audio_format=44100:16:2, seekable=true
Feb 18 14:20 : ffmpeg/mp3: incomplete frame
Feb 18 14:20 : ffmpeg: decoding failed
Feb 18 14:21 : client: [3] opened from localhost
Feb 18 14:21 : client: [3] process command "next"
Feb 18 14:21 : playlist: play 2:"http://play.last.fm/user/2fe0aea885f26c704d9eb66af5464483.mp3"
Feb 18 14:21 : decoder_thread: clearing mixramp tags
Feb 18 14:21 : decoder_control: mixramp_start = NULL
Feb 18 14:21 : decoder_control: mixramp_prev_end = NULL
Feb 18 14:21 : client: [3] command returned 0
Feb 18 14:21 : playlist: queue song 3:"http://play.last.fm/user/0f0476e52a4760a6253b7babea85fea9.mp3"
Feb 18 14:21 : client: [3] process command list
Feb 18 14:21 : client: command_process_list: process command "status"
Feb 18 14:21 : client: command_process_list: command returned 0
Feb 18 14:21 : client: command_process_list: process command "currentsong"
Feb 18 14:21 : client: command_process_list: command returned 0
Feb 18 14:21 : client: [3] process command list returned 0
Feb 18 14:21 : client: [3] expired
Feb 18 14:21 : client: [3] closed
Feb 18 14:21 : ffmpeg: detected input format 'mp3' (MPEG audio layer 2/3)
Feb 18 14:21 : ffmpeg/mp3: Estimating duration from bitrate, this may be inaccurate
Feb 18 14:21 : decoder: audio_format=44100:16:2, seekable=true
Feb 18 14:21 : ffmpeg/mp3: incomplete frame
Feb 18 14:21 : ffmpeg: decoding failed
that's the relevant part of the log. Do you know how I can get it to be more verbose?
For last.fm, you need to change the mpd configuration file (mpd.conf)
See: http://mpd.wikia.com/wiki/Last.fm_Radio
xbqo is offline   Reply With Quote
Old 03-02-2012, 02:57 PM   #8
olorin
Junior Member
olorin began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2012
Device: Kindle
Hello there!

Could you enable TCP support? I tried using mpd+ncmpc from optware with kindle terminal emulator. Unfortuanetly mpd was broken, but ncmpc looked pretty good. As I see, ncmpc requires TCP connection (and you can manage mpd) from other host via wifi

Bug report: in config for launchpad there's
Code:
mpc ls | xargs mpc add
It doesn't work for music files with spaces in filenames.
Code:
mpc ls | mpc add
works well (mpc add expects \n separated filenames on STDIN if not specified in params).

Also I think that SIGTERM should be used instead of SIGKILL(9) in launchpad configuration.

Last edited by olorin; 03-02-2012 at 03:00 PM.
olorin is offline   Reply With Quote
Old 03-10-2012, 08:08 AM   #9
olorin
Junior Member
olorin began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2012
Device: Kindle
As for TCP thing this works well for now
Code:
socat tcp-l:6600,reuseaddr,fork unix:/var/run/.mpd_socket
socat and ncmpc are from optware.
olorin is offline   Reply With Quote
Old 03-15-2012, 07:59 AM   #10
cts
Junior Member
cts began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2012
Device: Kindle 3G
Hi xbqo,

do you think you could be so kind as to hint me on your crosscompile toolchain, please? I'd love to jump into this but the infos I have found are confusing at beast

Thanks!
Christian.
cts is offline   Reply With Quote
Old 03-16-2012, 04:48 AM   #11
xbqo
Junior Member
xbqo began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Feb 2012
Device: kindle
Quote:
Originally Posted by cts View Post
Hi xbqo,

do you think you could be so kind as to hint me on your crosscompile toolchain, please? I'd love to jump into this but the infos I have found are confusing at beast

Thanks!
Christian.
I just followed NiLuJe's instruction, which can be found here: https://www.mobileread.com/forums/showthread.php?t=88004

Additional note: You must choose softfp as the float point interface.
xbqo is offline   Reply With Quote
Old 03-16-2012, 07:28 AM   #12
cts
Junior Member
cts began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2012
Device: Kindle 3G
Quote:
Originally Posted by xbqo View Post
I just followed NiLuJe's instruction, which can be found here: https://www.mobileread.com/forums/showthread.php?t=88004

Additional note: You must choose softfp as the float point interface.
Thank you, will do that right away!
cts is offline   Reply With Quote
Old 03-16-2012, 12:50 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
In case it wasn't clear, my terminal log for the ct-ng build is in the kindle-x-compile-tc.tar.gz file attached in that post .
NiLuJe is offline   Reply With Quote
Old 03-23-2012, 05:45 AM   #14
cts
Junior Member
cts began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2012
Device: Kindle 3G
Hi NiLuJe,

could you turn your installation (gentoo, I assume) into a VM? I am having trouble getting my compile-environment right and my Gentoo is a bit - rusty

Thanks!
Christian.
cts is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MPlayer for Kindle: AAC/FLAC/MP3/OGG/WAV/... support, local and streaming ! Smarter Kindle Developer's Corner 143 08-25-2017 08:31 AM
HQ Kindle Touch Player (flac, mp3, wav formats) Ehhh Kindle Developer's Corner 9 04-22-2012 04:33 AM
Kindle MP3 Shuffle? [Kindle 3] Marduk Kindle Developer's Corner 1 12-26-2010 10:54 PM
AAC vs MP3 markbot Lounge 6 09-22-2010 10:13 AM
jukebox [player of mp3, ogg, mpc, mikmod, wav, flac files] yokos iRex 37 09-01-2009 09:37 AM


All times are GMT -4. The time now is 07:01 AM.


MobileRead.com is a privately owned, operated and funded community.