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 04-17-2020, 01:21 PM   #46
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Using mplayer for audio conversion is fairly overkill.

Look into using ffmpeg directly, or even something like sox.
NiLuJe is offline   Reply With Quote
Old 04-17-2020, 01:48 PM   #47
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by NiLuJe View Post
Using mplayer for audio conversion is fairly overkill.

Look into using ffmpeg directly, or even something like sox.
My use of mplayer in particular was due to its availability on the site here for the kindle. I used it first on my K3 where audio output was built in. Other options as you noted are available, but I am unaware of binaries for our kindles.

Beyond that the problem of building the gst pipeline with the proper rate and channel count remains. With a WAVE header this is self defined, but the available gst elements on the kindle do not support this.

This suggest to me we need a program of some sort to accept the source to be played, which might be a local file or an internet stream, start playback to a buffer, create the gst pipeline with the rate and channel count defined from the source header and pipe the decoded raw pcm from the buffer to the gst pipeline for playback.

I am beyond my experience level in creating such a program to be run on the kindle, my limits here are simple scripts and probably creating a KUAL extension to make use of them. Hopefully someone else can expand on this.

I should note that the original question that started this topic is now answered, a converted audio book of any sort can be played with this approach.

Dave
dhdurgee is offline   Reply With Quote
Advert
Old 04-18-2020, 04:10 PM   #48
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Just had a thought occur to me and wonder if it is worth pursuing. Amazon has included a number of gstreamer static elements and core elements plus two custom elements of their own construction. To me this implies they have to have included the underlying dependencies for gstreamer or this would fail to operate.

The debian repositories still contain Jessie armel gstreamer packages. As these are compatible binaries and most, if not all, gstreamer underpinnings are present to support the provided elements I would expect it would be possible to add elements to allow using gstreamer and gst-launch to do what I would want to.

I don't know what would be required to do so, as I don't want to touch the root fs. Is there a shell variable to export that would add wherever I put the additional elements and their missing dependencies to the library search since these are in library form?

Any thoughts and suggestions on this approach?

Dave
dhdurgee is offline   Reply With Quote
Old 04-18-2020, 05:28 PM   #49
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,285
Karma: 98804578
Join Date: Apr 2011
Device: pb360
You might want to look into ldconfig
but that might modify /etc/ld.so.conf
j.p.s is offline   Reply With Quote
Old 04-18-2020, 05:40 PM   #50
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Jessie appears to still have gstreamer-0.10, which is a bit of a miracle if you ask me. Yay for Debian shipping truly old shit.
NiLuJe is offline   Reply With Quote
Advert
Old 04-18-2020, 07:18 PM   #51
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by NiLuJe View Post
Jessie appears to still have gstreamer-0.10, which is a bit of a miracle if you ask me. Yay for Debian shipping truly old shit.
So does that imply this approach is workable? In that case do we have anyone here familiar enough with gstreamer to suggest the elements I would need to add?

I would start with one to read and decode mp3 files to the pipeline passing along the proper caps. That would handle playback of mp3 files stored on the pw4.

I would also want one capable of decoding an mp3 or aac internet stream, possibly also dealing with a playlist file. There might be a single element that does this, as I can do this with mplayer or vlc and as you pointed out to me ffmpeg and sox could also do so.

How then do I install these additional elements and any additional required libraries to the pw4 and integrate them with the existing gstreamer? As this ultimately will wind up as a KUAL extension I guess that would be the logical place for them, but I would need guidance on the scripts to make it run. I can crib some from the mplayer scripts for handling playlists and such, but the pipelines would need to be built to run with gst-launch as well.

Dave
dhdurgee is offline   Reply With Quote
Old 04-19-2020, 01:48 PM   #52
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by dhdurgee View Post
How then do I install these additional elements and any additional required libraries to the pw4 and integrate them with the existing gstreamer? As this ultimately will wind up as a KUAL extension I guess that would be the logical place for them, but I would need guidance on the scripts to make it run. I can crib some from the mplayer scripts for handling playlists and such, but the pipelines would need to be built to run with gst-launch as well.
The plugins are dlopened by gstreamer, so it should be safe to load any of them, as you can just remove them before rebooting if it doesn't work.

Furthermore, you shouldn't even need to touch the main plugins dir, as you can use the --gst-plugin-path option or the GST_PLUGIN_PATH env var to set the user plugins dir. For this, you'll just need to copy the libs for the plugins you want (extract the deb package with dpkg or with ar and tar) to the folder. If they have dependencies (check it with ldd, or just try loading it) which are not built-in to the Kindle firmware, you can use LD_LIBRARY_PATH to refer to a folder with the libs (also extracted from Debian), and as a more permanent solution, you can use patchelf to make the origin relative.

I don't remember all of them off the top of my head, but you'll probably want the convert* ones to be able to resample and convert raw audio, you'll want curlhttpsrc (and libcurl) or souphttpsrc (and libsoup) for loading from a http source (unless you just pass it in stdin), wavparse for parsing wav headers, and so on. You'll also want ffmpeg as a standalone tool (use a static build) if you want to have more flexibility in input options with the least amount of work (most of the functionality from ffmpeg is available in the av* plugins, but this will require a lot more work to use).
geek1011 is offline   Reply With Quote
Old 04-21-2020, 12:30 PM   #53
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
I have located and downloaded several gst-0.10 plugins from the debian jessie armel repositories and copied them to my pw4. I next used ldd to identify their missing dependencies and did likewise with them. I now have a new problem.

I first ran /usr/bin/gst-inspect to confirm the elements are ready to use. Unfortunately, I am getting for an example:

Code:
(gst-inspect-0.10:7817): GStreamer-WARNING **: Failed to load plugin './libgstmad.so': ./libgstmad.so: undefined symbol: gst_element_class_add_static_pad_template
I guess I am missing one of the gstreamer libraries implementing this symbol. Can you tell me which one I am mssing?

Dave
dhdurgee is offline   Reply With Quote
Old 04-21-2020, 12:59 PM   #54
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You might be out of luck.

Either you got mixed up and pulled a gstreamer-1.0 lib by mistake, or Amazon's build is just too old.

(Or Jessie's version too recent, depending on your PoV )
NiLuJe is offline   Reply With Quote
Old 04-21-2020, 01:08 PM   #55
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by NiLuJe View Post
You might be out of luck.

Either you got mixed up and pulled a gstreamer-1.0 lib by mistake, or Amazon's build is just too old.

(Or Jessie's version too recent, depending on your PoV )
Joy. Definitely 0.10 library. Any easy way to determine which library implements that element? I am having to use LD_LIBRARY_PATH for the missing dependencies, perhaps I can get past this with a few more Jessie libraries.

Dave

PS: should have followed your link first. I grabbed that library and tried again only to have that one hit a missing symbol in libglib-2.0.so.0 next. Ugg. Guess I will take another approach and see if sox is happy there.

Last edited by dhdurgee; 04-21-2020 at 01:27 PM.
dhdurgee is offline   Reply With Quote
Old 04-21-2020, 06:19 PM   #56
trcm
Connoisseur
trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!
 
Posts: 96
Karma: 100000
Join Date: Dec 2018
Location: London
Device: Kindle PW4, Libra H2O
You could try using 'nm' or 'objdump -t' to spot what symbols a lib provides.
trcm is offline   Reply With Quote
Old 04-21-2020, 06:21 PM   #57
trcm
Connoisseur
trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!trcm rocks like Gibraltar!
 
Posts: 96
Karma: 100000
Join Date: Dec 2018
Location: London
Device: Kindle PW4, Libra H2O
Or you could just search the gstreamer source code : https://github.com/GStreamer/gstream...c_pad_template
trcm is offline   Reply With Quote
Old 04-21-2020, 09:33 PM   #58
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by trcm View Post
You could try using 'nm' or 'objdump -t' to spot what symbols a lib provides.
Quote:
Originally Posted by trcm View Post
Or you could just search the gstreamer source code : https://github.com/GStreamer/gstream...c_pad_template
Thanks for the suggestions, but NiLuJe gave a link in his reply to a tool that I was able to use to identify the source and versions with that missing symbol.

As I noted in my second reply that appears to be running down the rabbit hole, as it seems that Amazon based their gstreamer-0.10 on an even earlier version than Jessie. I decided to take a different approach with sox instead.

Dave
dhdurgee is offline   Reply With Quote
Old 04-21-2020, 09:35 PM   #59
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
That thing has been my best friend on a few occasions where hunting for that by hand would have been madness ^^.
NiLuJe is offline   Reply With Quote
Old 04-22-2020, 12:14 PM   #60
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
I have hit a problem with sox that I don't know how to get past. I have installed the sox binary and all its missing dependencies. I need mp3 support, so I also installed the optional support for it and all of its missing dependencies. Even with this done sox -h does not show it as a known audio file format and an attempt to work with an mp3 file results in an error message.

Perhaps sox needs to be told where to look for the optional mp3 support, but I haven't found any reference to it in the documentation and I have the library file with all the others in the directory with sox and invoke sox with LD_LIBRARY_PATH=. for it to find the libraries I had to supply.

Has anyone run into this before and can tell me the work-around?

I also looked into ffmpeg, but it appears that debian didn't include that with Jessie and I assume the Stretch binaries would be too new to use on the pw4.

Dave

PS: I tried piping a wav file using sox to convert it to raw to a gst-launch pipeline and it started playing, so this might be workable once mp3 support is worked out

Last edited by dhdurgee; 04-22-2020 at 01:51 PM.
dhdurgee is offline   Reply With Quote
Reply

Tags
audiobook, bluetooth, jailbreak, m4b, mp3


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with finding audiobook metadata on Amazon angelyne Calibre 6 10-21-2018 08:52 AM
Listen Audiobook Player question Hrafn Audiobook Hardware & Software 0 06-16-2018 02:36 AM
Listen Up - We've got a brand new audiobook forum Alexander Turcic Announcements 11 09-10-2014 06:18 PM
Amazon Ebooks and downloaded Audiobook ErikaGC Kindle Fire 1 06-10-2013 12:13 PM
Sony & Amazon, etc. - Why No Wifi or Bluetooth? poohbear_nc News 8 08-26-2009 04:29 PM


All times are GMT -4. The time now is 09:50 AM.


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