SourceForge.net Logo webcamFLV

INDEX
  • Download the program
  • Display the webcam
  • Start/Stop Buttons
  • Webcam options
  • Information Display
  • Menu Items
  • To start the snowing
  • Setup a Internet server
  • Thanks


  • Welkom to webcamFLV:

    webcamFLV is a tool which grabs images from a webcam and, with use of FFmpeg, translates it to Flash streaming
    video. The compression rate is adjustable and without losing to much quality of the video and with a high rate
    of frames per second it is possible to watch the webcam on the internet, just like watching a youtube movie.
    Since the creation of the program several options are added to the program, like sound, serving images
    from a jpg server and connecting multiple webcamFLV servers. If you're interested just download the program
    and enjoy looking at yourself.



    Instructions:

    Download:

    Download the source or the binary files (see the ReadMe.txt) from Download:.

    The source can be used in Visual Studio 6.

    Display the webcam:

    1. Connect the webcam and start webcamflv.exe
    2. Goto url: http://www.syspert.nl/webcamlcl.php
      This page will start a flash player and will connect to your own computer by ip address 127.0.0.1,
      so only you will be able to see your webcam at that moment. Unless you have port 8080 (default port
      for webcamFLV) open on your ADSL/DSL Modem or Firewall or Router, only then others are able to see
      your webcam too if you have setup a webpage. If you need help or don't know how to create a webpage,
      contact us and if you provide your IP address we can easily create a webpage for you.

    Start/Stop Buttons:
    Three buttons control the capturing, preview of the webcam and one controls the sound capturing. By default
    capturing and preview are set to started.

    The Capture button controls both the capturing and the listening of the TCP port . When no users are connected
    no capturing will take place and if preview is also set to off webcamFLV will minimize process and only listen
    to the incoming port. When the Capturing is stopped all connections will be closed and the listen port
    will be closed. The two threads that controls TCP and the webcam will stop.

    The Preview and Sound start/stop buttons have effect when capturing is stopped!!

    The Preview button controls the preview of the webcam. Because displaying also takes cpu resources it's
    possible to set the preview off. Only when users are connectected and the webcam is actually streaming the
    preview button has no effect. When the last user disconnects and capturing will stop after 5 seconds the preview
    will also stop.

    The Sound button controls the sound capturing. When webcam capturing is stopped the Sound start/stop button
    will set the sound capturing on or off. When the webcam is capturing the button only controls the sending of
    sound to the clients. And when the webcam starts capturing and sound was stopped it is only possible to set
    sound on after stopping the webcam.


    If multiple webcams are connected the default will be used. By using the webcam options it's possible to select
    another webcam. For multiple sound devices the preferred device can be set through windows
    "Control Panel->Sound->recording" settings. By setting a default device will control which device will be used by
    webcamFLV.

    Options for the webcam:
    When the webcam is capturing the options for the webcam are disabled. When the Capture is stopped the options
    available for your webcam are enabled.

    1. Webcam options:
      These options are the options provided by the driver software and gives the oppurtunity to set the webcam
      for desired display options. Be aware that with low light or some options, have a big impact on the
      performance of your webcam. First try to restore to factory settings to get as much frames per second.
    2. Compress options:
      At this moment webcamFLV only works with uncompressed Full Frames or no recompression. Setting
      this to a different option can give unpredictable results. Check the settings!
    3. Webcam Display:
      The current drivers we use for testing do not have this option.
    4. Webcam Format:
      With these option you can set the screen size and Compressor. webcamFLV should be able to handle
      all sizes. Compression is automatically set to I420. Do not change this! Compressor UYVY is the same
      in windows.

    Information display:
    Four fields with infomation follow. The first gives information about the current connected users. The second
    counts the number of JPG images sent per second. The third counts all bytes sent out to the users for 5 seconds.
    After 5 seconds the average is diplayd. The same applies for the number of Frames.

    Only when JPG images are requested the counting is not aquarate. The number of frames requested depents
    on the timeinterval set in the HTML page. Every request needs to set up a new connection and the user info is
    erased when the picture is sent.

    Three links:
    Three links follow. If the first is pressed the default browser will open and will display the test page for a local
    connected webcam.

    The second button wil open a webpage and information of the current connected users will be displayed and
    the last messages will be displayed.

    The third button will connect to a server to forward flash from behind a firewall. But this function is not
    implemented yet. It's possible to start two webcamFLV servers, connect from one to the host and from a browser
    connect to the host server with a parameter to receive images from the first server. For more info contact us.

    Menu item File->Msg:
    A popup screen wil be displayed with the last issued messages. CTRL-M does the same.

    Menu item File->Exit:
    Exits the program..

    Menu item Settings->Encoding settings:

    1. Frames per Second:
      The framerate you would like to send out frames per second (fps). With a webcam of $ 12.00
      theoratical 30 frames can be captured. With a one cpu system we were able to send out 28 fps.
      With very low light the same webcam drops to 12 fps. Remember that fps infuences the KBytes
      per second. So set fps as accurate as possible depending on the functionality of the webcam.
      With fps you can decrease the number of frames from the webcam and increase only to the
      maximum capability of the webcam!

    2. Send KBytes per second:
      Together with fps and KBytes per second (KBps) not only the number of average bytes send out
      is defined with this parameter but also the quality of the frames. With a high KBps and a low fps
      the frame quality will by high compared to a low KBps and a high fps.
      Feel free to play around with these two parameters to see the impact on the speed and quality.

      Remember that the upload speed of your provider is important here. Depening of the number of
      people who will contact the webcam simultanious do not exceed that upload speed!

    3. Refresh screen in Sec:
      FFmpeg uses a parameter GOP, which means Group Of Pictures. Every GOP consists of 1
      key frame and the rest are non-key frames. Imagine that the key frame will contain information
      of the complete frame with a large size, and non-key frame contain only information of parts of
      the frame and will be much smaller in size. The larger the GOP size the faster the transfer will be.
      But if one key frame is missed for some reason the quality of the display will be lower, or in some
      situations, corrupted until a new keyframe is sent.

    4. Compress rate JPG in %:
      The compress rate for JPG images is important when both JPG en streaming is used. In fact it is
      the same as KBps for streaming but it will take a percentage of the KBps specified and divide it
      with the JPG Images per second.
      But remember the Images per second is controlled on the client web page and not by webcamFLV.

    5. JPG Images per Second:
      Together with compress rate for JPG images the quality and size is determend.

      But remember the Images per second is controlled on the client web page and not by webcamFLV.

    6. Server Listen Port:
      The listen port for inbound traffic. webcamFLV will listen to this port for connections.

      If an inbound request is done to get a *.flv file, streaming FLV will be started until the client closes
      the connection.

      If an inbount request is done to get a *.jpg file, a JPG image will be generated and will be sent
      back to the client.

      If an inbount request is done to get a ccflv.htm file, a small html page will be sent out which will
      contain information about the current number of connected users. The type of transmittion and
      the last issued messages.

    7. Server Listen Port:
      The listen port for inbound traffic. webcamFLV will listen to this port for connections.

      If an inbound request is done to get a *.flv file, streaming FLV will be started until the client closes
      the connection.

      If an inbount request is done to get a *.jpg file, a JPG image will be generated and will be sent
      back to the client.

      If an inbount request is done to get a ccflv.htm file, a small html page will be sent out which will
      contain information about the current number of connected users. The type of transmittion and
      the last issued messages.

    8. WF remote server, port and key:
      Specify the host server address and port. After starting the connection it is possible to connect
      from a browser to the host server with will pass the images from the webcam client via the server
      to the connected user.

      It's quite simple. On a "client webcamFLV": in the menu Settings->Encoding settings specify
      in the field: WF remote server the IP of the webcamFLV computer which will act as a server
      for all other clients, and the port number in the WF remote port. Save the settings.

      Then again on the client webcamFLV press the WF Server button on the main window which contains
      the changed ip address.

      The client now connects to the server and the server will accept the connection knowing that this
      is a client webcamFLV. It will keep the connection alive and will set the ID of the connection to
      the ip address of the client.

      You can access the flash by specifying the Flashvar:
      ==> Flashvars='url=http://192.168.1.100:8080/name.srv?id=192.168.1.102'
      where 192.168.1.100 is the ip of the server webcamFLV and 192.168.1.102 is the client webcamFLV.

      You must ofcourse be sure that both the client and server are in started capture mode !

      With the newest version a little security with the field WF remote key is added. In this version
      both the client remote key and the server remote key need to be set to the same value!!

    9. JPG remote server, port and picture name:
      Specify the JPG image server address, port and image name. When an address is specified the
      webcam will not connect and all images will be retrieved from the JPG server. This functionality
      will asume that the images are in 320 X 240 format and will be converted to FLV format.
      This option is added for users who have drivers which don't support RGB24 or I420.

    10. Log Save and Log dir:
      Under protest but necessary for debugging purposes. Don't use this option unless you really need to.
      A file a.log will be appended to write messages.

    11. Capture on at startup:
      When the checkbox is checked the next time webcamFLV will startup it will start the TCP thread.

    12. Webcam on at startup:
      When the checkbox is checked the next time webcamFLV will startup it will connect to the webcam.

    13. Preview on at startup:
      When the checkbox is checked the next time webcamFLV will startup it will also start the preview
      of the webcam.

    14. Sound on at startup:
      When the checkbox is checked the next time webcamFLV will startup it will also initiate the sound
      capturing.

    15. Sound buffer in miliseconds:
      Depending on the speed of the server buffering of sound is necessary. A lot of factors influence the throughput
      like upload speed, network traffic and the receiver capabilities. If you want to add sound this option needs to
      be tuned. A number between 100 and 200 miliseconds will give the best performance in normal conditions.

    16. Date time display:
      A simpel date and/or time display will be added to the stream if the box is checked.

    17. Date time format:
      Specify the format of the date/time display. The following characters will generate the date/time display:
      DMY for Day Month and Year
      hms for Hour Minutes and Seconds
      /-: and space for seperators.
      It's important to use the Capitals and lower case characters correctly.

    18. Date time Xpos and Ypos:
      These parameters specify the location on the screen from the upper left corner.

    19. The buttons OK - Cancel - Save will effect the settings for:
      OK - for the duration off the session.
      Cancel - will make no change to the settings.
      Save - will write the settings to webcamflv.ini file and use the new settings.

    Menu item Settings->Trace settings:
    Check the type of messages you would like to see.

    To control the snowing
    Just send the text snow.htm with a number of snowflakes parameter to the server.
    http://ipaddress:portnumber/snow.htm?10
    or
    http://ipaddress:portnumber/snow.htm?100
    untill
    http://ipaddress:portnumber/snow.htm?1000

    and
    http://ipaddress:portnumber/snow.htm?0
    is to turn the snowing off

    It doesn't improve the quality, but it snows....
    The browser responds with a connection error. That is correct because it is snowing....!

    Setup a Internet server:

    A lot of questions are asked how to connect to the webcam from the web. This is not very difficult
    but is out of the scope of this project to explain it all. Microsoft offers a standard IS services,
    Information can be found with microsoft. More difficult is to open a port (default 8080) on the router
    to the computer with the webcam. Most LAN work with dynamic ip's and the config of the network
    connection should be modified to accomplish this. Some routers have the ability to assign an ip
    to the mac-address of the computer but others don't. A little tcp/ip knowledge is required to do this.
    A good sample is descibed on www.portforward.com/routers.htm.
    On this page select the router and on the second page a sample program like bittorrent. Remember the
    local IP address that runs webcamFLV and the port set in the configuration, default 8080.



    download the following file htmlsample.zip and unzip them to the IS path.
    webcamsample.php is a PHP sample.
    webcamsample.html is a script sample.
    popup.swf is a small flash file.

    Specify the correct IP address of the computer serving the webcam.
    If you changed the port, also change it in the script

    With thanks to many people you should be able to broadcast your webcam on the web.