9 ms·
I can’t imagine the scale that FFMPEG operates at. A small improvement has to be thousands and thousands of hours of compute saved. Insanely useful project.
by cr125rider 1y ago
I can’t imagine the scale that FFMPEG operates at. A small improvement has to be thousands and thousands of hours of compute saved. Insanely useful project.
- zahlman 1y agoIt'd be nice, though, to have a proper API (in the traditional sense, not SaaS) instead of having to figure out these command lines in what's practically its own programming language....
- codys 1y agoFFMpeg does have an API. It ships a few libraries (libavcodec, libavformat, and others) which expose a C api that is used in the ffmpeg command line tool. They publish doxygen generated documentation for the APIs, available here: https://ffmpeg.org/doxygen/trunk/ https://ffmpeg.org/doxygen/trunk/
- zahlman 1y agoDon't know how I overlooked that, thanks. Maybe because the one Python wrapper I know about is generating command lines and making subprocess calls.
- Wowfunhappy 1y agoThey're relatively low level APIs. Great if you're a C developer, but for most things you'd do in python just calling the command line probably does make more sense.
- f1shy 1y agoIt could even make sense in C. In some circumstances, I wouldn’t feel bad for cutting that corner.
- 1718627440 1y agoYes, that's what I did some time ago. I already want concurrency and isolation, so why not let the OS do that. Also I don't need to manage resources, when ffmpeg already does that.
- kaladin-jasnah 1y agoAs someone that used these APIs in C, they were not very well-documented nor intuitive, and oftentimes segfaulted when you messed up, instead of returning errors—I suppose the validation checks sacrifice performance for correctness, which is undesirable. Either way, dealing with this is not fun. Such is the life of a C developer, I suppose....
- javier2 1y agoIf you are processing user data, the subprocess approach makes it easier to handle bogus or corrupt data. If something is off, you can just kill the subprocess. If something is wrong with the linked C api, it can be harder to handle predictably.
- astrange 1y agoAlso because you can apply stricter sandboxing/jail/containerization to the process.
- ansk 1y agoFor future reference, if you want proper python bindings for ffmpeg* you should use pyav. * To be more precise, these are bindings for the libav* libraries that underlie ffmpeg
- xxpor 1y agoI get why the CLI is so complicated, but I will say AI has been great at figuring out what I need to run given an English language input. It's been one of the highest value uses of AI for me.
- emseetech 1y agoTheir commitment to performance is a beautiful thing. Imagine all projects were similarly committed.
- byteknight 1y agoSeems so easy! You only need the entire world even tangentially related to video to rely solely on your project for a task and you too can have all the developers you need to work on performance!
- ackfoobar 1y agoI seem to recall that they lamented on twitter the low amount of (monetary or code) contribution they got, despite how heavily they are used.
- lo_zamoyski 1y agoNo one is forcing them to produce code for free. There is something toxic about giving things away for free with the ulterior motive of getting money for it.
- imchillyb 1y agoIt’s market manipulation, with the understanding that free beats every other metric. Once the competition fails, the value extraction process can begin. This is where the toxicity of our city begins to manifest. Once there is no competition remaining we can begin eating seeds as a pastime activity. The toxicity of our city; our city. How do you own the world? Disorder. Disorder…
- godelski 1y agoThey have some fire tweets, especially when people say they write things from scratch or boast about how much money they make with ffmpeg wrappers https://x.com/FFmpeg/status/1775178803129602500 https://x.com/FFmpeg/status/1775178803129602500 https://x.com/FFmpeg/status/1856078171017281691 https://x.com/FFmpeg/status/1856078171017281691 https://x.com/FFmpeg/status/1950227075576823817 https://x.com/FFmpeg/status/1950227075576823817 Oh, and here's one making fun of HN comments. Hi ffmpeg :) https://x.com/FFmpeg/status/1947076489880486131 https://x.com/FFmpeg/status/1947076489880486131
- dlcarrier 1y agoWeb browsers and Electron far more than make up for it, in wasted resources.
- harry8 1y agoThey run on machines that are designed to have unused computer capacity. Desktops, laptops, tablets, phones. Responsiveness is the key. Ffmpeg runs on a load of server farms for all your favourite streaming services and the bajillion more you’ve never heard of. Saving compute there saves machines and power. Your point is well taken but there is a distinction that matters some.
- kasabali 1y agoSaving compute in consumer facing devices saves machines and power, too.
- harry8 1y agoYeah power. But less so. My phone or laptop battery lasts shorter between charges. I’m not buying more phones or laptops to take up the slack. Powering the screen dominates battery usage between charges. It isn’t nothing, sure. I’m in no way defending electron. It’s just not taking back the power and machines saved by ffmpeg. Which is a happy accident that’s nice. Restart your electron hate all you want.
- kasabali 1y ago> I’m not buying more phones or laptops to take up the slack I don't know about you, but everyone else sure does. Minimum requirements (even though not told explicitly anymore) has been constantly increasing.
- harry8 1y agoNo way. Apple stopping support for security upgrades is the issue requiring a phone to stop being used, by you or the 2nd hand recipient. Same issue for the various android vendors. That sure won't change if your phone uses a little less battery decoding movies and your battery use will still be dominated by screen use.