Page 1 of 1
Amino STB - JS to display trick keys
Posted: 24 Jan 2007 20:37
by rcourtney
Been playing with the new Live555 core.
For those that have been playing with trick functions (FF REW PAUSE STOP)
here is the Javascript I have been playing with to display a graphic of
which trick keys to press.
Build your graphic as a 640x500 PNG with a green background (00ff00).
Where the background is green it will be transparent. IM me if you need
a sample emailed.
When you press a trick key the trkbkg.png graphic will be shown overlayed
onto the video. Please note that first time PAUSE/STOP is pressed it will be
very faint. The Amino units allow alpha blending.
This can be imbedded into the Amino STB (using wget) or
served up by a web server.
<HTML>
<HEAD><TITLE>Amino JS Page</TITLE>
<aminoattr tcr="#00ff00" UNLOADVIDEO="no" notoolbar hidepointer />
<script language="javascript">
var Blank = 0; // Flag indicating overlay is blacked out
TimePauseLastPressed = 0;
PauseDebounceTime = 750; // 0.75 seconds
function keyAction(e) {
var keypressed = e.which;
switch(keypressed)
{
case 1073742136: // Pause
Now = new Date();
if Now.getTime()>(TimePauseLastPressed+PauseDebounceTime)) {
TimePauseLastPressed=Now.getTime();
if (Blank==0) {
VideoDisplay.SetAlphaLevel(0);
Blank=1;
}
else
{
VideoDisplay.SetAlphaLevel(50);
Blank=0;
}
}
break;
case 1073742131: // Play
VideoDisplay.SetAlphaLevel(0);
Blank=1;
break;
case 1073742132: // FF
VideoDisplay.SetAlphaLevel(100);
break;
case 1073742134: // Rewind
VideoDisplay.SetAlphaLevel(100);
break;
case 1073742133: // Stop
VideoDisplay.SetAlphaLevel(30);
break;
default:
//window.alert("Unhandled key pressed: "+keypressed);
break;
}
}
</script>
</HEAD>
<BODY bgcolor="#00ff00" text="#ffffff" background="trkbkg.png" style="background-repeat:
no-repeat" onkeypress="keyAction(event);" >
<amino fgalpha="5">
<script language="javascript">
VideoDisplay.SetAlphaLevel(0);
Blank=1;
AVMedia.Play('type=VOD;src=rtsp://ServerIP/test.ts;servertype=ncube;offset=60;');
</script>
</BODY>
</html>
other JS code
Posted: 07 Feb 2007 18:30
by fongoa
do you have idea about how to hide the browser frame and address bar?!
Posted: 07 Feb 2007 19:56
by rcourtney
Sorry, that is the information I still am looking for. I would like to make the
selection look and feel like a DVD menu.
In:
<aminoattr tcr="#00ff00" UNLOADVIDEO="no" notoolbar hidepointer />
notoolbar turns off the address bar and hidepointer hides the cursor.
Hopefully, someone else has additional information and can post a sample.
Posted: 14 Feb 2007 11:25
by SergioTCG
Hello.
Does Live555's trick play operations work on your Amino STB? Which Amino are you using? Did you use the VLC bundled Live555, or did you try the functionality directly via Live555's sample code?
I've been fiddling around with Live555's trick play. When video is playing normally (i.e. 1x speed), everything works fine. When I decide to trick-play it, the picture stops playing (I get a black screen), yet when I press PLAY again, the picture resumes playing normally.
Thanx for any information that would help me clarify that issue.
Regards
Posted: 15 Feb 2007 00:47
by rcourtney
The LIVE555 code from their website seems to work without problems.
The videolan build did not pick up the additional options. Check the
nightly builds they may have fixed that by now.
I still use the DVD function in Videolan normal build to transcode to a TS
stream. Most DVD's audio is Dolby so you'll need a STB with Dolby decoding
such as the 110 I have. Use the indexer program from the LIVE555 website
to generate the required index file TSX to make the trick play work.
You can transcode the Dolby audio if your model doesnot support it.
I have had some audio timing issues getting away from the Dolby encoding.
Posted: 15 Feb 2007 08:37
by SergioTCG
OK, only one more thing. In the code you posted, you set the transparency to 0 when FFing or REWing.
How come?
Posted: 15 Feb 2007 15:27
by rcourtney
Actually I set the image to 100% visable. VideoDisplay.SetAlphaLevel(100);
This example was to show the javascript functions. Fast moving scenes sometimes it is hard to see the graphics so 100%.
Posted: 15 Feb 2007 17:15
by SergioTCG
Okay. When I tested Live555 RTSP server on Amino, FFing and REWing did not work. I'll try again, and post the results. Thank you!
PS: Which Amino do you run, which image version?
Regards
Posted: 15 Feb 2007 18:34
by SergioTCG
OK, interesting thing:
When I try to FF/REW, the video actually _does_ FF/REW itself, but while it is FFing/REWing, I only see a freezed frame.
If I didn't make sense, lemme try to explain:
I am on the 60th second of the video, and decide to FF at 2x for 10 seconds. For these 10 seconds, all I see is the last frame of the video, when it was playing at 1x speed. But, after 10 seconds of FFing at 2x, I resume playing at 1:20 min.
Any idea why this would be happening?
Posted: 27 Feb 2007 03:54
by DJ
OK, interesting thing:
When I try to FF/REW, the video actually _does_ FF/REW itself, but while it is FFing/REWing, I only see a freezed frame.
If I didn't make sense, lemme try to explain:
I am on the 60th second of the video, and decide to FF at 2x for 10 seconds. For these 10 seconds, all I see is the last frame of the video, when it was playing at 1x speed. But, after 10 seconds of FFing at 2x, I resume playing at 1:20 min.
Any idea why this would be happening?
Where did you go to school? If the real question is why does it hold the last frame of video and not display the 2x speed? This may be a design consideration for bandwidth of the connection.
Posted: 27 Feb 2007 10:17
by SergioTCG
Where did I go to school? What does this have to do with the problem at hand?
Yes, while FF/REW-ing, i only see the last freezed frame. I much doubt that the problem lies in the bandwidth, because I'm testing the product on a gigabit connection.
Posted: 27 Feb 2007 23:07
by rcourtney
Sorry haven't had time to respond.
In your /mnt/nv/config.txt
I am thinking amino.rtsp.scale is 2, is that correct?
Try a larger number such as 10 or 20
What is amino.rtsp_server set to?
Posted: 27 Feb 2007 23:11
by SergioTCG
RTSP server is set to nCube.
I do not have the Amino with me, so currently I cannot check the RTSP scale. I _think_ it is set to 6, but I am not sure. I will check tomorrow.
Should it be set to 2?
Regards
Posted: 27 Feb 2007 23:16
by rcourtney
Since you started at 60 and FF'd for 10 seconds and you then saw 1:20
spot, I would say yes it is 2 and not larger.
That may not be enough time between preparing frames to display so
I would bump it up. NCUBE is correct.
Posted: 28 Feb 2007 13:26
by SergioTCG
Nope, still doesn't work.
I've set the trick scale to 20, no effect whatsoever. When trick-playing, I get a freezed frame. Strange.
Posted: 28 Feb 2007 15:06
by rcourtney
It is 20 but behaves like 2. Try numbers greater than 2 and less than 10.
Sure looks like only the first digit is being sent.
Might not explain the still frame but need to start somewhere.
Posted: 01 Mar 2007 09:34
by SergioTCG
No, I think we have a misunderstanding. The trick scale parameter is read correctly, and if I change it, it does perform the FFing and REWing faster, but still displays a freezed frame while FFing/REWing.
Which Aminet model do you have? Can you also check the build and version, please?
Posted: 05 Mar 2007 02:03
by rcourtney
I have the 110. I don't have the unit in front of me. I do not have the
update software that uses multicast. It has the Ant Fresco browser and
I think it is something like version 1.09 but don't quote me.
I am in a country that uses NTSC.
I would try posting to the LIVE555 mailing list. Ross, the administrator,
has tested his software on the Amino STB.
Posted: 08 Mar 2007 14:49
by rcourtney
I saw Ross' reply.
(For those not on the LIVE555 mailing list:
A test program is included that can generate a prescaled transport file
using a scale supplied)
The "pre-scaled" transport file plays fine. Is there a chance the computer
you are using to scale in real time is not fast enough?
Can you try another computer?
7200 RPM hard drives are a minimum and no virus programs
as they may be trying to scan the file prior to releasing it to the
streamer.
Is the mpeg file on hard drive or a slower device such as cdrom?
Sorry I can't be any more of help on this problem.
Posted: 11 Mar 2007 04:47
by Brownstone
A quick question hopefully: How did you guys get trick-play working on your Amino's? I've tried AVMedia.Pause() but nothing happens. Also, when I play the RTSP stream in VLC I get no seek-bar, and pausing takes a long time and stutters.
Thanks for any help.
Posted: 11 Mar 2007 05:39
by rcourtney
Been using LIVE555.com as the server. Simply pressing the FF REW etc
buttons on the remote makes the fuctions operate.
The webpage that works is not much more than a list of movie titles.
I have been trying to get something fancier to work but can't get the graphics to work with Z-index.
<html>
<head>
<aminoattr tcr="#00ff00" UNLOADVIDEO="no" notoolbar hidepointer />
<title>Movies</title>
</head>
<body>
<table width="640" height="500" >
<img style="border: 0px solid ; z-index: 0; position: absolute; width: 640px; height: 500px;" alt="" src="Backgnd.png" hspace="0" vspace="0"></a>
<a href="RTSP://192.168.0.2/movie1.ts">
<img style="border: 0px solid ; z-index: 1; position: absolute; width: 109px; height: 78px;" alt="" src="Frame.png" hspace="300" vspace="120"></a>
<a href="RTSP://192.168.0.2/movie2.ts">
<img style="border: 0px solid ; z-index: 1; position: absolute; width: 109px; height: 78px;" alt="" src="Frame.png" hspace="300" vspace="195"></a>
<a href="RTSP://192.168.0.2/movie3.ts">
<img style="border: 0px solid ; z-index: 1; position: absolute; width: 109px; height: 78px;" alt="" src="Frame.png" hspace="300" vspace="270"></a>
<a href="RTSP://192.168.0.2/movie4.ts">
<img style="border: 0px solid ; z-index: 1; position: absolute; width: 109px; height: 78px;" alt="" src="Frame.png" hspace="300" vspace="345"></a>
<a href="RTSP://192.168.0.2/movie5.ts">
<img style="border: 0px solid ; z-index: 1; position: absolute; width: 109px; height: 78px;" alt="" src="Frame.png" hspace="420" vspace="120"></a>
<a href="RTSP://192.168.0.2/movie6.ts">
<img style="border: 0px solid ; z-index: 1; position: absolute; width: 109px; height: 78px;" alt="" src="Frame.png" hspace="420" vspace="195"></a>
<a href="RTSP://192.168.0.2/movie7.ts">
<img style="border: 0px solid ; z-index: 1; position: absolute; width: 109px; height: 78px;" alt="" src="Frame.png" hspace="420" vspace="270"></a>
<a href="RTSP://192.168.0.2/movie8.ts">
<img style="border: 0px solid ; z-index: 1; position: absolute; width: 109px; height: 78px;" alt="" src="Frame.png" hspace="420" vspace="345"></a>
</table>
</body>
</html>
Re: Amino STB - JS to display trick keys
Posted: 27 Mar 2008 19:28
by ccaguillo
Where can I get a detailed documentation of Amino JMACX and their Java Scripts and APIs?
thanks