Webcam Stream (External JPEG)

Hi, I'm designing a website aiming to provide visual coverage
of surfing locations across the UK through the use of webcam
images. Each of the images themselves will be retrieved externally,
with permission, from various hotels over-looking these locations.
I have spoken to someone who has completed a similar project,
a widget which retrieves and displays webcam images, which can be
viewed here:
http://www.ukbiketrails.co.uk/ukss/weCams.php
I would like to use the same method. Explained in his own
words:
'The feeds you see in the widget are simply JPEG images
hosted on the originating website, so none of the feeds are handled
by myself. The widget sends a HTTP request for the JPEG and
displays what it gets in the widget.'
As you can tell from the link url, he's used PHP, which I
have been learning.
I have lost contact with him recently and not sure the steps
I should take to integrate such a feature into my website. Please
help.

Any help is much appreciated

Similar Messages

  • Loading external jpegs

    I have a page that loads external jpegs... however it seems
    totake longer to retireve and display/load the images going through
    flash than it does if i were to display them as html...why is
    this... or am I just wrong. thanks J.

    thanks kglad,...
    the website i have is purely in flash. It communicates with a
    mysql database using php. However as well as being slow at loading
    external jpegs it is also very slow at retrieving and loading data
    from the database.
    When I test the site locally it runs very fast.
    If this was a problem with my scripting (php) wouldn't i
    notice this slowdown when I tested locally?, therefore is the
    problem with my server opposed to my scripting.
    thanks J.

  • Load external jpeg into flash movie

    Hi, how do i load external jpeg into flash movie?
    Can someone show me the actionscript? Thanks

    hi, i pasted the code on a mc but it didn't work.
    However, when i put in on frame action, it works.
    However, i realised the image flickered (more like refreshed)
    after afew sec...
    Is this normal? Is it the loop problem? how do i get rid of
    that?

  • Transition Based Classes and External JPEGS

    Hello.
    I am trying to create a photo gallery that loads external
    JPEGS . I would like to use transitions effects such as the blinds
    transition (mx.transitions.Blinds) . But as I have read this can
    only be used on a movie clip. My question is how to I apply effects
    to externally loading JPEGS? Thanks, Wonder Wendy

    Thank you so much LuigiL,
    The code worked beautifuly. But my new problem is how to
    load the JPEGS when the thumbnail buttons are pressed. When I tried
    adding my code the images would load without the transition
    effects. So I need to know where to insert the script so the the
    JPEGS will load with the effects.
    Wondering a lot less thanks to you,
    WonderWendy

  • How to limit CPU usage on webcam stream handling?

    Hi, I am working on a robotics project where I use Java and JMF for image processing which is passed through JNI to OpenCV. My project pages are at: http://robot.lonningdal.net
    I am having problems with performance - the VIA CN13000 board is not exactly a racer, but a good and cheap alternative for robotics projects. The two main CPU consumers are speech recognition and webcamera stream handling.
    After some profiling I see that 50% the CPU is busy just decoding the stream where I discard almost all the pictures because my robot really only needs 1 frame per second to operate. I have looked up the JMF samples and found that you could adjust the framerate, but this doesnt work on my Logitech Pro 4000. If I could only limit the amount of pictures the webcamera sent down the stream I would free quite a lot of CPU resources.
    So my questions are, can anyone recommend a webcamera that does allow me to set this framerate through JMF to limit the actual stream from the camera? (important not to confuse this with adjusting visual framerate which actually just discards pictures). Or is there an alternative API I can use to grab single images if webcameras support this feature? Its important that this doesnt have a lot of overhead processing required per picture but that I can e.g. do a getImage() call to the API and it gets the image immediately.
    Any help would be greatly appreciated. Thank you.

    Hi John,
    I saw your update to my original thread in
    http://forum.java.sun.com/thread.jspa?threadID=570463&start=0&tstart=0
    I'm always glad to hear people using the code :-)
    You can set the framerate of that JMF captures the video stream, in the VideoFormat object.
    I've had some success with this approach before.
    So, assuming you still kept the setFormat() method from my code, here's a simple hard coded modification, where you set the framerate in the code.
    Ps. just curious, whereabouts you are in the world ?
    regards,
    Owen
    public void setFormat ( VideoFormat selectedFormat )
            if ( formatControl != null )
                player.stop();
                currentFormat = selectedFormat;
    replace with
    public void setFormat ( VideoFormat selectedFormat )
            float frameRate = 2.0f;   // 2 frames per second, alter as you wish
            if ( formatControl != null )
                player.stop();
               VideoFormat selectedFormatPlusFrameRate = new VideoFormat(selectedFormat.getEncoding(),
                                                    selectedFormat.getSize(),
                                                    selectedFormat.getMaxDataLength(),
                                                    selectedFormat.getDataType(),
                                                    frameRate);
                currentFormat = selectedFormatPlusFrameRate;Edited posted code, had commented out player.stop(), but you really do need that.

  • Broadcasting webcam stream with RTSP

    Hi all.
    I'm working on my final year project lately. I've got the webcam stream and processing it for motion detection, there's no problem with that part. But another part of the project is to broadcast the webcam stream by RTSP protocol. I've seen codes that broadcasts the webcam stream over RTP protocol as I searched over internet by google, but I had to broadcast it in RTSP because the reciever of this webcam stream will be using his/her mobile phone
    and mobile phones do not support RTP protocol. As far as I checked with a program I found on internet, my cell phone ( Symbian OS 60 v2 ) supports HTTP,RTSP etc. I cannot do it with HTTP since I'm going to get live feed, so I had to do it with RTSP protocol.
    So I tried streaming servers like Wowza media server, darwin streaming server, flash media server etc. but I couldn't get my webcams stream by these as far as I followed tutorials. I'm really stuck at this point so I thought that it's time to ask someone for help. What should I do ? ( Please don't say "Implement the RTSP by reading it's RFC :) ). If you ever done something like this please share your experiences with me.
    ps: I've searched sun forums also, but all I found was unanswered questions about rtsp broadcasting, so I started a new one, hoping to find an answer.
    Edited by: lunaticTR on Oct 2, 2009 3:01 PM

    As far as I am aware (and I am aware of most but not all), JMF doesn't support RTSP broadcast, only RTSP reception.
    As far as I checked with a program I found on internet, my cell phone ( Symbian OS 60 v2 ) supports HTTP,RTSP etc. I cannot do it with HTTP since I'm going to get live feed, so I had to do it with RTSP protocol.HTTP can do live feeds, but, they will get progressively further behind the longer the stream stays active due to packet retransmission.
    My suggestion to you would be to google for a product that can take in an RTP stream and output it as an RTSP stream. You can then use JMF to capture the web cam and broadcast it to that product, and then use that product to bounce the RTP stream to your cell phone.
    Or, you could just implement the RTSP by reading it's RFC ;-)

  • Webcam stream with FFMpeg on iPhone

    I'm trying to send and show a webcam stream from a linux server to an iPhone app. I don't know if it's the best solution, but I downloaded and installed FFMpeg on the linux server. I managed to send a video stream from the server (or, at least, that's what I think I did) calling
    ffmpeg -b 96k -r 20 -s 320x240 -f video4linux2 -i /dev/video0 -f mpegts -vcodec mpeg2video udp://192.168.1.34:1234
    I know something arrived because on the Mac machine I have a simple UDP client that shows incoming messages. I'm not sure, but I guess the same messages would arrive on an iPhone app (the code is the same). For what I see on my client, I receive packets of 16 bytes.
    Now, I need to analyze those packets and show the video stream. May anyone point me to the right direction? I'm a bit confused about the role of the segmenter program and how to use it.
    Besides, as I said, I'm not sure FFMpeg is the best/simplest solution to this problem, so any suggestions would be appreciated, as using another streaming server or adopt a different approach.

    Audio & Video - iOS Technology Overview
    Getting Started with Audio & Video
    HTTP Live Streaming Overview
    AV Foundation Programming Guide
    Timed Metadata for HTTP Live Streaming

  • Flash streaming external flv files

    I have a web page which contains a flash object embeded in
    it, this flash is streaming external flv files. The flash was being
    displayed correctly when the website was hosted on a windows 2000
    server but when the site was moved to a windows 2003 server the
    flash is no longer displayed, instead of it a box with undefined
    text inside it. I searched the Adobe support center and found this
    Tech Note about adding the MIME Type through IIS since windows 2003
    doesn't stream flv files. I followed the steps mentioned but still
    am getting the undefined box
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19439&sliceId=2
    Does anyone know how to solve this issue?
    Thanks in advance.

    This is the problem.
    When Flash Player movie files that stream external FLV files
    (Flash videos) are placed on a Microsoft Windows 2003 server and
    then viewed in a browser, the SWF file plays correctly, but the FLV
    video does not stream. These files work correctly if tested on
    other operating systems. The issue affects all FLV files played via
    Windows 2003 server
    And can be solved by....
    1. On the Windows 2003 server, open the Internet Information
    Services Manager.
    2. Expand the Local Computer Server.
    3. Right-click the local computer server and select
    Properties.
    4. Select the MIME Types tab.
    5. Click New and enter the following information:
    * Associated Extension box: .FLV
    * MIME Type box:flv-application/octet-stream
    6. Click OK.
    7. Restart the World Wide Web Publishing service.

  • Blazeds webcam streaming

    Do I need a flash media server along with blaze ds for webcam streaming ?
    or would blaze ds server suffice?

    right so i am developing a live webcam chat application so u mean to say i can have
    blazeds - chat
    red5 - webcam
    Is that correct?

  • Caching external JPEGs

    I have a movie that calls up many external JPEGs using empty
    movie clips and the loadMovie command. Over the course of the movie
    different JPEGs are called up, depending on where the timeline is.
    My problem is dealing with the short time it takes to reload
    each JPEG every single time the timeline position is changed and a
    new frame with a new instance (and new JPEG) is entered. I had
    hoped the movie would just load the JPEG and keep it loaded for the
    entire time, but every time the user goes to a new frame the movie
    reloads the JPEG anew. Isn't there a way to cache the data from
    external JPEGs so it doesn't have to reload all the time?

    thanks kglad,...
    the website i have is purely in flash. It communicates with a
    mysql database using php. However as well as being slow at loading
    external jpegs it is also very slow at retrieving and loading data
    from the database.
    When I test the site locally it runs very fast.
    If this was a problem with my scripting (php) wouldn't i
    notice this slowdown when I tested locally?, therefore is the
    problem with my server opposed to my scripting.
    thanks J.

  • Webcam snapshot to jpeg

    I want to take a singel frame snapshot of a webcam image,
    which is streaming to a server, and send it to a JSP server and
    make it a JPEG. How can I do it? Isn't there a simple way? With few
    lines of code? To make a byte array, perhaps and send it through
    http?

    In photoshop see if File>Scripts>Image Processor works.

  • External webcam on external monitor connected to mac

    Hi,
    Would it be possible to have my external monitor connected with optical webcam connected into my mac than when you use skype and those applications/progams it would have two pictures of you on screen?
    (one mac connected to external monitor wants to put optical webcam through to mac to have two pictures) if that makes it simple.
    Thanks,
    Appleguy

    Okay,
    I have  my macbook pro hooked up with a external monitor, would i be able to put a webcam on that monitor and use the 2nd webcam through macbook.
    Let me know if this makes sense,
    appleguy96

  • Here is the source code to JMF Webcam app + saves jpeg

    Since so many people ask for this code, but never get it, I figured I'd repost it. I didn't write it, but I added the jpeg saving part, and modified it for my device, which you will have to do to get it to work. Just go into JMFRegistry and get the device name from your webcam and then edit the code. Also, keep in mind that some webcams don't work with JMF. You have to have a webcam that supports VFW or WDM interface.
    And here's the code:
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import javax.media.*;
    import javax.media.format.*;
    import javax.media.util.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import com.sun.image.codec.jpeg.*;
    public class SwingCapture extends Panel implements ActionListener
      public static Player player = null;
      public CaptureDeviceInfo di = null;
      public MediaLocator ml = null;
      public JButton capture = null;
      public Buffer buf = null;
      public Image img = null;
      public VideoFormat vf = null;
      public BufferToImage btoi = null;
      public ImagePanel imgpanel = null;
      public SwingCapture()
        setLayout(new BorderLayout());
        setSize(320,550);
        imgpanel = new ImagePanel();
        capture = new JButton("Capture");
        capture.addActionListener(this);
        String str1 = "vfw:Logitech USB Video Camera:0";
        String str2 = "vfw:Microsoft WDM Image Capture (Win32):0";
        di = CaptureDeviceManager.getDevice(str2);
        ml = di.getLocator();
        try
          player = Manager.createRealizedPlayer(ml);
          player.start();
          Component comp;
          if ((comp = player.getVisualComponent()) != null)
            add(comp,BorderLayout.NORTH);
          add(capture,BorderLayout.CENTER);
          add(imgpanel,BorderLayout.SOUTH);
        catch (Exception e)
          e.printStackTrace();
      public static void main(String[] args)
        Frame f = new Frame("SwingCapture");
        SwingCapture cf = new SwingCapture();
        f.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
          playerclose();
          System.exit(0);}});
        f.add("Center",cf);
        f.pack();
        f.setSize(new Dimension(320,550));
        f.setVisible(true);
      public static void playerclose()
        player.close();
        player.deallocate();
      public void actionPerformed(ActionEvent e)
        JComponent c = (JComponent) e.getSource();
        if (c == capture)
          // Grab a frame
          FrameGrabbingControl fgc = (FrameGrabbingControl)
          player.getControl("javax.media.control.FrameGrabbingControl");
          buf = fgc.grabFrame();
          // Convert it to an image
          btoi = new BufferToImage((VideoFormat)buf.getFormat());
          img = btoi.createImage(buf);
          // show the image
          imgpanel.setImage(img);
          // save image
          saveJPG(img,"c:\\test.jpg");
      class ImagePanel extends Panel
        public Image myimg = null;
        public ImagePanel()
          setLayout(null);
          setSize(320,240);
        public void setImage(Image img)
          this.myimg = img;
          repaint();
        public void paint(Graphics g)
          if (myimg != null)
            g.drawImage(myimg, 0, 0, this);
      public static void saveJPG(Image img, String s)
        BufferedImage bi = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB);
        Graphics2D g2 = bi.createGraphics();
        g2.drawImage(img, null, null);
        FileOutputStream out = null;
        try
          out = new FileOutputStream(s);
        catch (java.io.FileNotFoundException io)
          System.out.println("File Not Found");
        JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
        JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
        param.setQuality(0.5f,false);
        encoder.setJPEGEncodeParam(param);
        try
          encoder.encode(bi);
          out.close();
        catch (java.io.IOException io)
          System.out.println("IOException");

    Hi William,
    I've tried this code but I always get an null fgc with the following line.
    FrameGrabbingControl fgc = (FrameGrabbingControl)player.getControl("javax.media.control.FrameGrabbingCotrol");
    So the player returns always null. The other thigns seem to be fine. I can view the image in the application but when I click capture it throws a Null Pointer Exception because fgc is null.
    I am using Logitech QuickCam, USB, Win2k, jdk 1.3.1, JMF 2.1.1
    Can you help me?
    thanx,
    Philip
    Since so many people ask for this code, but never get
    it, I figured I'd repost it. I didn't write it, but I
    added the jpeg saving part, and modified it for my
    device, which you will have to do to get it to work.
    Just go into JMFRegistry and get the device name from
    your webcam and then edit the code. Also, keep in mind
    that some webcams don't work with JMF. You have to
    have a webcam that supports VFW or WDM interface.
    And here's the code:
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import javax.media.*;
    import javax.media.format.*;
    import javax.media.util.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import com.sun.image.codec.jpeg.*;
    public class SwingCapture extends Panel implements
    ActionListener
    public static Player player = null;
    public CaptureDeviceInfo di = null;
    public MediaLocator ml = null;
    public JButton capture = null;
    public Buffer buf = null;
    public Image img = null;
    public VideoFormat vf = null;
    public BufferToImage btoi = null;
    public ImagePanel imgpanel = null;
    public SwingCapture()
    setLayout(new BorderLayout());
    setSize(320,550);
    imgpanel = new ImagePanel();
    capture = new JButton("Capture");
    capture.addActionListener(this);
    String str1 = "vfw:Logitech USB Video Camera:0";
    String str2 = "vfw:Microsoft WDM Image Capture
    ure (Win32):0";
    di = CaptureDeviceManager.getDevice(str2);
    ml = di.getLocator();
    try
    player = Manager.createRealizedPlayer(ml);
    player.start();
    Component comp;
    if ((comp = player.getVisualComponent()) !=
    )) != null)
    add(comp,BorderLayout.NORTH);
    add(capture,BorderLayout.CENTER);
    add(imgpanel,BorderLayout.SOUTH);
    catch (Exception e)
    e.printStackTrace();
    public static void main(String[] args)
    Frame f = new Frame("SwingCapture");
    SwingCapture cf = new SwingCapture();
    f.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    playerclose();
    System.exit(0);}});
    f.add("Center",cf);
    f.pack();
    f.setSize(new Dimension(320,550));
    f.setVisible(true);
    public static void playerclose()
    player.close();
    player.deallocate();
    public void actionPerformed(ActionEvent e)
    JComponent c = (JComponent) e.getSource();
    if (c == capture)
    // Grab a frame
    FrameGrabbingControl fgc =
    fgc = (FrameGrabbingControl)
    player.getControl("javax.media.control.FrameGrabbingCo
    trol");
    buf = fgc.grabFrame();
    // Convert it to an image
    btoi = new
    = new BufferToImage((VideoFormat)buf.getFormat());
    img = btoi.createImage(buf);
    // show the image
    imgpanel.setImage(img);
    // save image
    saveJPG(img,"c:\\test.jpg");
    class ImagePanel extends Panel
    public Image myimg = null;
    public ImagePanel()
    setLayout(null);
    setSize(320,240);
    public void setImage(Image img)
    this.myimg = img;
    repaint();
    public void paint(Graphics g)
    if (myimg != null)
    g.drawImage(myimg, 0, 0, this);
    public static void saveJPG(Image img, String s)
    BufferedImage bi = new
    new BufferedImage(img.getWidth(null),
    img.getHeight(null), BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = bi.createGraphics();
    g2.drawImage(img, null, null);
    FileOutputStream out = null;
    try
    out = new FileOutputStream(s);
    catch (java.io.FileNotFoundException io)
    System.out.println("File Not Found");
    JPEGImageEncoder encoder =
    r = JPEGCodec.createJPEGEncoder(out);
    JPEGEncodeParam param =
    m = encoder.getDefaultJPEGEncodeParam(bi);
    param.setQuality(0.5f,false);
    encoder.setJPEGEncodeParam(param);
    try
    encoder.encode(bi);
    out.close();
    catch (java.io.IOException io)
    System.out.println("IOException");

  • WVC80N - Can't get the camera to stream externally

    Hello experts!
    I recently bought 3 WVC80n cameras to set up in my house. For now, I just want to be able to connect to the cameras through my iPhone using my IP address (which is not static, I know, I'll deal with that issue). I want to type: http://xxx.xxx.xxx.xxx:8081 and see my Camera1. In a few weeks I'll get around to linking the three cameras to my website, but I simply refuse to use TZO to do this... but that's for another thread on another day!
    Right now I have the cameras set up wirelessly and they are working for internal broadcast. However, when I try to connect using my external IP, I get no connection.
    Here is my setup:
    - 3x WVC80N Wireless Cameras
    - 1x Windows 7 64-bit desktop
    - 1x Motorola SBG900 wireless cable modem/router
    These are the static internal IP addresses I have set up, with their corresponding port number:
    192.168.0.20 8081
    192.168.0.21 8082
    192.168.0.22 8083
    Mobile streaming is enabled, UPnP is enabled, Alternate Web Access Port enabled, with 8081 (or 8082, 8083 for the other cameras) as the listed port, RTSP is 554 for all three cameras, RTP Data Port is 5000 for all three cameras. 
    These are the settings on my router:
    - Firewall disabled
    - Cam1 Port forwarding: 8081:8081 to 192.168.0.20
    - Cam2 Port forwarding: 8082:8082 to 192.168.0.21
    - Cam3 Port forwarding: 8083:8083 to 192.168.0.22
    I have read dozens of posts and articles where people say you need to forward the RTSP and RTP Data Ports, add your cameras to the DMZ, etc, etc, etc
    I feel I have tried every iteration of these recommendations and port forwarding options, settings, etc, all to no avail.  
    Any guidance would be very much appreciated,
    Daniel

    I have a motorola SBG900 wireless router/modem combo. Comcast cable is my ISP.
    The problem with other DynDNS programs is that the cameras I have only allow you to select TZO as the provider. There is no option for another DynDNS provider.. so at best, I would have to do a long manual setup and have a program on my desktop that notifies the DynDNS server that  my IP has changed.. The camera won't do it automatically. So if my computer is snoozing and I'm out of town, I won't be able to see what trouble my cats are getting into.
    Frustrating!
    I may just go ahead and pay for the stupid TZO service...

  • How can I decode a data stream to jpeg image?

    Hi
    I am using the tranfered jpeg-data stream of a scanner module which I need to decode and display as an image on my vi.
    Question:
    With which method i can do that on the fly?
    or
    do I need to save the data stream (string) first to decode it afterwards with the "Read JPEG file.vi"? If so, how do I save the data in the correct way in the way that LabView can read it?
    thanks in advance
                             Norick
    Solved!
    Go to Solution.

    For Windows I use .NET to do this type of conversion without resorting to writing temporary files.  This VI will convert most formats (bmp,jpg,gif,tif) to a PNG string and then you can use the native PNG data to LV image VI.  Why they do not provide string based versions for all image formats is beyond me (idea perhaps?).
    Attachments:
    StringToImage.vi ‏33 KB

Maybe you are looking for

  • Are there any timesten installation for data warehouse environment?

    Hi, I wonder if there is a way to install timesten as an in memory database for data warehouse environment? The DW today consist of a large Oralcle database and I wonder if and how a timesten implementation can be done. what kind of application chang

  • PSE 10 Organizer Fenster nicht verschiebbar

    Das Organizer Fenster ist nach oben verschoben, so dass sie Zeitleist und andere Optionen nicht erreichbar sind. Das Fenster läßt sich in der Größe ändern. aber nocht verschieben. Was kann man dagegen zun? Danke Thomas

  • Question in ThreadPool

    Hi All, I am trying to create an application which runs a set of tasks(Runnable) perodically using a Thread pool. The time period being taken from a config file(day, month,yearly). Can anyone please tell me how to capture the change in the time perio

  • Decrypting SSIS packages to a file directory

    Hi! I have several hundred SSIS packages that are decrypted. I want to decrypt all the files to a file directory and I have the password. How can I decrypt all the packages from the SSIS framework? Regards User77

  • Will InDesign accept equations set in MS Word using MathCAD and/or Mathematica?

    will InDesign accept equations set in MS Word using MathCAD and/or Mathematica?