webstream sample

Ouistiti needs specific configuration for streaming:

    webstream = {
        docroot = "srv/www/webstream";
        options = "multipart";
        fps = 30;
    };
   

and add the mime-types for each video steam to support:

   mimetypes = ({
		ext = ".mp3";
		mime = "audio/mp3";
	},
	{
		ext = ".ogg";
		mime = "audio/ogg";
	},
	{
		ext = ".jpeg,jpg";
		mime = "image/jpeg";
	},
		ext = ".mp4,.m4v";
		mime = "video/mp4";
	},
	{
		ext = ".avi";
		mime = "video/avi";
	},
	{
		ext = ".h264";
		mime = "video/h264";
	},
	{
		ext = ".mjpeg,.mjpg";
		mime = "video/x-motion-jpeg";
	});
  

Mjpeg consideration

Two MJPEG types may be considerated:

mjpeg is a very simple and buggy camera streamer.
It use v4l2 to send the stream from webcam to the mod_webstream module.
Launch this application in the docroot directory.

For a stream of JPEG images into mutlipart/x-mixed-replace content, Ouistiti must be set with the "multipart" option of the webstream's configuration.

      options = "multipart";
      
mjpeg -U -n camera.mjpg -R srv/www/webstream

Motion-Jpeg with mutlipart/x-mixed-replace content

For a stream of H264 stream, webstream needs an empty options configuration.

      options = "";
      
mjpeg -U -n camera.h264 -R srv/www/webstream

H264 inside a video tags.