Mjpegwriter

Lightweight HTTP server to stream your OpenCV processing in C++
Alternatives To Mjpegwriter
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Object_detector_app1,231
5 years ago16mitPython
Real-Time Object Recognition App with Tensorflow and OpenCV
Two Stream Pytorch420
3 years ago4mitPython
PyTorch implementation of two-stream networks for video action recognition
Mqtt Camera Streamer201
2 months ago13gpl-3.0Python
Stream images from a connected camera over MQTT, view using Streamlit, record to file and sqlite
Video Stream Analytics191
6 years ago3apache-2.0Java
Video_stream_opencv188
a year ago24C++
A package to open video streams and publish them in ROS using the opencv videocapture mechanism
Opencv Ffmpeg Rtmp Stream167
a year ago6mitC++
OpenCV FFMpeg Live Video Stream over RTMP protocol.
Smoothstream164
10 months ago1August 22, 20185gpl-3.0Python
Webcam, PiCamera streaming over the network with Python made easy.
Rvision135
2 months ago7gpl-3.0R
Basic computer vision library for R
Node Camera127
6 years ago4mitC++
Access and stream web camera in nodejs using opencv and websockets.
Udp Image Streaming124
4 years ago2C++
Compress and stream live images over UDP protocol with OpenCV
Alternatives To Mjpegwriter
Select To Compare


Alternative Project Comparisons
Readme

MJPEGWriter

OpenCV Video HTTP Streaming via MJPEG. Based on the code found in StackExchange - CodeReview and Answers - OpenCV

Example main

int main()
{
    MJPEGWriter test(7777); //Creates the MJPEGWriter class to stream on the given port
    VideoCapture cap;
    bool ok = cap.open(0); //Opens webcam
    if (!ok)
    {
        printf("no cam found ;(.\n");
        pthread_exit(NULL);
    }
    Mat frame;
    cap >> frame;
    test.write(frame); //Writes a frame (Mat class from OpenCV) to the server
    frame.release();
    test.start(); //Starts the HTTP Server on the selected port
    while(cap.isOpened()){
        cap >> frame; 
        test.write(frame); 
        frame.release();
    }
    test.stop(); //Stops the HTTP Server
    exit(0);
}

Note: you have to write an image to the MJPEGWriter class before start the server.

Compiling

Compile with C++11, OpenCV libraries and pthread:

g++ MJPEGWriter.cpp main.cpp -o MJPEG -lpthread -lopencv_highgui -lopencv_core -std=c++11

Roadmap

You can follow the development and request new features at https://trello.com/b/OZVtAu05

Popular Opencv Projects
Popular Stream Projects
Popular Machine Learning Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Plus Plus
Cpp
Cpp11
C
Http
Stream
Opencv
Streaming
Http Server
Writer
Code Review
Cpp Library
Mjpeg