[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Flash 2 frame second webcam viewer - URGENT

Posted on 2004-04-02
15
Medium Priority
?
3,507 Views
Last Modified: 2010-08-05
I have asked this question of the JAVA people.

I have a cam FTP uploading a file called cam0.jpeg  a couple of times a second to a web server.
This is something you see all over the web. Like http://www.earthcam.com/usa/newyork/timessquare/

Usually then flash or a Java applet refreshes the image.

My problem is the image is always broken because the file is being constantly uploaded.

Can Flash be made to view just one file constantly changing at 1-2 frames a second without viewing the half loaded images?

I still haven’t really got a definitive yes or no.





0
Comment
Question by:Nathan_London
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
15 Comments
 
LVL 9

Expert Comment

by:OBCT
ID: 10741872
Yes.
Just preload the images.
0
 
LVL 4

Expert Comment

by:infoCatch
ID: 10743807
Is this what you want?

http://www.sunsetbeachbar.com/livecam

Let me know. If this is what you need, I'll post the code here.
0
 
LVL 4

Expert Comment

by:infoCatch
ID: 10743968
Just for background:

The constantly updating image that mimics motion, viewed through a java applet of activex control is NOT one that's uploaded through FTP.

Rather, it uses (HTTP server push) nph-cgi (non-parsed-headers) to continuously upload one single file (usually a MJpeg). The java applet reads the file as it comes in; whenever it encounters a Content-Type and Content-Length header, it displays that part of the file as a single jpeg image.

Since you're talking about several frames a second, I doubt that FTP will work for you at all (either with or without Flash). You would have to create a buffer of images on the server and tell Flash to grab the newest complete image. This way, users with varying connection speeds will still be able to upload a complete image (i.e. it won't get destroyed by a newer one).

Probably a better option would be to rebroadcast the stream from your local machine with CURL or some such. Get ready for a lot of tinkering...

HTH
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Nathan_London
ID: 10756401
Im not sure what you mean when you say its not uploaded via FTP. The source of the video is a server in location A. The images are FTPed to a server at location B. The upload of the files with the bandwidth is fine for the frame rate as its currently doing it fine.

Not taking about FTPing to the client.

The client is uploading from their browser via normal http. Client pull.



0
 
LVL 4

Expert Comment

by:infoCatch
ID: 10756927
Two comments:

1. I was referring to what you said here:

  > Usually then flash or a Java applet refreshes the image.
  > My problem is the image is always broken because the file is being constantly uploaded.

Cam --- Server --- Clients           |   This won't work for streaming cameras.  
      FTP        HTTP                     | (i.e. the situation where a Java applet is normally used)

2. If you want to avoid broken images, you can
    a) let your camera upload a temporary image and then rename it.
    b) upload several uniquely named (timestamped) images to act as a buffer.

To check whether an image has completed loading, Flash has methods such as:
   myImage.getBytesLoaded()
   myImage.getBytesTotal()







0
 

Author Comment

by:Nathan_London
ID: 10757136
ok excellent that answer the question. So if uploading a single file broken files will always appear.. That’s what i expected.

The timestamp or sequential named files is what i have assumed would be the solution. This I can set up and the source.

ok, where can i get a buy/download/Flash program I can configure to do this for me?

N
0
 
LVL 4

Expert Comment

by:infoCatch
ID: 10760474
Since soliciting business on EE is a no-no, I think you'll have to look at a qualified developer in your area if you require a custom application.

However, I notice you didn't comment on the Sunset Beach Bar LiveCam, see link above.

I believe that application could be modified to suit your needs. Right now, the camera uses FTP to send a new image to the server every 20 seconds. The Flash app checks with the server every 7 seconds for an updated image by checking for the size of the file.  Whenever a new file is available, Flash downloads the image in the background and swaps it with the previous image when done.  

My approach would be to let camera upload a continuously rotating series of 10-20 images. Let the Flash client download the newest complete image, and when done check for what is at that point the newest image (so you don't run into problems with users that have slower connections). And so on...


0
 

Author Comment

by:Nathan_London
ID: 10760619
I didnt know you are not allowed to Solicit business!
Yes the Sunset Beach Bar LiveCam is fine yes. Just needs to be quicker. What you suggest is what im after.

So where can i go to solicit business? Just need someone to do it then!

0
 
LVL 4

Accepted Solution

by:
infoCatch earned 1500 total points
ID: 10767205
I have uploaded the source files here to help you get started:

        http://www.infocatch.com/livecam.zip

See readme.txt for info.

Norbert
0
 

Author Comment

by:Nathan_London
ID: 10773093
I'll check this out.
0
 

Author Comment

by:Nathan_London
ID: 10878857
thanks for the help but didnt really help me. I have got someone working on code to sort my problem.
0
 

Author Comment

by:Nathan_London
ID: 10891325
Yes I agree. But the answers didnt solve the problem. Thats why i gave a C. Change it to whatever you like its cool.
 
0
 

Expert Comment

by:SupplyMetal
ID: 22375196
infoCatch,

Your response was right in line with what I am looking for... do you have an updated link to the livecam.zip?  I would like to refresh the newest 'complete' image from a set of sequential images from my webcam.

Is there a way to have Flash/Actionscript delete, say all but the 100 newest images, so the dir does not fill?

Thanks again for explaining what you have!
Regards,
Michael
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question