Live data from Hacker News

FFmpeg merges WebRTC support

git.ffmpeg.org

121–130 of 204 posts

Re: FFmpeg merges WebRTC support

#121

Earlier quoted context omitted.

If you want to copy/paste, try taking the first example and asking the llm to refactor the code to run in a browser with no dependencies. It should be able to strip out the react stuff, or at least get it close and you can fix it from there.

I have tried that a bunch of times and a bunch of ways and did not get ffmpeg to work. It might have to do with these two strange comments at the top: // import { FFmpeg } from '@ffmpeg/ffmpeg'; // import { fetchFile, toBlobURL } from '@ffmpeg/util'; The rest of the code seems to assume "FFmpeg", "fetchFile" and "toBlobUrl" are somehow magically available. Neither me nor any LLM have yet managed to get these into exi…

OK to your credit your original request was to get this all working in a single html file. That is not possible with the easy paths documented on ffmpeg.

By default, the build relies on web workers which need to load their code from somewhere (and usually it has to be the same origin as the code making the request)

Through much mastery of JS build systems that I would not wish on my enemies, I bet you could get it working on localhost, but you’ll have a much better time of it if you set up vite or something for a local build. You can still easily do a “serverless” deploy with GitHub pages or similar but you do need an http server correctly configured for asset requests.

Re: FFmpeg merges WebRTC support

#122

Earlier quoted context omitted.

It means that programs that use the FFmpeg libraries (looks like libavformat specifically) can consume webrtc streams

I still don't understand any practical use cases. Can you give some examples? (I'm not being obtuse here I'm genuinely curious what this can enable now.)

My first thought is a nice way to save a stream in whatever format you want (e.g. transcode for watching on an old phone or something on your commute), just ffmpeg -i and then all your usual video format options, instead of having to download it and then convert it afterwards.

ffmpeg also has some processing abilities of its own, so you could e.g. greenscreen (chroma key) from a stream onto an existing video background.

ffmpeg is a pretty low-level building block and as others have said, it's mostly used as a library - a lot of video players or processing tools can now add support for stream inputs easily, and that's probably where the biggest impact is.

Re: FFmpeg merges WebRTC support

#123

I am so incredibly excited for WebRTC broadcasting. I wrote up some reasons in the Broadcast Box[0] README and the OBS PR [1] Now that GStreamer, OBS and FFmpeg all have WHIP support we finally have a ubiquitous protocol for video broadcasting for all platforms (Mobile, Web, Embedded, Broadcasting Software etc...) I have been working on Open Source + WebRTC Broadcasting for years now. This is a huge milestone :) [0]…

That pr is really great work both technically and interpersonally. A fun read for sure. Great work and thank you for your determination.

Re: FFmpeg merges WebRTC support

#124
post #18

That should make self hosting streams/streaming CDNs way easier. If you know how to use it ffmpeg is such an amazing stand alone/plug and play piece of media software.

LLMs really know how to use it incredibly well. You can ask them to do just about any video related task and they can give you an ffmpeg one liner to do it.

It can't be a Hacker News thread without at least one mention of LLMs, even if the thread is completely unrelated.

Re: FFmpeg merges WebRTC support

#125

Earlier quoted context omitted.

I can't disagree with this take more vehemently. This isn't an "easy PoC". This is "copy and paste it from the docs"-level effort: https://ffmpegwasm.netlify.app/docs/getting-started/usage/ If you can't be arsed to google the library and read the Usage page and run the _one command_ on the Installation page to come up with a working example (or: tweak the single line of the sample code in the live editor in the docs…

If there is a "copy and paste" way to get that to run in the browser, can you copy and paste it to a jsfiddle and post the link to the fiddle here?

As long as you make sure the npm package is available, you can! If you can't figure out how to do it, I'm sorry but I literally can't think of a way to make it less effort. The problem you described in another comment with the import statements is literally explained on the Installation page of the documentation.

Re: FFmpeg merges WebRTC support

#126

Earlier quoted context omitted.

I can't disagree with this take more vehemently. This isn't an "easy PoC". This is "copy and paste it from the docs"-level effort: https://ffmpegwasm.netlify.app/docs/getting-started/usage/ If you can't be arsed to google the library and read the Usage page and run the _one command_ on the Installation page to come up with a working example (or: tweak the single line of the sample code in the live editor in the docs…

I was commenting on the general assertion of the GP's comment, not this specific instance.

Another commenter showed how they were able to use Claude to do this in two messages: one to write the code, a second to paste the error that comes out so Claude can fix it. The exact word of the comment you replied to was "oneshot": if you're going to outsource 100% of the thinking involved in the task to a machine and can't even be bothered to copy over the error you're getting after the first response, my response remains the same.

Re: FFmpeg merges WebRTC support

#128

Earlier quoted context omitted.

It means that programs that use the FFmpeg libraries (looks like libavformat specifically) can consume webrtc streams

I still don't understand any practical use cases. Can you give some examples? (I'm not being obtuse here I'm genuinely curious what this can enable now.)

I want my desktop app https://ossia.io which uses ffmpeg to be able to send & receive video to another computer over internet without having to fiddle with opening ports on each other's routers. This combined with a server like vdo.ninja solves that.

Re: FFmpeg merges WebRTC support

#129

I am so incredibly excited for WebRTC broadcasting. I wrote up some reasons in the Broadcast Box[0] README and the OBS PR [1] Now that GStreamer, OBS and FFmpeg all have WHIP support we finally have a ubiquitous protocol for video broadcasting for all platforms (Mobile, Web, Embedded, Broadcasting Software etc...) I have been working on Open Source + WebRTC Broadcasting for years now. This is a huge milestone :) [0]…

Working in the events broadcasting space, this opens up OBS to being a viable alternative to professional software like vMix. Especially the P2P support and support for broadcasting multiple scenes seem extremely valuable to have.

Re: FFmpeg merges WebRTC support

#130
post #19
post #3

Interesting I keep getting blocked by the bot detection on iOS safari, both from our work WiFi and cellular data. Anubis let me go

Are you getting the "access denied" page, or an infinite challenge loop?

I got stuck on access denied. Canada IPv4. Safari on iOS.
Post reply on HN