Live data from Hacker News

FFmpeg merges WebRTC support

git.ffmpeg.org

161–170 of 204 posts

Re: FFmpeg merges WebRTC support

#161

I have a beginner question - Can WebRTC be used as an alternative to sending base64-encoded images to a backend server for image processing? Is this approach recommended?

Now I have the question - when does one send base64-encoded images to a backend server?

Re: FFmpeg merges WebRTC support

#162

Earlier quoted context omitted.

WebRTC excels at sub-second latency peer to peer, so you can do near-realtime video, so anywhere that is useful. Say you wanted to do a virtual portal installation connecting views from two different cities with live audio, you could have ffmpeg feed off a professional cinema or DSLR camera device with a clean audio feed and stream that over WebRTC into a webpage-based live viewer. Or say you wanna do a webpage that…

The irony is that you don't _actually_ need WebRTC to get subsecond latency; you can fairly reliably get ~100–200ms (plus network latency) with a completely normal TCP stream.[1] But since browsers have effectively standardized on HLS, whose design is completely antithetical to low-latency (you _can_ do low-latency HLS, but only with heroic efforts), low-latency streaming video has never really been part of their bre…

  node1# nc -u node2 12345  /dev/fb0
The "sub-second latency" thing is the standardized punchline coming from WebRTC folks, but yes, it's confusing. Nothing can make video flow faster than above, only thing you can do by inventing a new standard is to minimize the overhead you must add for your purposes.

Re: FFmpeg merges WebRTC support

#163
OMG, this is not completely brain damaged c++ code lost in the middle of one of the web engines from the whatng cartel??? or C code with one billion dependencies with absurd SDKs???

Quick! Quick! I need to find something bad about it... wait... AH!

Does it compile with the latest libressl? Hopefully not (like python _ssl.c) and I can start talking bad about it.

;P

Ofc, that was irony.

We all know the main issue with webRTC is not its implementations, but webRTC itlself.

All that said, it is exactly at this very time twitch.tv chose to break ffmpeg HLS (its current beta HLS streams are completely breaking ffmpeg HLS support...).

Re: FFmpeg merges WebRTC support

#164
post #132
post #119

Earlier quoted context omitted.

Not sure I follow your maths there. If we assumed an average of 6Mb per stream that's 3000 streams, practically speaking a little lower. It's all relative I guess but it's not that high.

Multicast enters the room

You can't multicast over the internet.

Re: FFmpeg merges WebRTC support

#165
post #153
post #132

Earlier quoted context omitted.

Multicast enters the room

Does multicast actually work from a home network to another set of homes over the internet? I thought this traffic would just get dropped by one of the hops along the way if you tried it. https://networkengineering.stackexchange.com/questions/47994...

It won't even make it through your home "gateway", in practice it's usable at layer 2 only.

Re: FFmpeg merges WebRTC support

#166

A commit that was "co-authored-by" 6+ people and has three thousand lines of code: this is a total wreck of a development workflow. This feature should have been implemented with a series of about 20 patches. Awful.

(long time FFmpeg dev here)

You are being downvoted, but you are entirely correct. This is also explicitly not allowed in FFmpeg, but this was pushed after many months, with no heads up on the list, no final review sign off, and with some developers expressing (and continuing to express) reservations about its quality on the list and IRC.

Re: FFmpeg merges WebRTC support

#167

Earlier quoted context omitted.

WebRTC excels at sub-second latency peer to peer, so you can do near-realtime video, so anywhere that is useful. Say you wanted to do a virtual portal installation connecting views from two different cities with live audio, you could have ffmpeg feed off a professional cinema or DSLR camera device with a clean audio feed and stream that over WebRTC into a webpage-based live viewer. Or say you wanna do a webpage that…

The irony is that you don't _actually_ need WebRTC to get subsecond latency; you can fairly reliably get ~100–200ms (plus network latency) with a completely normal TCP stream.[1] But since browsers have effectively standardized on HLS, whose design is completely antithetical to low-latency (you _can_ do low-latency HLS, but only with heroic efforts), low-latency streaming video has never really been part of their bre…

And in real world (e.g. mobile networks) there is going to be packet loss, so TCP is a non-starter for production-quality real-time streaming.

Re: FFmpeg merges WebRTC support

#168
post #60

Earlier quoted context omitted.

Wow, you are not wrong. I just asked Gemini "how can I use ffmpeg to apply a lower third image to a video?" and it gave a very detailed explanation of using an overlay filter. Have not tested its answer yet but on its face it looks legit.

It's amazing --- I cut my teeth in software engineering with ffmpeg-related work 15 years ago, LLMs generating CLI commands with filters etc. is right up there with "bash scripts" as things LLMs turned from "theoratically possible, but no thanks unless you're paying me" into fun, easy, and regular. Yesterday I asked it for a command to take a 14 minute video, play the first 10 seconds in realtime, and rest at 10x spe…

I never found bash scripting disagreeable. I have thousands of scripts for both work and my everyday computer usage. I keep a ~/bin folder in my path where I place useful scripts that I have written for my own use. One thing that keeps me using bash for this purpose over Python or Ruby (which I use for serious programming) is that I can take a command line invocation that I manually constructed and tested and put it in a script without modification.

Re: FFmpeg merges WebRTC support

#169

Earlier quoted context omitted.

Where's the best place that people are talking about WebRTC then? Hacker News doesn't have rooms by topic does it?

Broadcast Box has a discord https://discord.gg/An5jjhNUE3 You could also join the Pion one https://pion.ly/discord Other place is video-dev Slack https://www.video-dev.org/ X also has a great community of hackers!

Are now Discord, Slack and X now better options than Reddit?

Too bad nobody is using open forums (e.g. Discourse, Matrix, Mastodon).

Re: FFmpeg merges WebRTC support

#170
post #60

Earlier quoted context omitted.

Wow, you are not wrong. I just asked Gemini "how can I use ffmpeg to apply a lower third image to a video?" and it gave a very detailed explanation of using an overlay filter. Have not tested its answer yet but on its face it looks legit.

"Have not tested its answer yet but on its face it looks legit." That's LLMs for you

Fair point, but I only had limited HN commenting time budgeted, not getting a video set up to test this idea. I did confirm that the overlay feature exists via the official ffmpeg documentation.
Post reply on HN