0

I have set up my raspberry pi 3 with a camera that I want to stream online from outside my network. Apache page pops up that says "It Works!", but I don't know how to get my stream on the server. I am using Mjpeg-streamer.

  • If all you want to do is view a video stream from your Pi you may want to look into motioneyeos. The default setup will allow you to view it from your LAN to view it from outside your LAN you would need to forward the correct port from your router to the PI. – Steve Robillard Sep 29 '16 at 4:38
1

Hope you are following below guide. The Apache pop says it works it means your server is running properly. It is the default Apache page.

For that first try to see the stream with localhost.

Hope you are following this steps:

Following are the same steps from above link.

  1. Install build dependencies

The following command installs the three libraries that MJPG-Streamer uses:

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

  1. Add missing videodev.h

The videodev.h header file that MJPG-Streamer needs has been replaced with a videodev2.h. To make MJPG-Streamer happy you have to create a symbolic link:

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

  1. Download MJPG-Streamer The source code for MJPG-Streamer is available at sourceforge.net, but it is tricky to find the direct download link:

  2. Unzip the MJPG-Streamer source code The source code download is a compressed zip file. Put the file in your home directory (or a temporary folder, if you prefer) and run the following to extract the files: $ unzip mjpg-streamer-code-182.zip

  3. Build MJPG-Streamer MJPG-Streamer comes with several plugins, but only a couple of them are needed to stream video according to the method. The command below only builds what's needed: $ cd mjpg-streamer-code-182/mjpg-streamer $ make mjpg_streamer input_file.so output_http.so

  4. Install MJPG-Streamer I did not discuss installation in the previous article, and that confused many readers. The following commands copy all the needed files into system directories: $ 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

  5. Start the camera We are almost there. Now it is time to start the camera module: $ mkdir /tmp/stream $ raspistill --nopreview -w 640 -h 480 -q 5 -o /tmp/stream/pic.jpg -tl 100 -t 9999999 -th 0:0:0 & Of course, you can use different options to raspistill if you like.

  6. Start MJPG-Streamer The camera is now writing images, so all that is left is to start MJPG-Streamer:

LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer -i "input_file.so -f /tmp/stream -n pic.jpg" -o "output_http.so -w /usr/local/www"

  1. 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://:8080.

  2. Cleanup After you verify that everything is working you can remove the source code:

============================================================

Please let me know if you find any difficulties.

0

In case, if you do not have a static ip connection or your internet service provider has blocked the access, you shall try web-streaming with TOR hidden service and access it externally via TOR Browsers.

Refer the link https://github.com/asura22nov/PIcam-mjpeg-streamer-tor-remoteaccess for details of MJPG-Streaming over TOR Network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.