Live data from Hacker News

All the giant companies used ffmpeg (2020)

twitter.com

61–70 of 202 posts

Re: All the giant companies used ffmpeg (2020)

#61
post #60
post #5

Earlier quoted context omitted.

Some speculate that Fabrice Bellard is actually as many as ten different people.

Is there any particular reason that any mention of Fabrice Bellard turns into a praise-fest? I mean, I get it, the guy makes neat stuff and lots of it. But the level of hype is unusual, and I wonder whether there's an origin for this meme that isn't rooted in reading his actual source code.

It's based on using it, not reading it. It's not hype. There just isn't anyone comparable out there.

Re: All the giant companies used ffmpeg (2020)

#62
post #58

The "triumph of high quality open source software" is wrong because ffmpeg is old C/ASM hacky code (not even C++, optimized by speed for hardware). I got my first experience of optimizing ffmpeg video decoder for AMD Alchemy processor in 2006. Let's take a look at the history of ffmpeg created by hackers for hackers. Do you remember how many times you saw strange squares on the screen when rewinding a YouTube video o…

This is conflating two very different issues. While ffmpeg certainly has its share of vulnerabilities in part caused by it being an old and crusty C project, that has little to do with video glitches. Video glitches are usually caused by corner cases in decoding, e.g. issues with reference frames during seeking. Those are logic errors, which any project handling video formats would be prone to because video codecs are ridiculously complicated these days.

Your blocky errors in video playback aren't caused by a pointer going wild due to bad pointer math in ffmpeg. They're caused by bad or corrupted input or an improper seek to a non IDR point in the file. ffmpeg is rock solid for playback of standard corruption-free h.264 streams. This idea that any time you see corrupted video it's a (potentially exploitable) bug in ffmpeg is just not true. Nobody is getting "signal drops" due to ffmpeg problems.

Now if you start fuzzing ffmpeg and giving it wildly noncompliant and broken input, yes, you're going to run into memory errors at some point - which is why there are companies doing just that these days, to find and fix those security flaws. Most of those bugs aren't even in popular codecs (since those are extremely well tested), but rather in the very long tail of obscure formats that ffmpeg supports (try counting how many obscure video game formats it supports some time!), and therefore in codepaths that nobody watching YouTube or Twitch is ever going to hit.

Re: All the giant companies used ffmpeg (2020)

#63
post #36

About 14 years ago, at my first job, I worked with a colleague[1] who introduced me to the wonderful world of open source: the culture, the philosophy, how to submit patches to open source projects, etc. He also introduced me to Debian GNU/Linux which I use actively to this day. One day, he began working on certain audio/video encoding problems that needed to be solved for our project. He chose FFmpeg as the primary…

Yeah, it’s been said that ffmpeg and vlc could play a vinyl record if you fed it to them.

It’s not actually true, but it is story true.

Re: All the giant companies used ffmpeg (2020)

#64
post #43
post #38

Earlier quoted context omitted.

This comment brings me a lot of sadness and pain. I know and respect Fabrice from in person interactions. He is exactly who he claims to be. Maybe an interesting question, instead of this current line of discussion, is to find out what led to his successes? Could it be replicated?

Cálmate, my friend...pretty sure the comment was a light hearted joke.

I'm reminded of the joke that Nicolas Bourbaki quit writing math books when they found out that Serge Lang was one person.

Re: All the giant companies used ffmpeg (2020)

#65

Don't forget about gstreamer. Both FFMPEG and gstreamer are used in many production environments. That said, you also find professional codecs and transport libraries. I've worked on projects using Main Concept codecs and custom plumbing, for instance.

Genuine question: Are there any actual examples of giant companies using gstreamer? Why I ask is that pretty much the only reason I have gstreamer installed on my pesonal laptop is to satisfy certain GNOME dependencies (due to GNOME, understandably, dogfooding its own stuff). Everything else (including apps I use daily e.g. mpv, Firefox, etc) depends on ffmpeg. $ sudo pacman -Rs gstreamer checking dependencies... err…

gstreamer is ubiquitous in research labs that depend on video - extremely common

Re: All the giant companies used ffmpeg (2020)

#66
post #58

The "triumph of high quality open source software" is wrong because ffmpeg is old C/ASM hacky code (not even C++, optimized by speed for hardware). I got my first experience of optimizing ffmpeg video decoder for AMD Alchemy processor in 2006. Let's take a look at the history of ffmpeg created by hackers for hackers. Do you remember how many times you saw strange squares on the screen when rewinding a YouTube video o…

This is conflating two very different issues. While ffmpeg certainly has its share of vulnerabilities in part caused by it being an old and crusty C project, that has little to do with video glitches. Video glitches are usually caused by corner cases in decoding, e.g. issues with reference frames during seeking. Those are logic errors, which any project handling video formats would be prone to because video codecs ar…

This is a code audit issue. Video codecs and drivers are a niche and are extremely protected by patents. The number of ffmpeg researchers and developers is very small compared to the number of lines of code, closed standards and soft/hard bugs in each series of specific video hw/sw encoders and decoders. And an AI that can analyze and validate code as complex as ffmpeg has yet to be invented.

Re: All the giant companies used ffmpeg (2020)

#67
post #38
post #5

Earlier quoted context omitted.

Some speculate that Fabrice Bellard is actually as many as ten different people.

This comment brings me a lot of sadness and pain. I know and respect Fabrice from in person interactions. He is exactly who he claims to be. Maybe an interesting question, instead of this current line of discussion, is to find out what led to his successes? Could it be replicated?

I think it's a joke dude!

Re: All the giant companies used ffmpeg (2020)

#68

Earlier quoted context omitted.

I think you're supposed to read the header files? I have no idea how people write ffmpeg stuff. The only good tutorial I've seen is: https://github.com/leandromoreira/ffmpeg-libav-tutorial

Part of the problem is the API kept breaking every other version; ffmpeg is an amazing project for users but has historically been a nightmare to integrate with and package, for this reason. It's gotten better in the past few years, though, but there's still a lot of legacy codebases that are useless today because they won't build against modern ffmpeg any more (even though the rest of it is fine).

API/ABI is meant to be preserved within a major version, but not across. The deprecation period is typically two years, but deletion is usually much later.

Do you have examples to the contrary from the past few years?

Re: All the giant companies used ffmpeg (2020)

#70
post #11

Earlier quoted context omitted.

Completely idle curiosity: What kind of artifacts? I don’t spend much time on AV stuff, but I always find the details fascinating.

One obvious one is the audio quality of Twitter videos, or lack thereof. That one immediately told me they were using ffmpeg's AAC encoder (it's fairly obvious on piano music). Some of ffmpeg's built in codecs are great and some aren't; AAC is in the latter category. I've done some ABX tests with it and some transcoding tests and it's just not great; even at 320kbps two or three transcode cycles result in clearly aud…

> Windows it'll use CoreAudio if installed, but you need to install an old MSI pulled from an old version of iTunes to get that on Windows... so the vast majority of streamers on Windows are stuck with ffmpeg-AAC.

I think windows might have a built in AAC encoder in media foundation? Wonder if that's true and if it's any good.

Post reply on HN