On this video I stream an IP Digital camera to an internet site browser working with ffmpeg. The web video is served utilizing nginx web browser arrange on Ubuntu linux.

Video notes: https://www.rickmakes.com/streaming-an-ip-digicam-to-a-website-browser-working with-ffmpeg/

Amcrest IP Cameras: https://amzn.to/2FPzuXv (Amazon affiliate)

hls.js web-site:
https://github.com/movie-dev/hls.js/blob/master/docs/API.md

Keep in mind to adjust to me!
https://twitter.com/rickmakes
https://www.instagram.com/rickmakes/

Go to my Amazon Storefront!
https://www.amazon.com/shop/rickmakes

Help my channel!
https://www.rickmakes.com/paypal_donation

#ffmpeg

source

23 thoughts on “Streaming an IP Digital digital camera to a World large internet Browser making use of FFmpeg”

  1. <!DOCTYPE html>
    <html><head><title>Live Cam</title></head>

    <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script&gt;

    <body>
    <!– Use this if you only support Safari!!
    <div id="player">
    <video id="video" autoplay="true" controls="controls">
    <source src="http://ip-address-of-web-server/live/mystream.m3u8&quot; />
    Your browser does not support HTML5 streaming!
    </video>
    </div>
    –>
    <video id="video" autoplay="true" controls="controls"></video>
    <script>
    if (Hls.isSupported()) {
    var video = document.getElementById('video');
    var hls = new Hls();
    // bind them together
    hls.attachMedia(video);
    hls.on(Hls.Events.MEDIA_ATTACHED, function () {
    console.log("video and hls.js are now bound together !");
    hls.loadSource("http://<ip-address-of-web-server>/live/mystream.m3u8&quot;);
    hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {
    console.log("manifest loaded, found " + data.levels.length + " quality level");
    });
    });
    }
    </script>

    </body>
    </html>

  2. +RickMakes – Hi I am needing some help if possible.

    So I have an IP Camera connected to my DVR and that DVR is connected to my router and all that works correctly and I'm able to see it working from my phone but I'm wanting to also view it from my Web Browser on my Mac… problem is it asks about installing Activex which if not mistaken cannot directly be done on a Mac.

    Cannot help in any way on what I need to do to be able to view my IP Camera through a browser without it asking for ActiveX.

    Any help would be thankfully appreciated.

  3. Thanks for the video. With this solution you have always a delay. I think for a security cam this is unaccaptable. You should go with mjpeg stream or better jpeg/png over websockets instead. The framerate will be much less but it's realtime. The future of life streaming is webrtc.

  4. Thank you Rick. I have subscribbed and liked. I have 3 cameras I want to stream to a page on my website, do you know how I would do this (3 cameras as opposed to 1) ? Also if I embed the 3 x videos in my web page will ffmeg be running 24/7 pulling a 3 streams form my cameras even if the browser's page isn't showing ? Thank you

  5. Does your nginx have an RTMP module compiled and configured? Theoretically, it is not supposed to let you host a streaming server and convert your RTSP to HLS… but then again.. pure nginx with or without RTMP module cannot handle rtsp protocol at all.. I am lost.. what did I miss?

  6. You have to add -hls_wrap 10 if you want it to overwrite the 10 .ts files that were created. For it to function as described in your video your output variable should be: OUTPUT_HLS="-hls_time 10 -hls_list_size 10 -start_number 1 -hls_wrap 10"

Leave a Reply

Your email address will not be published. Required fields are marked *