How to Access Raspberry Pi Network Camera Externally

Daily Progress

Welcome to follow!How to Access Raspberry Pi Network Camera ExternallyHow to Access Raspberry Pi Network Camera ExternallyHow to Access Raspberry Pi Network Camera Externally

Or add my WeChat: gzswood

In the previous article, we used Raspberry Pi + USB camera and installed mjpg-streamer to view the camera video stream within the local area network.
Today, we will use the internal network penetration software – Feige Internal Network Penetration to achieve real-time external access to our network camera.
Tools Required:
  • Raspberry Pi or other Linux development boards
  • mjpg-streamer
  • Feige internal network penetration software and configured penetration tunnel
  • USB camera
For the previous installation of mjpg-streamer software, camera debugging, and Feige internal network penetration configuration, see the links below; this part is omitted…
  • Deploy a network camera using Raspberry Pi
  • Using internal network penetration tools on Raspberry Pi
1. Start Feige Internal Network Penetration Software
Go to Feige Internal Network Penetration, copy your tunnel startup command, and copy the nohub command to run it in the background.
You also need to set the access password for port 8080, as shown in the figure below.
How to Access Raspberry Pi Network Camera Externally
Use WindTerm to log into Raspberry Pi and switch to the folder where the Feige internal network penetration software is stored.
How to Access Raspberry Pi Network Camera Externally
Paste the nohub command you just copied; you can use the shortcut key “shift + Insert” to start the npc software directly. After starting, it will prompt the PID of the running program.

How to Access Raspberry Pi Network Camera Externally

2. Configure and Start mjpg-streamer

Switch to the mjpg-streamer folder, /mjpg-streamer/mjpg-streamer-experimental as shown in the figure below.
How to Access Raspberry Pi Network Camera Externally
Use vim to open the start.sh file, edit the startup command, and add username and password options.
sudo vim start.sh
Add -c user:passwd username and password configuration after the parameter “-w /www”.
(Swipe left and right to see more content)
# Modify startup configuration information./mjpg_streamer -i "./input_uvc.so -f 2 -q 40 -r 1280x720 -d /dev/video5 -y" -o "./output_http.so -p 8080 -w ./www -c user:321789"
# Configuration parameter description: -f frames per second, the smaller, the smaller the bandwidth, default 30, -q video clarity, the smaller the smoother, default 80, 0-100-r resolution-d device number-y yuyv format support-p http service port-w http file path, here is in the current file directory www folder -c set username and password login, -c user:123456
3. Run mjpg-streamer using multiple terminal windows

The multi-terminal software used here is tmux. If it is not installed, run the following command to install it.

sudo apt-get update
sudo apt-get install tmux

There are many tutorials on tmux; here are some commonly used commands listed simply, enough for our use.

(Swipe left and right to see more content)

# Create a new terminal window, demo is the name of the new terminal windowtmux new -s demo
# Disconnect the current session (which means making the current session run in the background) Ctrl+b and then release (activate command state), then press d key i.e., ctrl+b, d
# Return to the previous sessiontmux a
# List currently running terminals tmux ls

Create a new video terminal window to run mjpg-streamer, enter the new session window and directly input sh start.sh to run mjpg-streamer, press “Ctrl+b”, then release, and then press the “b” key to detach the current session and run it in the background.

How to Access Raspberry Pi Network Camera Externally

You can use tmux a to return to the previous session.
PS: For more tmux usage methods, you can search online; there are many tutorials available.
4. Network Testing
After the above steps, all software and services have started running. Use your phone or other PC to open the internal network penetration mapped 8080 port address to access our network camera.
When connecting, the first prompt for the password is the password set in Feige internal network penetration.
How to Access Raspberry Pi Network Camera Externally
The next prompt for the username and password is the username and password configured in mjpg-streamer.
How to Access Raspberry Pi Network Camera Externally
After verification, you can view the camera.

How to Access Raspberry Pi Network Camera Externally

Welcome to contact and communicate with friendsHow to Access Raspberry Pi Network Camera ExternallyHow to Access Raspberry Pi Network Camera ExternallyHow to Access Raspberry Pi Network Camera Externally

How to Access Raspberry Pi Network Camera Externally

Leave a Comment

×