Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Displaying image from ftp server on tsu 9600
This thread has 12 replies. Displaying all posts.
Post 1 made on Wednesday March 4, 2009 at 21:25
Neenu
Lurking Member
Joined:
Posts:
March 2009
8
Is there a way to display image from my ftp server on TSU 9600? My ipcameras (panasonic) post an image to ftp server every second. How can I display those images on pronto and refresh it every second? I tried modifiying ipcamera script. The script communicates with my ftp server but does not pick up the image. how do i give the path to image?
Plz help...

Thanks...
Post 2 made on Thursday March 5, 2009 at 03:52
Daniel Tonks
Wrangler of Remotes
Joined:
Posts:
October 1998
28,781
Would it perhaps be easier to make whatever directory the FTP server is using available via a web server?
Post 3 made on Thursday March 5, 2009 at 10:59
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,003
Do a search for last 2 years for +FTP and you will find a post where some user was trying to download files from an FTP server. Daniel makes a good point. If posting to an FTP server, it makes sense to also make the images downloadable via HTTP (hopefully without requiring authentication).
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 4 made on Thursday March 5, 2009 at 20:08
Neenu
Lurking Member
Joined:
Posts:
March 2009
8
I can access the image as http://ipaddress or name of server/images/video.jpg. I have the normal javascript which displays and refreshes these images in an asp page. now want to try out it in pronto.the communication with server is ok..but it does not display the image.
Post 5 made on Thursday March 5, 2009 at 22:31
Roti
Long Time Member
Joined:
Posts:
July 2008
104
Getting the JPG directly from the camera would be easier. I put together a generic IP camera module (for cameras needing username & password) which should work for you. I just renews the picture every second(ish). One of the others on the forum (nimnul) prettied it up.

[Link: rohansplace.com]

Using FTP protocol is a bit more complex as you need 2 ports - the initial one for control, and a second one for data transfer. Using most of the existing camera modules won't work. I put together a script to pull a text file from from the FTP server at the Aus Bureau of Meteorology.

[Link: rohansplace.com]
[Link: rohansplace.com]

This should give you the basic idea how to pull from an FTP server (have a look at the forecast page script). You should be able to modify and display a JPEG.

Last edited by Roti on March 6, 2009 01:22.
OP | Post 6 made on Thursday March 5, 2009 at 23:52
Neenu
Lurking Member
Joined:
Posts:
March 2009
8
Thank you for the reply..i will check it out..
OP | Post 7 made on Friday March 20, 2009 at 05:10
Neenu
Lurking Member
Joined:
Posts:
March 2009
8
hi all,

I tried modifing the weather forecast script, I am able to connect to my ftp server. Pronto is receiving data also.but am having a problem in converting the data to an image and display on pronto. here is the code part.


var imageStartIndex1 = TxtData.indexOf("\r\n");
System.print("start index is " +imageStartIndex1);
var bitmapData1 = TxtData.substring(imageStartIndex1+4);
System.print("data is "+bitmapData1);
System.print(bitmapData1.length);
var NewImage1 = new Image(bitmapData1);
System.print(NewImage1.width);
System.print(NewImage1.height);
outputbtn.stretchImage = true;
outputbtn.setImage(NewImage1);
System.print("after image display");
TxtData = "";


width and height of the image is always shown as 0,0. plz help..
Post 8 made on Friday March 20, 2009 at 08:08
Roti
Long Time Member
Joined:
Posts:
July 2008
104
What sort of number are you getting back from "System.print(bitmapData1.length);" ?

If it's a small number, then the FTP data transfer is probably failing.

If it a biggish number (ie like the size of your image), then your getting the data but failing to convert it into an image on the Pronto. This may mean the image header is malformed (not uncommon for webcams). Try killing the webcam and putting a static image from another source into the FTP folder and see if you can read/view it.
Post 9 made on Friday March 20, 2009 at 11:49
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,003
If the image you are trying to retrieve is a GIF, then you are out of luck.

Pronto only supports .BMP, .JPG, and .PNG.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 10 made on Monday March 23, 2009 at 00:08
Neenu
Lurking Member
Joined:
Posts:
March 2009
8
hi all...
thanks for ur support... I succeded in displaying and refreshing the image every second...but now experimenting on another problem... After some 10 second in the page image refreshing stops and throws an exception max count of active sockets reached...

I tried manually closing the socket if it is connected..

dataSocket.onClose = function()
{
if (dataSocket.connected = true)
{
dataSocket.close();

System.print("inside data close");// Close the FTP Control Socket if still open
}
}

but does not seem to work...

Searched and found some previous posts related... now checking it out..

Any other suggestions will be appreciated...

regards
Post 11 made on Monday March 23, 2009 at 11:11
Roti
Long Time Member
Joined:
Posts:
July 2008
104
Rather than closing and opening the sockets, why not just leave the socket open and re-use the same sockets? At each polling interval, check if the socket is open, if so send request, if not, re-open socket.
Post 12 made on Friday March 27, 2009 at 07:43
brodricj
Long Time Member
Joined:
Posts:
May 2008
116
On March 5, 2009 at 22:31, Roti said...
...I put together a generic IP camera module (for cameras needing username & password) which should work for you...

Is this likely to work for a AVTECH video web server requiring authentication, or just a stand-alone IP camera? I'd like to be able to display my CCTV on the Pronto, but I suspect the AVTECH only supports MPEG4 and not MJPEG.
Post 13 made on Friday March 27, 2009 at 08:58
Roti
Long Time Member
Joined:
Posts:
July 2008
104
I would image that if the firmware can deliver a JPG to an FTP server, it should be able to return it directly. Most I have been will support simple static JPG requests. Have you got the manual (preferable as a PDF) and a model number?


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse