I want to configure a local webcam to stream (and possibly record) a live feed open to the internet, and acess it half-world away while traveling, using FOSS only acessing it via Android VLC

This guide was quite comprehensive; however the packages for nginx-rtmp are quite abandoned in arch linux. So I thought maybe WebRTC could be an alternative - the communication itself should be encrypted, which WebRTC seems to do; however, I still can’t figure out if VLC will handle this well

Also, it seems that I might need to self-host a VPN to achieve this? What are my options? Has anyone else done this ?

@abominable_panda@lemmy.world
link
fedilink
English
7
edit-2
10M

MediaMTX can sort a lot of this for you. Then its just a matter of accessing your feed on vlc.

VPN is the safer option of accessing your network

Personally, I use this as a camera proxy bit it can record. I use zoneminder otherwise

@TCB13@lemmy.world
link
fedilink
English
4
edit-2
10M

MediaMTX

Going to Mars seems easier and less resource intensive than that thing.

MediaMTX can sort a lot of this for you. Then its just a matter of accessing your feed on vlc.

Here is how you really “just access your feed from VLC” in three easy easy steps:

Step 1. Configure nginx repositories (http://nginx.org/en/linux_packages.html)

Step 2. Install nginx / nginx-rtmp

Step 3. Edit nginx config to add:

rtmp {
        server {
                listen 1935;
                chunk_size 4096;
                allow publish 127.0.0.1;
                deny publish all;

                application live {
                        live on;
                        exec_pull /usr/bin/ffmpeg -f v4l2 -input_format h264 -video_size 1920x1080 -i /dev/video4 -copyinkf -codec copy -f flv rtmp://127.0.0.1/live/stream;
                        record off;
                }
        }
}

A few notes:

  • /dev/video4 is your camera;
  • Some systems (debian) may require this sudo usermod -a -G video www-data to make sure it will work. Because ffmpeg will be launched with the www-data user that doesn’t have access to the video cameras.
  • It will even turn off the camera if nobody is connected;
  • Use ffmpeg -f v4l2 -list_formats all -i /dev/video0 to find what formats your camera supports;
  • Watch the stream from VLC with the url: rtmp://device-ip/live/stream

Enjoy.

@Administrator@lemm.ee
link
fedilink
English
110M

this is the way. Not sure if you can watch webrtc streams with vlc though. But you can always use rtmp or hls

@shadowintheday2@lemmy.world
creator
link
fedilink
English
210M

Thank you, I managed to get it working with MediaMTX and DockoVPN I still don’t know how I would manage dynamic IP changes during the days I’m away, that would break the VPN

@tapdattl@lemmy.world
link
fedilink
English
110M

I just set up a security camera for my dad’s office: zoneminder running the webcam and tailscale for access anywhere.

Amazing! Congrats :)

For the dynamic ip address that you can get a free domain name from afraid or noip or maybe others and point your vpn to your domain name instead of direct ip address. Following that you can run cron job scripts to ensure the ip address that the domain points to is up to date

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 129 users / day
  • 423 users / week
  • 1.16K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.68K Posts
  • 74.2K Comments
  • Modlog