Live data from Hacker News

FFmpeg to WebRTC

github.com

1–10 of 50 posts

Re: FFmpeg to WebRTC

#3

I did something similar for Mac, a while back[0]. I never really developed it much farther, because of the latency issues. Since it was for surveillance cameras, that was a showstopper. [0] https://github.com/RiftValleySoftware/RVS_MediaServer

I think we evaluated something like this (ffmpeg to rtc with kurento) to broadcast the screen of mobile devices to a web browser. If I remember correctly, with the correct ffmpeg settings, latency became more than acceptable.

Re: FFmpeg to WebRTC

#4
Nice stuff; I did something similar with ffmpeg and pion.

It was for audio and it was webrtc to ffmpeg. I was streaming a group chat directly to s3.

It mostly worked, but the only problem I ran into was syncing issues if a user had a spotty connection. The solution seemed to involve using rtmp to synchronize but I didn’t have a chance to go down that rabbit hole.

Re: FFmpeg to WebRTC

#5
For `-f h264`, `-bsf:v h264_mp4toannexb` is not needed. It will be automatically inserted as needed, with ffmpeg 4.0 or later.

For latency, specify a short GOP size, e.g. `-g 50`

Re: FFmpeg to WebRTC

#6

I did something similar for Mac, a while back[0]. I never really developed it much farther, because of the latency issues. Since it was for surveillance cameras, that was a showstopper. [0] https://github.com/RiftValleySoftware/RVS_MediaServer

I think we evaluated something like this (ffmpeg to rtc with kurento) to broadcast the screen of mobile devices to a web browser. If I remember correctly, with the correct ffmpeg settings, latency became more than acceptable.

I believe that. I'm sure that I could have greatly reduced the latency, but tuning ffmpeg is not for the faint of heart, and my heart wasn't really into it.

Anyway, HLS has latency, just by definition. The "H" stands for "HTTP" (a synchronous protocol, based on TCP). RT[S]P uses UDP or RDT, and is isochronous.

Re: FFmpeg to WebRTC

#8
I was just looking for something to do this, but couldn’t find much. I need to serve up about 1000 cameras to both hls (for public) and webrtc (for low latency/ptz admin use). Today we do it with paid packages, but I was exploring just using ffmpeg + nginx. Hls is easy enough, but since webrtc is not http, needs its own piece. Anyone have ideas on this? I’m familiar with Wowza and Ant. Any other open source utilities that do rtsp to both hls/webrtc?

Re: FFmpeg to WebRTC

#9
Since there are probably some people experienced with ffmpeg here, is it possible to to image zooms with ffmpg that go deeper then zoom factor 10?

I can zoom up to factor 10 like this:

ffmpeg -i someimage.jpg -vf "zoompan=z='10-on/100':d=1000:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1920x1437" zoom.mp4

But everything above a zoom of 10 seems to fail. Is there a hard limit in the code for some reason? Some way to overcome this?

Or is there another nice linux or online tool to do zooms into images?

Re: FFmpeg to WebRTC

#10
Note that there are a lot of tunings that you may need depending on what your latency tolerance and picture quality tolerance is. I would recommend following FFmpeg's streaming guide [0].

If you are trying to stream desktop, camera, and microphone to the browser, I would recommend pion's mediadevices package [1].

[0] - https://trac.ffmpeg.org/wiki/StreamingGuide

[1] - https://github.com/pion/mediadevices

Post reply on HN