<div dir="ltr"><div>well,  I was trying to get "something" in a page.   I am not that happy with using ffmpeg because it creates a bunch of files indeed and there is a delay of about a minute (might be great for streaming a movie or such).</div><div><br></div><div>I don't mind a delay of a few seconds, buffering etc, but a minute or two is not what I am looking for.</div><div>I did this ffmpeg html5/hls  trial to see if I could get at least something working in a browser.</div><div><br></div><div>I have been reading up a little, not pretending I understand everything.</div><div><br></div><div><br></div><div>So the mechanism (from what I read) is to set oup a stream/pipe with gstreamer/gst-launch  which connects to a camera and 'transcodes" the stream and  "dumps" it somewhere on a 'device'  (sink?).</div><div><br></div><div>So I guess I need to install an apache plugin or so to make that part work, or is there another way to do it? (or some dev device??)    From what I read there is something called a "souphttpclientsink", I also saw a hlssink mentioned (probably the same issues as I have now with fmpeg)  so I am wondering what 'sink' to use, and how if I want  the stream to be displayed in a webpage (I don't want the client/browser/player to connect to anything else then  http port 80).</div><div><br></div><div>thanks,</div><div><br></div><div>Ron<br></div><div><h2><span class="gmail-refentrytitle"><br></span></h2></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 13, 2019 at 12:50 AM Marc Leeman <<a href="mailto:marc.leeman@gmail.com">marc.leeman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ah, but you're not using WebRTC now, you are using HLS.<br>
<br>
HLS will create a bunch of small files in a TS container for the<br>
browser to pick up from a web location.<br>
<br>
If you want to recreate this with GStreamer, you can use the hlssink.<br>
<br>
Just feed it a stream in a transport stream container and it will do<br>
something similar.<br>
<br>
If you drop the files in a location served by your webserver, you can<br>
access it with a browser.<br>
<br>
<br>
On Mon, 13 May 2019 at 06:55, R C <<a href="mailto:cjvijf@gmail.com" target="_blank">cjvijf@gmail.com</a>> wrote:<br>
><br>
> So I manages to get some streaming going, but using ffmpeg but want to use gstreamer really  (ffmpeg creates a bunch of files and the player somehow starts 3 minutes after the current time.<br>
><br>
> So I would like to accomplish the same as I have working with ffmpeg:<br>
><br>
><br>
> Here is what I am using.<br>
><br>
> this is the html:<br>
><br>
> <!DOCTYPE html><br>
> <html><br>
><br>
> <header><br>
><br>
> <title>Live Cam</title><br>
><br>
> <script src="<a href="https://cdn.jsdelivr.net/npm/hls.js@latest" rel="noreferrer" target="_blank">https://cdn.jsdelivr.net/npm/hls.js@latest</a>"></script><br>
><br>
> <script><br>
> function hlsStart() {<br>
>    if (Hls.isSupported()) {<br>
>       var video = document.getElementById('video');<br>
>       var hls = new Hls();<br>
><br>
>       // bind them together<br>
>       hls.attachMedia(video);<br>
>       hls.on(Hls.Events.MEDIA_ATTACHED, function () {<br>
>          console.log("video and hls.js are now bound together !");<br>
>          hls.loadSource("<a href="http://zoneminder.localdomain/IP-Cameras/stream/test-camera/mystream.m3u8" rel="noreferrer" target="_blank">http://zoneminder.localdomain/IP-Cameras/stream/test-camera/mystream.m3u8</a>");<br>
>          hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {<br>
>             console.log("manifest loaded, found " + data.levels.length + " quality level");<br>
>             });<br>
>          });<br>
>       }<br>
>    }<br>
> </script><br>
> </header><br>
> <body onload="hlsStart();"><br>
> <video id="video" autoplay="true" controls="controls"></video><br>
> </body><br>
> </html><br>
><br>
><br>
><br>
> and this is what I am doing with ffmpeg:<br>
><br>
> ffmpeg -i "rtsp://192.168.x.y:554/user=admin_password=XXXXXXXX_channel=1_stream=0.sdp?real_stream" -y -c:a aac -b:a 160000 -ac 2 -s 960x540 -c:v libx264 -b:v 800000 -hls_time 10 -hls_list_size 10 -start_number 1 mystream.m3u8<br>
><br>
><br>
> any suggestions?  (I probably need an Apache plugin, or something like that?)<br>
><br>
><br>
> thanks,<br>
><br>
><br>
> Ron<br>
><br>
><br>
><br>
> On 5/7/19 4:13 AM, Marc Leeman wrote:<br>
><br>
> I don't think you need to transcode, H.264 should also be supported by<br>
> the browsers.<br>
><br>
> On Tue, 7 May 2019 at 09:10, Ralf Sippl <<a href="mailto:ralf.sippl@gmail.com" target="_blank">ralf.sippl@gmail.com</a>> wrote:<br>
><br>
> Hi Ron,<br>
><br>
> if the pipeline works, you got the GStreamer part right. Of course there are<br>
> two streams, video and audio. Each is sent to a different UDP port.<br>
><br>
> Now you need to run the receiving part, i.e. Janus. The streaming demo<br>
> listens to the ports your pipeline sends to. This is obviously off-topic<br>
> here, use the Janus site, or contact me if that doesn't work.<br>
><br>
> You can use webrtcbin instead, as Nirbheek suggested, but I found it harder<br>
> to set up (you need to run the websocket part on your own), and it will be a<br>
> 1-to-1 connection, so you can't use it for broadcast.<br>
><br>
> Ralf<br>
><br>
><br>
><br>
> --<br>
> Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
><br>
><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
<br>
<br>
-- <br>
g. Marc<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div>