Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-05-2012, 04:16 PM   #91
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
To be clear

Quote:
Originally Posted by geekmaster View Post
I almost always test commands like that before posting. On my computer, it should have worked, or I would have corrected it... I am not sure which netcat I was using though. I often compile from source, sometimes with custom changes. I had on ongoing email conversation with the author back in the day (avian@"the l0pht"). I hear that those guys "went straight"...
I never thought for a moment it didn't work on yours.

It just didn't work OOTB on mine

Word to the wise and all.

OFFTOPIC: I got the alsa up and obeying our command. happy days,

Last edited by twobob; 07-05-2012 at 04:18 PM. Reason: Added what I was thinking about.
twobob is offline   Reply With Quote
Old 07-05-2012, 04:23 PM   #92
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
On another topic, I have not been able to test yet, but I am almost certain that I have had problems mounting to a mount point that contained files. I thought that is WHY we need bind mount, which allows replacing a folder or file...

P.S. It is hard to write documentation that works for everybody. I try to be simple and generic, but that does not always work.

Last edited by geekmaster; 07-07-2012 at 07:24 AM.
geekmaster is offline   Reply With Quote
Old 07-06-2012, 12:54 PM   #93
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by geekmaster View Post
P.S. It is hard to write documentation that works for everybody. I try to be simple and generic, but that does not always work.
Yes. looking around actually everyone who mentions nc is laboured with this addendum to their docs. ho hum.

On another note more ON TOPIC:

arecord -f cd -r 192000 > ./tmp.file | tail -f ./tmp.file | ./video Does nothing.

but arecord -f cd -r 192000 | ./video almost get's it Bit of a speed problem (hehehe)

(where video is the gm code compiled as video)

I guess arecord -f cd -r 192000 > ./tmp.file and then ./video < ./tmp.file from another process is one solution.
That is more robust than the inline arecord -f cd -r 192000 | ./video

I'll just have a play... thanks.

anyone got a performance improvement for me? Many thanks
I'm just playing


arecord uses about 10% of processor to do this ridiculous request

gmplay is a little more resource hungry though

Last edited by twobob; 07-06-2012 at 01:23 PM. Reason: more coffee - added partial solution.
twobob is offline   Reply With Quote
Old 07-06-2012, 01:04 PM   #94
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
arecord -r 8000 | tee tmp.file > video
Might work, (the ./ path is the default) and that would do both, record as a file and pass-thru.
(tail might be expecting text line endings and the above is binary data)
knc1 is offline   Reply With Quote
Old 07-06-2012, 01:49 PM   #95
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by knc1 View Post
arecord -r 8000 | tee tmp.file > video
Might work, (the ./ path is the default) and that would do both, record as a file and pass-thru.
(tail might be expecting text line endings and the above is binary data)
The "video" in the call is the binary. surely that would replace it with junk from the mic

But arecord -f cd -r 192000 | tee tmp.file | ./video

works great! thanks KNC!

Blatant device abuse lol:

Code:
[root@kindle video]# arecord -D hw -f dat -fs24_le | tee tmp.file | ./gmplay-org
Recording WAVE 'stdin' : Signed 24 bit Little Endian, Rate 48000 Hz, Stereo

overrun!!! (at least 1448.915 ms long)
overrun!!! (at least 1.691 ms long)
overrun!!! (at least 2.336 ms long)
overrun!!! (at least 15.986 ms long)
overrun!!! (at least 3.154 ms long)
overrun!!! (at least 4.272 ms long)
arecord: pcm_read:1349: read error: Input/output error
27 frames in 22.1 secs = 1.2 FPS

Last edited by twobob; 07-06-2012 at 02:11 PM. Reason: added solution
twobob is offline   Reply With Quote
Old 07-06-2012, 02:04 PM   #96
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by twobob View Post
The "video" is the call the the binary. surely that would replace it with junk from the mic

But arecord -f cd -r 192000 | tee tmp.file | ./video

works great! thanks KNC!
Good catch. Yes it would have.
Still need a long nap here.
The "Kindle Charger" has gone up in smoke several times today (in simulation anyway).
knc1 is offline   Reply With Quote
Old 07-06-2012, 02:08 PM   #97
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Hot and steamy

Quote:
Originally Posted by knc1 View Post
Good catch. Yes it would have.
Still need a long nap here.
The "Kindle Charger" has gone up in smoke several times today (in simulation anyway).


I do admire that project. I have had several inches of rain today however.

Perhaps a hydro-electric one could catch on here!!
twobob is offline   Reply With Quote
Old 07-07-2012, 07:42 AM   #98
ppoo
Connoisseur
ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.ppoo writes the songs that make the whole world sing.
 
Posts: 56
Karma: 40393
Join Date: May 2012
Device: Kindle Touch
we can play music+video together with gmplay & mplayer.
gpplay ( through usbnet)
Code:
mplayer -quiet $3&
nc $1 $2 | ./gmplay
gpplay ( local)
Code:
mplayer -quiet $3&
zcat $1 | ./gmplay
then
Code:
chmod +x mplayer
chmod +x gmplay
with usbnet edition
Code:
gpplay 192.168.0.101 5555 <music_file>.mp3
with local edition
Code:
gpplay <video_file>.gmv <music_file>.mp3
we can extract mp3 file from video use ffmpeg:
Code:
ffmpeg.exe -i <video_file_input>.mp4 -ab 128 -ar 44100 <music_file_ouput>.mp3
note:
ffmpeg version git-N-30558-ge844abc work fine for window
to run raw2gmv under window you must install cygwin then compile it with:
gcc raw2gmv.c -o raw2gmv

to save raw video to gmv use:

Code:
# ./ffmpeg.exe -i ./input_video_file.mp4 -pix_fmt gray -f rawvideo -vf pad=800:600:0:75 -s 800x450 -r 7.7 -| ./raw2gmz >output_video_file.gmv
ppoo is offline   Reply With Quote
Old 07-07-2012, 07:53 AM   #99
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Nice solution :)

Quote:
Originally Posted by ppoo View Post
we can play music+video together with gmplay & mplayer.
This is excellent advice for someone looking to get this going now.

I personally am interested in having a little more control of the code functionality than 3rd party app calls as this will allow us to potentially expand on the building blocks when they are completed.

But excellent solution for the actual final goal to be realised at this time, well commented and the cross platform research was a nice touch.

I'll have to try it out. Many thanks
twobob is offline   Reply With Quote
Old 07-07-2012, 08:02 AM   #100
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
Quote:
Originally Posted by twobob View Post
This is excellent advice for someone looking to get this going now.

I personally am interested in having a little more control of the code functionality than 3rd party app calls as this will allow us to potentially expand on the building blocks when they are completed.

But excellent solution for the actual final goal to be realised at this time, well commented and the cross platform research was a nice touch.

I'll have to try it out. Many thanks
I had success playing audio and video with two instances of ffmpeg on my Kindles: one outputs audio to STDOUT piped to aplay, and the other outputs video to STDOUT piped to gmplay. It can even play streaming 1080p x.264 video on a K5 (rescaled to 800x600 in realtime), but on a K3 there is only enough CPU power to decode lower-resolution XviD (or use an extra non-realtime step with a temp file instead of a pipe).

What I would really like is to play audio and video with a single instance of a single program. Ehhh's video player is almost there, but his video framerate is much slower than gmplay (until I get around to making a "gmplay" gst plugin for him), and his audio has too many dropouts.

I was hoping to get alsa sound working in my ffmpeg before publishing it. For now it is just an ARM build with all options turned on (except alsa). One nice thing about ffmpeg is that it can RECORD too, including recording the framebuffer. I was thinking of using it to make youtube videos of my demos, but perhaps they would be more effective filmed from a real camcorder that shows that it is really a kindle playing the video effects...

Last edited by geekmaster; 07-07-2012 at 08:05 AM.
geekmaster is offline   Reply With Quote
Old 07-07-2012, 08:19 AM   #101
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by geekmaster View Post
What I would really like is to play audio and video with a single instance of a single program
Getting there old bean, Give me an idea what kind of audio you want chunking.

I have the harness for alsa happening. Might as well just ham something together that works then tidy it up after.

I would appreciate an idea of your vision of the audio. he talks about mp3 but that's possibly an issue - more 3rd party IP - so I'm thinking get some 8k wav stream happening and see how we go from there.

how will the data be piggybacked? are we appending it to the existing dataframes in some way? or am I to parse it out of something via perhaps ffmpeg and just side-by-side the two processes (I don't like the sound of that, screams "audio drift")

Okay well good to have you back Mr G. Any ideas gratefully accepted.
twobob is offline   Reply With Quote
Old 07-07-2012, 09:57 AM   #102
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
Quote:
Originally Posted by ppoo View Post
we can play music+video together with gmplay & mplayer.
...
gcc raw2gmv.c -o raw2gmv

to save raw video to gmv use:

Code:
# ./ffmpeg.exe -i ./input_video_file.mp4 -pix_fmt gray -f rawvideo -vf pad=800:600:0:75 -s 800x450 -r 7.7 -| ./raw2gmz >output_video_file.gmv
I forgot that I posted my video transcoder (raw2gmv.c). I must have done it before leaving on my trip.

Your ffmpeg parameters are similar to what I used (both on the x86 version and on ARM version). The K5 is fast enough to decode and and play even 1080p x.264 video in "realtime", but the K3 is happier with smaller video with simpler (DivX or XviD) compression.

I will post my ffmpeg for kindle (with all options) soon, and some examples of how to use it.

Meanwhile, I converted your 26 karma to 2600. Welcome to the "club".
geekmaster is offline   Reply With Quote
Old 07-09-2012, 05:37 PM   #103
cyclops0000
Padawan Learner
cyclops0000 has learned how to buy an e-book online
 
cyclops0000's Avatar
 
Posts: 33
Karma: 86
Join Date: Jul 2012
Location: Galactic Sector ZZ9 Plural Z Alpha
Device: Kindle Touch
Hey, i just put gmplayer on my kindle, and i'm having a problem. I can run it from winscp jsut fine, but in xterm, on the kindle, i cannot find the | symbol to run the command... is there an alternate keyboard or a better terminal emulator or a way to run it ithout that key?
also, is there a way to quit gmplayer while it is playing without a pc command?
Thanks
cyclops0000 is offline   Reply With Quote
Old 07-09-2012, 05:45 PM   #104
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
Quote:
Originally Posted by cyclops0000 View Post
Hey, i just put gmplayer on my kindle, and i'm having a problem. I can run it from winscp jsut fine, but in xterm, on the kindle, i cannot find the | symbol to run the command... is there an alternate keyboard or a better terminal emulator or a way to run it ithout that key?
also, is there a way to quit gmplayer while it is playing without a pc command?
Thanks
You can kill gmplay with ctrl-c character from the ssh windows that launched it. From a launcher menu that runs it in the backgroud, you can kill it with "killall -9 gmplay" from ssh (or you could add that to a launcher menu).

The xterm program does not have a vertical bar (pipe) character? Really? That sucks because it is used a lot in shells and program source code... I think you can change the keyboard layout to include that character if it is missing. Or you could try a different terminal program such as JoppyTerm.

Last edited by geekmaster; 07-09-2012 at 05:48 PM.
geekmaster is offline   Reply With Quote
Old 07-09-2012, 05:48 PM   #105
cyclops0000
Padawan Learner
cyclops0000 has learned how to buy an e-book online
 
cyclops0000's Avatar
 
Posts: 33
Karma: 86
Join Date: Jul 2012
Location: Galactic Sector ZZ9 Plural Z Alpha
Device: Kindle Touch
Quote:
Originally Posted by geekmaster View Post
You can kill gmplay with ctrl-c character from the ssh windows that launched it. From a launcher menu that runs it in the backgroud, you can kill it with "killall -9 gmplay" from ssh (or you could add that to a launcher menu).

The xterm program does not have a vertical bar (pipe) character? Really? That sucks because it is used a lot in shells and program source code... I think you can change the keyboard layout to include that character if it is missing. Or you could try a different terminal program such as JoppyTerm.
but how would i run the launcher menu to kill it? is there some way to sewt a double tap home button to close it?
cyclops0000 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacks free kindle video player geekmaster Amazon Kindle 0 05-07-2012 12:17 AM
Video Player wilbrich Kobo Tablets 1 11-24-2011 02:40 PM
Video player, Video streaming,Remote mint121 enTourage eDGe 1 11-18-2011 03:31 PM
Frustrated with the video player TonyToews Kobo Tablets 10 11-01-2011 01:15 PM


All times are GMT -4. The time now is 05:15 PM.


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