Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1449

MJPEG Webcam Receiver

$
0
0
Attached to this message is the complete source code for this program. It is designed to receive webcam video, but will work for any video source that has these specifications:
Server Location = 127.0.0.1 (same computer as the VB application that is running)
Network Protocol = TCP/IP
Application Protocol = HTTP
Port Number = 8080
Container Format = AVI (each frame starts the String "00dc" followed by a Long who's value equals the size in bytes of the frame's payload data)
Video Codec = MJPEG (Motion JPEG, where each frame of video is a JPEG image)
Audio Codec = none (no audio is sent)

To get those specs on your stream, the easiest way to do it is to use VLC Player to stream the video and make sure the protocol is set to HTTP, the port number is set to 8080, and that the transcoding options are set to use the above mentioned container format and video codec, and that audio is not sent. I won't explain how to use VLC Player here, as this isn't a VLC forum. However there is a VLC forum you can go to to get help (or if you are like me, and have used it a lot, you may already know how to do this). And make sure you are running VLC on the same computer that you are running this VB6 program on.

Now as for my receiver's functionality, it can connect to and disconnect from a server. It can display the video directly, or process it prior to displaying it, using one of several different algorithms to add various image altering effects to the frames. You'll notice a drop in frame rate from 30fps to something much lower, as processing can't occur any faster than about one to two tenths of a second per frame on an image size of 640x480.
Attached Files

Viewing all articles
Browse latest Browse all 1449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>