<< return to Vizycam.com

Embedding video stream in a website

I have set up vizycam with a custom URL (see nginx reverse proxy config below)

I would like to embed the video stream in another website if possible (without user authentication and in an iframe is OK).

The thing I’m not sure about is how do I get just the current video stream (don’t need settings etc.).

Is there a URL path that I can refer to that just streams the current video output?

Alternatively, would it make more sense to create a new video python app and strip out the settings, then I could embed that in another web page?

I am happy to sort out CSP/proxy settings but just not sure how to get the video source URL.

server {
    listen      80;
    server_name vizy.mywebsite.net;

    # redirect certbot challenges to challenge dir
    location ^~ /.well-known/acme-challenge/ {
            root /etc/nginx/letsencrypt;
    }


    location / {
        return 301 https://$server_name$request_uri;
    }


}


server {
    server_name vizy.mywebsite.net;

    # increase max request size (for large PDFs)
    client_max_body_size 200M;

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/vizy.mywebsite.net/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/vizy.mywebsite.net/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    location / {
        proxy_pass http://vizy/;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";

    }
}

Hello,
I think it may be possible to embed an HTML video object in a page and connect things up via webrtc. I’m not sure about scaling – streaming to lots of clients. Vizy’s in-page video streaming is only going to work well for less than about 10 clients. This is because the webrtc stream is served directly from Vizy, and live streaming tends be more complicated – serving a live stream isn’t like serving a static video file as it depends on each client’s downstream bandwidth, ability to render video, etc. so that low latency is maintained.

Something like youtube’s live-casting is an example of scalable streaming.

Can you describe what you’re trying to do? Perhaps we can offer some ideas. Or maybe you don’t care about more than a few clients…

Edward

Hello,
Sounds interesting! By the way, the older raspicam utilties are available, but you need to do some configuration to get them back in working order.
https://docs.vizycam.com/doku.php?id=wiki:running_utilities

It looks like you’re having good luck with the libcamera utilities though. You can flip the camera image by passing in “–hflip” and “–vflip” args to libcamera-vid.

RTMP streams are something I don’t have much experience with. Interestingly, youtube uses RTMP/RTMPS for Youtube Live. Using ffmpeg to do the conversion is a good call though.

You might post on the Raspberry Pi camera forum:
https://forums.raspberrypi.com/viewforum.php?f=43

They are more familiar with the libcamera utilities.

Hope this helps! Let us know what you find out :slight_smile:

Edward