Hacker News new | ask | show | jobs
by CyberDildonics 664 days ago
So pipes are the only way to do it

Lets not get carried away. You can use ffmpeg as a library and encode buffers in a few dozen lines of C++.

3 comments

The parent comment mentioned license incompatibility, which I guess would still apply if they used ffmpeg as a library.
If the license is incompatible, it would still be incompatible regardless of whether you use library API calls or pipes.
And you go from having a well defined modular interface that’s flexible at runtime to a binary dependency.
You have the dependency either way, but if you use the library you can have one big executable with no external dependencies and it can actually be fast.

If there wasn't a problem to solve they wouldn't have said anything. If you want something different you have to do something different.

The context of this discussion is that it would be better if pipes were faster. Then you would have more options.
I replied to them saying "So pipes are the only way to do it".
ffmpeg's library is notorious for being a complete and utter mess
It worked extremely well when I did something almost exactly like this. I gave it buffers of pixels in memory and it spit out compressed video.