Skip to content

biggestfatboy/mjpg-opencv-video-broadcasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mjpg-opencv-video-broadcasting

broadcasting opencv output video with mjpg streamer in python

For use this project need to install mjpg-streamer and run it on linux terminal

Following this steps

1. Install build dependencies

  sudo apt-get install libjpeg8-dev imagemagick libv4l-dev

2.Add missing videodev.h

  sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h

3.Unzip the MJPG-Streamer source code

  unzip mjpg-streamer-code-182.zip

4.Build MJPG-Streamer

  cd mjpg-streamer-code-182/mjpg-streamer

  make mjpg_streamer input_file.so output_http.so

5.Install MJPG-Streamer

  sudo cp mjpg_streamer /usr/local/bin

  sudo cp output_http.so input_file.so /usr/local/lib/

  sudo cp -R www /usr/local/www

6.Run This Code

  python main.py

7.Start MJPG-Streamer

  LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer -i "input_file.so -f /path/to/your/save/jpg/file -n pic.jpg" -o "output_http.so -w /usr/local/www"

  Example : 

  LD_LIBRARY_PATH=/usr/local/lib/ mjpg_streamer -i "input_file.so -f /home/mazyar/Desktop -n out.jpg" -o "output_http.so -w /usr/local/www"

8.Watch the Stream!

Now you can connect with your web browser and watch the stream live. If you want to watch

from within the same Raspberry Pi you can enter http://localhost:8080 in the browser's

address bar. If you want to watch from another computer in your network use

http://IP-address:8080.

Lets Enjoy !!!

About

broadcasting opencv output video with mjpg streamer in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages