Hacker News new | ask | show | jobs
by streaming 74 days ago
FFMPEG is a media processing framework. Of course, it is normally built with the many encoders, decoders and filters that do the actual media processing work. Those components are separate open source projects. The performance critical part of FFMPEG is in the component encoders, decoders and filters, not the framework that sets up the media processing graph, gets it running and monitors it. It could be useful or interesting to have a Rust port of FFMPEG (for developers who might want to contribute new features). I wouldn't bother trying to port component encoders, decoders or filters from C to Rust. There is no need, and no benefit. They are mostly older and stable. Rust will never be faster than C, even if you link all the hand-optimized assembly code. The challenge of maintaining a Rust fork of FFMPEG will be to stay current with changes to FFMPEG. LLMs are very good at converting from one language to another, so it might be feasible, especially if you can automate it. But I would definitely stick to using Rust only for the top layer of FFMPEG.
1 comments

I don’t really think there’s any actual benefit to `wedeo` existing, beyond the novelty of having pure Rust media processing software and perhaps being easier to use as a library. Like I said, this is mostly an experiment in LLM’s ability to rewrite software in Rust. FFmpeg is one of the most high quality pieces of open source software out there, I seriously doubt that LLMs on their own could eclipse it, even with all of Rust’s benefits. So I definitely understand what you’re saying but it’s not really my motivation.

As for the updating, this is something that I’ve been considering but it’s obviously not in scope until `wedeo` is fully featured. But yes, this is something that LLMs should be able to do quite easily, it could even trigger on every commit.

The benefit is that you and other Rust developers could potentially implement improvements to FFMPEG. Again, if you stick to porting only the top layer of FFMPEG - the media processing framework with the CLI - you can still keep the rest as C and link it all together in a build. Your Rust version (and any improvements implemented by other Rust developers who contribute to wedeo) can easily be converted back to C so that patches could be offered back upstream to the main FFMPEG project.