17 ms·
All the giant companies used ffmpeg (2020)
- heavyset_go 5y agoI 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.
- mwint 5y agoCompletely idle curiosity: What kind of artifacts? I don’t spend much time on AV stuff, but I always find the details fascinating.
- marcan_42 5y agoOne 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)
- ncmncm 5y agoWhy in the world are you still fooling with AAC? Everybody supports Opus now.
- marcan_42 5y agoLive streaming is stuck in the dark ages of RTMP with H.264 and AAC. It's basically hardcoded everywhere, there is barely any support for other codecs or protocols. You want to send streams to Twitch or YouTube, you're sending H.264 and AAC. OBS doesn't even let you pick streaming codecs. It just assumes H.264 and AAC. You can get it to stream in other codecs by abusing the "record" function with an output to stream instead of filename, but it's a hack...
- lil_dispaches 5y agonot even ffmpeg can bring an encoding back from the dregs
- Wowfunhappy 5y ago> 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.
- marcan_42 5y agoThere are two quality parameters and I'm not sure which one is `-q` in afconvert. One of them is the VBR quality, `kAudioCodecPropertySoundQualityForVBR`. ffmpeg maps it like this: q = 127 - q * 9; So `-q:a 0` should do the same thing as passing 127 to AT. There is another property though; an actual control of codec effort (`kAudioConverterCodecQuality`). That one should be accessible as `aac_at_quality` and maps 0 to 96, so there's no way to go up to the max of 127... But Apple defines "High" as 96, so I get the feeling there won't be a big difference between that and max, especially for an audio codec.
- heavyset_go 5y agoWhen transcoding some streams, if you use ffmpeg's defaults, sometimes the way it handles PTS, DTS and keyframes isn't ideal, and you'll get weird video pauses, blanks, and strange but distinct visual artifacts while the audio plays just fine. Having spent a lot of time using ffmpeg for transcoding, it's one of those things I recognized because I'd often forget to set the correct settings and got similar results, as well.
- jahlove 5y agoStill waiting on Boz to respond: https://twitter.com/ID_AA_Carmack/status/1258610970349441024 https://twitter.com/ID_AA_Carmack/status/1258610970349441024
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- albert_e 5y agoare you saying ffmpeg is the next log4j ?
- hobofan 5y agoYou may be joking, but if one found a RCE in FFMPEG that would apply to any AV transcoding it does, you would probably be able to target a boatload of websites. Of course not on the scale as log4j, but it would still be pretty bad.
- 02020202 5y ago
- marcodiego 5y agoFLOSS made internet video possible.
- darig 5y ago
- UI_at_80x24 5y ago>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?)
- weikju 5y agoLibre. Usually used to denote that we mean freedom not zero-cost when saying “free”
- Proven 5y ago
- xwolfi 5y agoIt'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 !
- bitbckt 5y agoWe (English speakers) frequently use gratis for free-as-in-beer.
- 5y ago
- brian-armstrong 5y agoThe creator of ffmpeg, Fabrice Bellard, has an impressively long list of projects. Very talented developer! https://bellard.org/ https://bellard.org/
- stavros 5y agoSome speculate that Fabrice Bellard is actually as many as ten different people.
- brian-armstrong 5y agoThat would still be ten very prolific people.
- sidpatil 5y agoSo you're saying he's the Nicolas Bourbaki of the software world.
- stavros 5y agoPretty much.
- onionisafruit 5y agoI was thinking.Erin Hunter but tomato tomato.
- TacticalCoder 5y agoNot many do for Linus Torvalds though!
- Zababa 5y agoThere'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.
- 5y ago
- jspaetzel 5y agoReally great example of the long-term impact of opensource.
- sorenjan 5y agoConsidering 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.
- rockwotj 5y agoI 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 https://github.com/leandromoreira/ffmpeg-libav-tutorial
- marcan_42 5y agoPart 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).
- _Gyan_ 5y agoAPI/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?
- oefrha 5y agoHeader 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.
- 5y ago
- Krasnol 5y agoThe only question I have about this is: why did he need a "reminder" to donate...
- lil_dispaches 5y agoI am not surprised at all. What else could you possibly use in place of Ffmpeg?
- m0ngr31 5y agoI've worked for video streaming companies the last 5 years or so. ffmpeg all the way down.
- pabs3 5y agoI note the ffmpeg team do consulting and accept donations: https://ffmpeg.org/consulting.html https://ffmpeg.org/consulting.html https://ffmpeg.org/donations.html https://ffmpeg.org/donations.html
- susam 5y agoAbout 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 tool around which he began building his solution. After having spent several days with FFmpeg, figuring out and documenting various ways of using FFmpeg to solve all our audio/video encoding problems, one day, when we went out for lunch, he declared to the team, "FFmpeg is awesome! If you give me a shoe, I will turn it into a video file!" [1] https://news.ycombinator.com/user?id=topa https://news.ycombinator.com/user?id=topa
- Uehreka 5y agoYeah, 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.
- 01100011 5y agoDon'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.
- kiwijamo 5y agoGenuine 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... error: failed to prepare transaction (could not satisfy dependencies) :: removing gstreamer breaks dependency 'gstreamer' required by cheese :: removing gstreamer breaks dependency 'gstreamer' required by gnome-shell :: removing gstreamer breaks dependency 'gstreamer' required by gst-plugins-base-libs :: removing gstreamer breaks dependency 'gstreamer' required by libcheese :: removing gstreamer breaks dependency 'gstreamer' required by webkit2gtk :: removing gstreamer breaks dependency 'gstreamer' required by webkit2gtk-4.1
- squeaky-clean 5y agoI work at a company acquired by Motorola Solutions and we use gstreamer, but I don't know about MSI overall, just our division. We also use ffmpeg for some things, lol.
- eschneider 5y agoOverall, they do not use gstreamer. You guys are the outliers. :)
- icelancer 5y agogstreamer is ubiquitous in research labs that depend on video - extremely common
- 5y ago
- whalesalad 5y agoSame can be said for imagemagick
- irrational 5y agoI work for a Fortune 500 company. We absolutely use ffmpeg. Why would we not use the best software out there?
- vhiremath4 5y agoi owe so much to fabrice, the ffmpeg community, and the upstream encoders and decoders and their respective communities. this post was a good reminder to donate.
- ellis0n 5y agoThe "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 or DVD MPEG2, or random freezes when streaming Twitch when you think it is a video stream error. But no. Most of these are programming errors of the ffmpeg hacker backend, which has many pointer errors. It is difficult to recovery state from a failure of any level due handling C and pointer errors. The global use of ffmpeg is caused by the lack of FOSS alternatives, but not by the quality of the software. It was cheaper for corporations to fix bugs and hire a developer like me than to develop their own video codec or system from scratch. All alternatives were closed source and required of tones of money per tech licenses like MPEG2. Of course, over the years, the ffmpeg ecosystem has improved and many bugs have been fixed, but this has not changed the general situation with existing and potential bugs and vulnerabilities by design. Therefore, in different video applications, you can observe random bugs and signal drops every day. Nice try John ID_AA_Carmack
- marcan_42 5y agoThis 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.
- jbk 5y agoAnd very few of those big companies contribute back… See https://news.ycombinator.com/item?id=29524103 https://news.ycombinator.com/item?id=29524103
- stayux 5y agoThis guy (Fabrice Bellard) is my personal hero. I have designed and build with my team VOD service for leading local entertainment TV provider in 2009. We were amazed at provided flexibility by ffmpeg. In no time we were able to hook up our back-end logic and go. We opted to "risk" with Nginx and Jquery and delivered successfully on the front-end. The funny thing is that at the time a lot of commercially available "solutions" were a total joke and costed an arm and a leg.
- pabs3 5y agoI note that ffmpeg is on Vizio TVs and Vizio are being sued for not complying with open source licenses, including the ffmpeg one. https://sfconservancy.org/copyleft-compliance/vizio.html https://sfconservancy.org/copyleft-compliance/vizio.html
- klabb3 5y agoAmazing that this effort has legal funding. The stench of hypocracy when media companies, which publicly cry "societal collapse" at personal use IP violations, at the same time disregard basic licenses of others, exploiting volunteer labor for commercial purposes...
- laumars 5y agoI’ve been working for a broadcasting company for a little while now and can confirm I’ve seen the same. A lot of companies are making a lot of money selling services powered by ffmpeg.
- bitwize 5y agoYeah, all the medium-sized companies too. When I was in robotics I recall a project to integrate ffmpeg to provide a way to scrub through camera footage in the gathered data from one of our autonomous vehicles.
- lazylion2 5y agoInterested to know what Twitch is using, they did a two part blog where they explained how ffmpeg was too slow, so they developed their own.
- deleted 5y ago[deleted]
- jackac 5y agoFrom sifting through the leak, it was a fork of ffmpeg they converted to C++, but still retains ffmpeg naming/structures. They dropped any code they didn't use also, so it isn't very much code.
- ollifi 5y agoI’m using ffmpeg to transcode files. My users give feedback that it is really slow. At first I thought they are wrong as I believed ffmpeg is as fast as it gets, but sure enough after testing transcoding (prores -> h264) is many times slower than using resolve, silverstack, compressor etc. I get asked all the time can’t we just swap to using something else, but this ffmpeg monoculture means there seems to be no alternative.
- aspyct 5y agoDoesn't ffmpeg support hardware encoders like Nvidia's nvenc or Intel's idontrememberthename? Aldo AMD, most likely. I know Handbrake supports it, as I used it for my productions in the fast. And I think handbrake uses ffmpeg, maybe?
- ollifi 5y agoYes it does. I am using hw acceleration. This is using mac hardware so not all options are available, but the ones I have tried do not make significant difference.
- kaetemi 5y agoMake sure both your decoding and encoding are on hardware, then. You might be cycling frames through system RAM.
- sonar_un 5y agoAre you sure you are using the h264_videotoolbox options? I mean, you might be, but that, for me, seems to be the problem. Ffmpeg is quite fast if you can invoke the hardware encoders.
- ollifi 5y agoYes I am using videotoolbox. I need to clarify that ffmpeg is not slow (it runs close to realtime bit under 20 fps) problem is that other tools reach 72 frames per second.
- mgaunard 5y agoMyself I have the opposite experience; my first job was a short thing at a video conferencing company (Tandberg, bought by Cisco), and I remember being surprised that much of their resources were dedicated to building custom transcoders.
- ChrisMarshallNY 5y agoThe big deal about using FFMPEG, is tuning it (tweaking the arguments). I never got particularly good at that. There are people that have made entire careers of tuning FFMPEG. I liked his making a $1K donation.
- barbs 5y agoI've only used ffmpeg for some minor video edits, it seems super powerful and is obviously quite ubiquitous. I'm curious to know what people have used it for? I'm sure there are some interesting use-cases out there.
- clxxx 5y agoMuch smaller use case but I’ve used it to automate most of my video editing work (I work on a youtube channel). It probably cut down my work 70%-80%.
- ksec 5y agoI think it is worth posting Tom Vaughan [1]( Father of x265 )'s reply here. >FFMPEG is a media processing framework. It's great for simple media processing jobs (builds a graph, runs the graph). A build of "FFMPEG" includes that media processing framework plus dozens of open source libraries (filters) that do the actual work (x265, x265, libav, etc). >So "FFMPEG" gets a lot of well deserved credit (it's the framework that lots of applications and well-known services run), but the core FFMPEG is probably a tiny fraction of the development man-hours in a build of FFMPEG. It's all the linked libraries that make it useful. It is also worth stating this is from 2020. I am not sure why this is submitted now. [1] https://twitter.com/tmvn/status/1258610308962111490 https://twitter.com/tmvn/status/1258610308962111490
- doe88 5y agoAnd VLC is a tiny fraction of FFMPEG?
- Maursault 5y agoNo, but both vlc and ffmpeg use libavcodec.[1] HandBrake uses ffmpeg. [1] https://en.wikipedia.org/wiki/Libavcodec https://en.wikipedia.org/wiki/Libavcodec
- _Gyan_ 5y agolibav is a part of FFmpeg, and the heart of it. But FFmpeg isn't just a skeleton. Most decoders + protocols + demuxers / muxsers + filters + scaler + resampler are native components. The most well-known 3rd party libs provide a few (albeit commonly used) video encoders. Of course, having interfaces for these external libs is what allows media operations to be consolidated into a single process workflow. As standalone tools, x264/x265 would be more cumbersome to integrate into a pipeline.
- lkbm 5y ago> It is also worth stating this is from 2020. I am not sure why this is submitted now. I came across it a day or two ago in a reply to @Suhail's thread of donating to OSS projects[0]. I suspect that's where the submitter saw it as well. [0] https://twitter.com/nurblieh/status/1473695776253648911 https://twitter.com/nurblieh/status/1473695776253648911
- grishka 5y agoCan confirm that VKontakte, Russia's largest social network, also does use ffmpeg for video transcoding.
- jokoon 5y agoYeah, still got to work on some audio desync issues when using the xstack filter with inputs of different frame rates and formats. Was told to fix it by reconverting all my inputs at the same framerate, but other than that ffmpeg is really a powerful software. But yeah, for simple video tasks, I either use ffmpeg or avidemux, davinci resolve crashed at first use. There's also a python module that wraps the filter syntax I think, because writing a ffmpeg command is not very accessible. It is really crazy when freely accessible software can get developers more reputation and money, rather than pissing code away for code that they don't own anymore. Proprietary code gets the job done, but free software helps the whole community of developers.
- shp0ngle 5y ago(2020)
- mijoharas 5y agoAmazon prime video used to use it (I think both server and client, but I can't fully remember).
- TheDesolate0 5y ago
- ben0x539 5y agoffmpeg is great. I wrote a thing to proxy a twitch livestream and return it as lazy animated gif, so it could be embedded into, like, old-school messageboards and proprietary chat clients that allow hotlinking images. At the core it was feeding a .m3u8 URL into ffmpeg and asking it for a gif. When it turned out that gif was kind of awful for that use-case, I just asked ffmpeg to give me an mjpeg instead, problem solved.
- clxxx 5y agoAfter using ffmpeg extensively in the past year, I’m not surprised at it’s utility being so far spread. It’s amazing and has personally saved me countless hours of what would have otherwise been manual work.
- alpb 5y agoNot mentioned in the thread but YouTube encoding is also built upon ffmpeg: https://streaminglearningcenter.com/blogs/youtube-uses-ffmpeg-for-encoding.html https://streaminglearningcenter.com/blogs/youtube-uses-ffmpe... https://news.ycombinator.com/item?id=2831292 https://news.ycombinator.com/item?id=2831292