Remix.run Logo
shevy-java 6 hours ago

That's quite cool. I guess ffmpeg would kind of technically be a replacement for avisynth at this point.

Still, I find the syntax it uses horrible:

  ffmpeg -an -ss 12 -t 3 -i bigbuckbunny.mov -vf 'crop=iw-1, drawvg=file=progress.vgs, format=yuv420p' -c:v libvpx-vp9 output.webm
I understand that most of this comes from simplicity of use from the shell, so if you take this point of view, the above makes a lot of sense.

My poor, feeble brain, though, has a hard time deducing all of this. Yes, I can kind of know what it does to some extent ... start at 12 seconds right? during 3 seconds ... apply the specified filter in the specified format, use libvpx-vp9 as the video codec ... but the above example is somewhat simple. There are total monsters in actual use when it comes to the filter subsystem in ffmpeg. Avisynth was fairly easy on my brain; ffmpeg does not, and nobody among the ffmpeg dev team seems to think that complicated uses are an issue. I even wrote a small ruby script that expands shortcut options as above, into the corresponding long names, simply because the long names are a bit easier to remember. Even that fails when it comes to complex filters used.

It's a shame because ffmpeg is otherwise really great.

jack_pp 6 hours ago | parent [-]

Maybe it helps to view ffmpeg as a DSL and the ugliness is caused by the CLI constraints / conventions.

For what it's worth, LLMs are a great tool for both composing and understanding ffmpeg commands.

And if you want something more verbose / easier to read you can use something like https://github.com/kkroening/ffmpeg-python (with LLMs) as well

argsnd 5 hours ago | parent [-]

It looks like that project is dead, some googling turned up this one which seems active and popular

https://github.com/pyav-org/pyav

jack_pp 4 hours ago | parent [-]

They are not comparable, ffmpeg-python just abstracts away the CLI, pyav is a low level binding of the ffmpeg libs.

It may seem "dead" but ultimately it just helps you build CLI commands in a more sane way, the CLI interface to ffmpeg has been consistent for a long time. Only thing that may change is individual filters which you can just give raw to ffmpeg-python.

I remember when I was heavily using it last year I found a fork that seemingly had more sane typing or something but since LLMs last year didn't know about the newer lib but could write decent ffmpeg-python code I stuck with it and it did the job.