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 08-24-2012, 03:19 PM   #166
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Close.
try this:
Code:
#!/bin/sh
zcat ./gmvid.gmv.gz | ./gmplay
assuming gmvid and gmplay are in the same directory as the script.

Last edited by qlob; 08-24-2012 at 03:55 PM.
qlob is offline   Reply With Quote
Old 08-24-2012, 09:11 PM   #167
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
Which will work assuming you *execute* the script *from* the directory
where as I think ../../../yourscript.sh would break

err I *think* this will fix that.

#!/bin/sh
cd $( dirname "$0" )
zcat ./gmvid.gmv.gz | ./gmplay


hth : )

EDIT: Might need to play with the reference, this is untested. ta. ymmv
twobob is offline   Reply With Quote
Old 08-24-2012, 09:40 PM   #168
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
Or just

#!/bin/sh
zcat /mnt/us/gmvid.gmv.gz | /mnt/us/gmplay


--- or whatever absolute paths to the video and to the gmplay program. There is no need to keep the videos and the program in the same directory.
geekmaster is offline   Reply With Quote
Old 08-25-2012, 03:56 AM   #169
icantbebothered
Penguin
icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.
 
icantbebothered's Avatar
 
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
Quote:

#!/bin/sh
zcat /mnt/us/gmvid.gmv.gz | /mnt/us/gmplay

I'll try to make a launcher extension out of that.
icantbebothered is offline   Reply With Quote
Old 08-26-2012, 03:56 AM   #170
icantbebothered
Penguin
icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.
 
icantbebothered's Avatar
 
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
Does gmplay automatically exit when the video is finished?
icantbebothered is offline   Reply With Quote
Old 08-26-2012, 10:22 AM   #171
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 icantbebothered View Post
Does gmplay automatically exit when the video is finished?
Yes. Look at the source code.
geekmaster is offline   Reply With Quote
Old 08-26-2012, 01:43 PM   #172
icantbebothered
Penguin
icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.
 
icantbebothered's Avatar
 
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
I have no idea what's going on inthe source code.
But the extension shouldn't be hard to make then.
icantbebothered is offline   Reply With Quote
Old 08-26-2012, 04:52 PM   #173
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
IN BIG LUMPS

//==================
// main - start here
//------------------
Here Begins the program

int main(void) {

Set up a value to splat stuff into for timing
int i;

Splat State flag into the Function GMLIB to tell it to set up
(have a look at the code its obvious enough what is happening)

gmlib(GMLIB_INIT);

Decide if we are a kindle with a 4bit or 8bit display and the use the right method
if (ppb-1) { gmplay4(); } else { gmplay8(); }

Continue to do awesome video stuff until...


Get total elapsed time - put it into "i" (tag on a frame count) Print it

i=getmsec()/100; printf("%d frames in %0.1f secs = %2.1f FPS\n",
fc,(double)i/10.0,(double)fc*10.0/i);

when we are done send the Finished State Enumeration
gmlib(GMLIB_CLOSE);

return 0;
}

There are some very clever bits I elide here, but more or less that is what you were discussing.

Last edited by twobob; 08-26-2012 at 04:55 PM. Reason: 8 bit not b bit
twobob is offline   Reply With Quote
Old 08-26-2012, 05:58 PM   #174
Titano
Definitely not King Kong
Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.
 
Titano's Avatar
 
Posts: 126
Karma: 59238
Join Date: Jul 2012
Location: United States
Device: Kindle Touch
Quote:
Originally Posted by icantbebothered View Post
I have no idea what's going on inthe source code.
But the extension shouldn't be hard to make then.
An extension would have to take into account different files names if you didn't want to rename files. Maybe writing a shell script with something like this that runs from xterm or the like would be better.
Code:
clear
echo "GeekMasters Video Player
"
cd /mnt/us/Videos
ls -w 1 *.gz
echo "
What do you want to play? (File name without .gmv.gz)"
read video
echo Playing $video
sleep 1
zcat ./$video.gmv.gz|/mnt/us/gmplay
Then you just put all your files in a folder called 'Videos' and put gmplay in /mnt/us.

Last edited by Titano; 08-26-2012 at 07:51 PM.
Titano is offline   Reply With Quote
Old 08-26-2012, 07:40 PM   #175
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
i think i have " Dialog " working for the 3. that could present a list if im not mistaken. Ill have a look.
twobob is offline   Reply With Quote
Old 08-26-2012, 08:19 PM   #176
Titano
Definitely not King Kong
Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.
 
Titano's Avatar
 
Posts: 126
Karma: 59238
Join Date: Jul 2012
Location: United States
Device: Kindle Touch
Quote:
Originally Posted by twobob View Post
i think i have " Dialog " working for the 3. that could present a list if im not mistaken. Ill have a look.
Hey twobob, the attached file words for me. It even has touch support on the touch. Dialog just does not look to great on eink (my opinion).
Attached Files
File Type: zip dialog.zip (63.1 KB, 171 views)
Titano is offline   Reply With Quote
Old 08-26-2012, 08:30 PM   #177
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
Hi mate. thanks, but i have the exe its the script I am after...
something like:

but this errors...

root@kindle:us> chmod a+r /mnt/us/video.sh
root@kindle:us> /mnt/us/video.sh
/mnt/us/video.sh: line 3: syntax error: "(" unexpected

GNU nano 2.3.1 File: video.sh
Quote:
#!/bin/sh
fileroot=/mnt/us/opt/video
array=( $(ls $fileroot) )
n=0
for (item in ${array[@]})
do
menuitems="$menuitems $n ${item}"
let n+=1
done

dialog --title "Select a file" --menu \
"Choose one of the following or press to exit" \
14 40 6 $menuitems 2> /var/tmp/$$
if [ $? -gt 0 ]; then
rm -f /tmp/$$
clear
echo "Interrupted"
exit 0
fi
selection=${array[$(cat /var/tmp/$$)]}
sleep 1
zcat ./$selection.gmv.gz|/mnt/us/gmplay
Something like that. Im too tired Ill fix it tomorrow.

EDIT: No one wants it so I wont bother fixing it. Sold as seen. Caveat Emptor!

be careful not to put a huge list in /var/tmp !!! it will brick maybe. possibly swith that somewhere safer

Last edited by twobob; 08-27-2012 at 06:29 AM. Reason: var tmp warning
twobob is offline   Reply With Quote
Old 08-26-2012, 08:48 PM   #178
Titano
Definitely not King Kong
Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.Titano never is beset by a damp, drizzly November in his or her soul.
 
Titano's Avatar
 
Posts: 126
Karma: 59238
Join Date: Jul 2012
Location: United States
Device: Kindle Touch
Quote:
Originally Posted by twobob View Post
Hi mate. thanks, but i have the exe its the script I am after...
something like:

but this errors...

root@kindle:us> chmod a+r /mnt/us/video.sh
root@kindle:us> /mnt/us/video.sh
/mnt/us/video.sh: line 3: syntax error: "(" unexpected

GNU nano 2.3.1 File: video.sh


Something like that. Im too tired Ill fix it tomorrow.

be careful not to put a huge list in /var/tmp !!! it will brick maybe. possibly swith that somewhere safer
Sorry, I misunderstood you.
Titano is offline   Reply With Quote
Old 08-27-2012, 04:23 AM   #179
icantbebothered
Penguin
icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.icantbebothered ought to be getting tired of karma fortunes by now.
 
icantbebothered's Avatar
 
Posts: 1,017
Karma: 4742434
Join Date: Jul 2012
Device: Kindle Touch 5.3.2.1
Quote:
Originally Posted by Titano View Post
An extension would have to take into account different files names if you didn't want to rename files. Maybe writing a shell script with something like this that runs from xterm or the like would be better.
Code:
clear
echo "GeekMasters Video Player
"
cd /mnt/us/Videos
ls -w 1 *.gz
echo "
What do you want to play? (File name without .gmv.gz)"
read video
echo Playing $video
sleep 1
zcat ./$video.gmv.gz|/mnt/us/gmplay
Then you just put all your files in a folder called 'Videos' and put gmplay in /mnt/us.
I actually thought of the video extension being a submenu, with all the videos and gmplay in the bin. Then there would be more than one shel scipts, and they would look something like this:

#!/bin/bash

zcat ./gmvid(or whatever the video is called).gmv.gz | ./gmplay

And the menu.json would include several items, and their actions would be shell scripts in the bin directory.
icantbebothered is offline   Reply With Quote
Old 08-27-2012, 04:45 AM   #180
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
Well. that would work too no doubt. good luck
twobob 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 03:11 AM.


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