1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Main Page

From mjpg-streamer

Jump to: navigation, search


About the project

"MJPG-streamer", is a command line application to stream JPEG files over an IP-based network from the webcam to a viewer like Firefox, Cambozola, VLC, a Windows Mobile device or mobilephone that has a webbrowser. It can make use of hardware compression of certain webcams, in order to reduce CPU cycles of the server. This makes it a light and less CPU hungry solution for embedded devices and regular servers, that should not spend most of their computing power for compressing videoframes. For example it consumes less then 10% CPU on a 200 MHz router hardware when streaming a 960x720 pixel video.


About the name

Other appropriate names would also be MJPEG-streamer or M-JPEG-streamer, the decision was done at an early project state and we just keep it.

What it does

There is a source for images, the input-plugin. This input-plugin produces images and copies it to the memory. There are (several) output-plugins that take those images and do something with the images. Most popular is the webserver-output-plugin, it allows to transport the images to a viewers webbrowser. MJPG-streamer job is to glue together the single input and multiple out plugins, nearly all the important stuff is done by the plugins.



Common to all Input-Plugins is, that they copy JPEG images to a global accessible memory and signal this to waiting processes.


This input-plugin has compiled in images and can be used without a webcam. If you want to write your own input-plugin, this is the best to start with, because it is as simply as possible. It converts the testpictures from JPEG-files to a header file. The header files, containing the images ins compiled into the input-plugin. Once activated, the plugin simply serves those compiled-in-images in a loop.


This input-plugin grabs images from a Linux-UVC V4L2 compatible device, like a Logitech Quickcam Sphere AF or Logitech QC Pro 5000. The source code for this plugin is based on "luvcview" and was changed in many ways. In contrast to "luvcview" it initializes the new Logitech commands for pan/tilt/focus without the need for a helper library or fiddling with XML files, udev rules etc. It is right now the most exiting input plugin, because you can stream up to 960x720 pixel large images from your webcam at a high frame rate (>= 15 fps) without a mentionable CPU load. If you do not care for CPU load, it can even grab 1600x1200 large uncompressed images, compress them in software and stream them to clients.


This input-plugin only implements the pan/tilt control interface, leaving the video stream available for other applications. I use this to provide a web interface for others to control the pan/tilt of my Logitech Orbit AF while Skype does the audio and video stream. This works great at work where we have remote co-workers attend meetings via skype. They get to control the camera during the meeting.



This plugin is a fully functional HTTP 1.0 webserver. It can serve files from a single folder and it can execute certain commands. For example it can serve a single JPEG file of the input plugin, or stream them according to existing M-JPEG standards. By serving files from a folder, it enables you to design your own webpage, that embeds the webcam images and streams. A working and stylish example for such a webpage is part of the MJPG-streamer package. Multiple instances of this plugin can be started in parallel, so the server-threads can operate with different passwords and layouts or command-restrictions.


This plugin is used to store JPEG images of the input plugin in a specified folder. It can be used to grab images and just store them, or to forward them to a FTP account by executing a command after storing the picture. More documentation is available at the page output_file.


Personal tools