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 ?

  • TCB13@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    10 months ago

    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;
                    }
            }
    }
    

    Note that /dev/video4 is your camera. It will even turn off the camera if nobody is connected.

    Enjoy.