Live data from Hacker News

All the giant companies used ffmpeg (2020)

twitter.com

21–30 of 202 posts

Re: All the giant companies used ffmpeg (2020)

#21
post #14

Earlier quoted context omitted.

>FLOSS made the internet possible. FTFA! In all seriousness though; there isn't an aspect of computing that hasn't been improved by F(L)OSS. (What's the L stand for?)

Libre. Usually used to denote that we mean freedom not zero-cost when saying “free”

It's French or Spanish for free, because in our languages we split the concept of free beer and free speech into two words.

Gratuituous could be used for free of charge since it's what we used in latin languages (which I suppose is the same root as gracious - at least in formal french we replace gratuit with gracieux to mean the same thing).

So I wonder if English, tired of borrowing a strange word, will use gracious or gratuitous some day to denote free of charge ! That would maybe avoid all these questions of what libre means !

Re: All the giant companies used ffmpeg (2020)

#22

Considering how ubiquitous it is, it's a mystery how and why there's so little documentation about how to use the library versions libavcodec and libavformat.

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).

Re: All the giant companies used ffmpeg (2020)

#23
post #5

The creator of ffmpeg, Fabrice Bellard, has an impressively long list of projects. Very talented developer! https://bellard.org/

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

There's maybe some insight to be gained by analyzing the commits to see if the code seems to be made by different people. I remember that there was the same theory about a very prolific person on the npm/js ecosystem.

Re: All the giant companies used ffmpeg (2020)

#25
post #11

I came across a set-top box that I suspected used ffmpeg for transcoding, because I recognized some artifacts I saw when I used ffmpeg's defaults for some settings. Looked through their copyright notices and it turns out they were using ffmpeg. It's really everywhere.

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 audible artifacts, especially in high frequency sounds like cymbals (you get a sort of warbly characteristic). MP3 actually has better performance in ffmpeg (via LAME) than AAC at the same bitrate, using the built-in encoder.

If you've ever heard a Twitch streamer, especially people playing 8-bit games or chiptune-ish music, and wondered why the audio sounded a bit dodgy, it's ffmpeg. AAC at 160kbps (the streaming standard) is supposed to sound better than that. OBS will use FDK if available, and on macOS and 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.

If you're using ffmpeg on Linux, install libfdk and use libfdk_aac; if you're on macOS, use aac_at instead. Those are much better encoders and ffmpeg can use them as external libraries.

Note that this isn't a criticism of ffmpeg; lack of quality in some codecs is a direct result of lack of funding (though I do fault them for, at one time, claiming the built in AAC encoder was good enough to be made the default and competitive with FDK; it wasn't and still isn't, but I think they reverted that claim at some point).

(source: I help run a couple anime DJ restreaming-based events and fixing the AAC issue is a big red warning item in my set-up guide; I once got a double transcode feed where both steps were using ffmpeg-AAC and I could instantly tell something was wrong)

Re: All the giant companies used ffmpeg (2020)

#26
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…

not even ffmpeg can bring an encoding back from the dregs

Re: All the giant companies used ffmpeg (2020)

#27
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…

> if you're on macOS, use aac_at instead. Those are much better encoders and ffmpeg can use them as external libraries.

Hey, do you happen to know if aac_at is encoding at the slowest speed? (Most compression efficiency but longest encoding time). I can't figure out for sure, so I keep bouncing audio through afconvert since it lets me set `-q 127`, and it's a pain, I'd rather do one step.

Re: All the giant companies used ffmpeg (2020)

#28
post #21
post #14

Earlier quoted context omitted.

Libre. Usually used to denote that we mean freedom not zero-cost when saying “free”

It's French or Spanish for free, because in our languages we split the concept of free beer and free speech into two words. Gratuituous could be used for free of charge since it's what we used in latin languages (which I suppose is the same root as gracious - at least in formal french we replace gratuit with gracieux to mean the same thing). So I wonder if English, tired of borrowing a strange word, will use gracious…

We (English speakers) frequently use gratis for free-as-in-beer.

Re: All the giant companies used ffmpeg (2020)

#29

Considering how ubiquitous it is, it's a mystery how and why there's so little documentation about how to use the library versions libavcodec and libavformat.

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

Header files (or Doxygen), and the few official examples. Some of them use old and no longer recommended APIs/patterns, and have obvious problems as soon as you compile and use them without changing anything.

I say this as someone who has extended and maintained a libav* language binding with similarly terrible documentation. I tried to write more examples for people. But the API surface is vast and resources are extremely scarce. Sometimes you just have to dig into actual production code of FFmpeg (the CLI side), mpv, etc. to see how other people use it.

Post reply on HN