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-24-2020, 01:15 PM   #76
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
I just had a thought that might address the wget issue, but I am unsure if it is workable. The response when sox attempts to use the BusyBox wget is:

Code:
wget: unrecognized option '--no-check-certificate'
BusyBox v1.17.1 (2018-11-27 03:29:06 PST) multi-call binary.

Usage: wget [-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT] URL

Retrieve files via HTTP or FTP

Options:
	-s	Spider mode - only check file existence
	-c	Continue retrieval of aborted transfer
	-q	Quiet
	-P	Set directory prefix to DIR
	-O FILE	Save to FILE ('-' for stdout)
	-U STR	Use STR for User-Agent header
	-Y	Use proxy ('on' or 'off')
This appears to indicate that it is unhappy with that one parameter. Looking around it appears that command line comes from a null delimited string in libsox.so.2 of <wget --no-check-certificate -q -O- "%s"> which leads me to wonder if this could be patched to remove the unsupported parameter. Issuing the command without the unsupported parameter works on my pw4, so it is possible that this patch would allow using the BusyBox wget with sox.

Is such a patch possible? I would think at a minimum replacing the bogus parameter with spaces would work, unless some sort of signature check of the binary would result in it becoming unusable.

Dave
dhdurgee is offline   Reply With Quote
Old 04-24-2020, 01:19 PM   #77
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,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Unlike using a real wget, it won't support HTTPS, but you should be able to replace that with spaces so that the length doesn't change, yeah.
NiLuJe is offline   Reply With Quote
Advert
Old 04-24-2020, 01:24 PM   #78
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by NiLuJe View Post
Unlike using a real wget, it won't support HTTPS, but you should be able to replace that with spaces so that the length doesn't change, yeah.
What is the appropriate tool to use for this? Will sed work? If not, what is best to use?

Dave
dhdurgee is offline   Reply With Quote
Old 04-24-2020, 02:05 PM   #79
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,800
Karma: 103362673
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by dhdurgee View Post
What is the appropriate tool to use for this? Will sed work? If not, what is best to use?

Dave
It can be done in vim

See: https://vi.stackexchange.com/questio...files-with-vim
j.p.s is offline   Reply With Quote
Old 04-24-2020, 03:03 PM   #80
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by j.p.s View Post
I also found that it was possible to do so with sed and it worked. I can now use sox with the BusyBox wget, subject to the limitations I am aware of.

Dave
dhdurgee is offline   Reply With Quote
Advert
Old 04-24-2020, 03:31 PM   #81
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
SUCCESS! I just tried manually creating an internet radio pipeline which played:

Code:
[root@kindle sox]# LD_LIBRARY_PATH=./lib ./sox -t mp3 http://provisioning.streamtheworld.com/pls/WMALFM.pls -t raw - | /usr/bin/gst-
launch -v filesrc location=/dev/stdin ! 'audio/x-raw-int,endianness=(int)1234,signed=(boolean)true,width=(int)16,depth=(int)16,rate=
(int)22050,channels=(int)2' ! queue ! mixersink
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)22050, channels=(int)2
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)22050, channels=(int)2
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)22050, channels=(int)2
/GstPipeline:pipeline0/MixerSink:mixersink0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)22050, channels=(int)2
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 30319214671 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/MixerSink:mixersink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
[root@kindle sox]#
So I now have a proof-of-concept to play both local files and internet streams on the pw4 using sox with a patched libsox.so.2 and the gstreamer support supplied by Amazon.

Dave
dhdurgee is offline   Reply With Quote
Old 04-24-2020, 05:53 PM   #82
arooni
Addict
arooni began at the beginning.
 
Posts: 315
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
i have a jailbroken paperwhite 4 myself. thanks for doing all the hard work, i'm looking forward to trying your tool.

are you envisioning be able to play local mp3 files? or things in the cloud? what's the goal?
arooni is offline   Reply With Quote
Old 04-24-2020, 06:20 PM   #83
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by arooni View Post
i have a jailbroken paperwhite 4 myself. thanks for doing all the hard work, i'm looking forward to trying your tool.

are you envisioning be able to play local mp3 files? or things in the cloud? what's the goal?
The goal is a tool to allow you to play files on your pw4 that sox knows about and internet streams as well. At this point I can play either manually. I will need to work next on automating this and then creating a KUAL menu entry.

At this point I have tried mp3 files and streams, but others should work as well.

Dave
dhdurgee is offline   Reply With Quote
Old 04-24-2020, 06:24 PM   #84
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by NiLuJe View Post
strace it.

It appears to be using libltdl to wrap dlopen(), so it's probably passing a stupid hardcoded path or something inane like that. libtool is the worst.

EDIT: https://www.gnu.org/software/libtool...interface.html

Seems to hint that it only relies on the environment when *NOT* fed a canonical path.
I located the hard coded string in libsox.so.2 and since I already needed to patch this to deal with wget I patched that as well to be /mnt/us/extensions/sox/library and confirmed that it worked. Should now have a clean install.

Dave
dhdurgee is offline   Reply With Quote
Old 04-29-2020, 02:46 PM   #85
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
I'm probably doing something stupidly wrong, but as I can't spot it I hope another pair of eyes will.

Attached please find my shell script and a log of what happens when I run it on my pw4.

I should note that I have also tried it without the back quotes and get the same error. I can copy/paste the printed command line with an LD_LIBRARY_PATH prefix and that will run correctly.

Once I get this script working I plan to write a similar one to play an internet stream. With both of those done I can put together an initial KUAL package.

Dave
Attached Files
File Type: zip playfile.zip (1.1 KB, 289 views)
dhdurgee is offline   Reply With Quote
Old 04-29-2020, 03:04 PM   #86
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: Kobo Libra H2O
I would have written it like this : https://gist.github.com/tomtastic/a8...f25323d74b6026

No idea if that helps though
trcm is offline   Reply With Quote
Old 04-30-2020, 11:17 AM   #87
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by trcm View Post
I would have written it like this : https://gist.github.com/tomtastic/a8...f25323d74b6026

No idea if that helps though
Thanks for your feedback, but thus far nothing I have tried has worked. In hopes of getting more skilled eyes, possibly with more tools, looking at this I am attaching my current working directory complete with a log of my latest test.

Please note that it is expected to be unzipped into the /mnt/us/extensions as any KUAL extension would be.

I am uploading it here as github would not accept a zip file, strange omission there.

Once again nothing in the script worked, but a simply copy/paste from above prefixed with the LD_LIBRARY_PATH does.

I did not include my music file, obviously you should try one of your own. Supposedly any file sox knows about should work. If you are unsure then run sox -h to get a list of supported types.

Thank you in advance for any further assistance with this project.

Dave
Attached Files
File Type: zip sox_play.zip (2.18 MB, 274 views)
dhdurgee is offline   Reply With Quote
Old 04-30-2020, 12:03 PM   #88
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,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Don't put a full pipeline in a variable, that won't work.

Code:
~ $ cmdline="ls -lash /var/tmp | sort -u"
~ $ $cmdline
ls: |: No such file or directory
ls: sort: No such file or directory
Quoting means what it says on the tiin: it'll quote metacharacters, and pass them as *arguments*. Word-splitting may also be an issue in some cases.

i.e., this actually ends up running something along the lines of ls -lash /var/tmp "|" sort -u

Last edited by NiLuJe; 04-30-2020 at 12:08 PM.
NiLuJe is offline   Reply With Quote
Old 04-30-2020, 12:05 PM   #89
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: Kobo Libra H2O
Ahh, I obviously wasn't reading the error log!

The -v from gst-launch is being interpreted by sox as it's volume argument, some wackiness going on there from busy box maybe as it should have noticed there was a pipe in there!

Use this :

/mnt/us/extensions/sox/sox $1 -t raw - -- | /usr/bin/gst-launch blah blah blah



NB: Tried, and working on my PW4
trcm is offline   Reply With Quote
Old 04-30-2020, 12:48 PM   #90
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: 910
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
Quote:
Originally Posted by trcm View Post
Ahh, I obviously wasn't reading the error log!

The -v from gst-launch is being interpreted by sox as it's volume argument, some wackiness going on there from busy box maybe as it should have noticed there was a pipe in there!

Use this :

/mnt/us/extensions/sox/sox $1 -t raw - -- | /usr/bin/gst-launch blah blah blah



NB: Tried, and working on my PW4
Interesting. I just tried editing my playfile.sh adding the "--" as above and still get the errors. If it isn't too much trouble, could you attach a working playfile.sh either here or on github? I must be doing something wrong.

Dave
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 11:27 AM.


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