Need help?
<- Back

Comments (160)

  • qbow883
    Days since last ffmpeg CLI wrapper: 0It's incredible what lengths people go to to avoid memorizing basic ffmpeg usage. It's really not that hard, and the (F.) manual explains the basic concepts fairly well.Now, granted, ffmpeg's defaults (reencoding by default and only keeping one stream of each type unless otherwise specified) aren't great, which can create some footguns, but as long as you remember to pass `-c copy` by default you should be fine.Also, hiding those footguns is likely to create more harm than it fixes. Case in point: "ff convert video.mkv to mp4" (an extremely common usecase) maps to `ffmpeg -i video.mkv -y video.mp4` here, which does a full reencode (losing quality and wasting time) for what can usually just be a simple remux.Similarly, "ffmpeg extract audio from video.mp4" will unconditionally reencode the audio to mp3, again losing quality. The quality settings are also hardcoded and hidden from the user.I can sympathize with ffmpeg syntax looking complicated at first glance, but the main reason for this is just that multimedia is really complicated and that some of this complexity is necessary in order to not make stupid mistakes that lose quality or waste CPU resources. I truly believe that these ffmpeg wrappers that try to make it seem overly simple (at least when it's this simple, i.e. not even exposing quality settings or differentiating between reencoding and remuxing) are more hurtful than helpful. Not only can they give worse results, but by hiding this complexity from users they also give users the wrong ideas about how multimedia works. "Abstractions" like this are exactly how beliefs like "resolution and quality are the same thing" come to be. I believe the way to go should be educating users about video formats and proper ffmpeg usage (e.g. with good cheat sheets), not by hiding complexity that really should not be hidden.Edit: Reading through my comment again, I have to apologize for the slightly facetious opening statement, even if I quality it later on. The fact that so many ffmpeg wrappers exists is saying something about its apparent difficulty, but as I argue above, a) there are reasons for this (namely, multimedia itself just being complicated), and b) I believe there are good and bad ways to "fix" this, with oversimplified wrappers being more on the "bad" side.
  • dllu
    When converting video to gif, I always use palettegen, e.g. ffmpeg -i input.mp4 -filter_complex "fps=15,scale=640:-2:flags=lanczos,split[a][b];[a]palettegen=reserve_transparent=off[p];[b][p]paletteuse=dither=sierra2_4a" -loop 0 output.gif See also: this blog post from 10 years ago [1][1] https://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
  • phil294
    I like it and would like to see an entire Linux OS being done in a similar manner. Or shell / wrapper / whatever.A sane homogeneous cli for once, that treats its user as a human instead of forcing them to remember the incompatible invocation options of `tar` and `dd` for absolutely no reason. zip my-folder into my-zip.tar with compression level 9 write my-iso ./zip.zip onto external hard drive git delete commit 1a4db4c convert ./video.mp4 and ./audio.mp3 into ./out.mp4 merge ./video.mp4 and ./audio.mp3 to ./out.mp4 without re-encoding And add amazing autocomplete, while allowing as many wordings as possible. No need for LLMs.One can dream.
  • HelloUsername
    The one good usecase I've found for AI chatbots, is writing ffmpeg commands. You can just keep chatting with it until you have the command you need. Some of them I save as an executable .command, or in my .txt note.
  • vithalreddy
    Can't access the githup repo https://github.com/josharsh/ezff
  • karmakaze
    I would definitely use an LLM, to see what the suggested options do and tweak them.Using a different package name could be helpful. I searched for ezff docs and found a completely different Python library. Also ez-ffmpeg turns up a Rust lib which looks great if calling from Rust.
  • tgsovlerkhgsel
    LLMs are a great interface for ffmpeg. Sometimes it takes 2-3 attempts/fixes ("The subtitles in the video your command generated are offset: i see the subtitles from the beginning of the movie but the video is cut from the middle of the movie as requested, fix the command") but it generally creates complex commands much more quickly than manual work (reading the man page, crafting the command, debugging it) would.
  • ramon156
    > it handles 20 common patterns ... that cover 90%Could you elaborate on this? I see a lot of AI-use and I'm wondering if this is claude speaking or you
  • btbuildem
    npm? Have we learned nothing from the weekly node/npm security breaches? Not putting that hot mess anywhere near my dev box, thanks.
  • Workaccount2
    The total upheaval of the current computing paradigm that AI will bring, if nothing else, is"Hey computer, can you convert that funny kitchen cooking scene in this movie to a .gif I can share online?"You're wasting your time on a dead man walking paradigm doing anything else. "Plain English" actually means plain English now.
  • eviks
    That's the problem ideally solved by typed data, i.e., some UI where instead of trying to memorize whether it's thumb/s/nails you can read the closed list of alternatives, read contextual help and pick one
  • low_tech_punk
    No AI is appealing but there is the cliff problem. If there is one small thing the mini language can't handle, the user would have no chance solving it themselves. They might as well start with an LLM solution first.One workaround is that when there is syntax error, let user optionally switch to LLM?
  • petterroea
    Somehow it seems ffmpeg has become the "Can it run crysis" of UX design
  • alexellisuk
    This looks handy.. along with the odd gist of "convert mkv to mp4" that I have to use every other week.Quite telling that these tools need to exist to make ffmpeg actually usable by humans (including very experienced developers).
  • gcanyon
    I can only speak to my experience, but I spent a long time being puzzled by video editor user interfaces, until I ran into ScreenFlow about ten years ago. For whatever reason, the UI clicked, and I've used it ever since. It's a single purchase, not monthly, and relatively affordable. https://www.telestream.net/screenflow/overview.htm
  • broken-kebab
    I like the idea, but a CLI utility dependent on Node.js is not a good thing frankly.
  • arjie
    I actually just use Claude code. “Stabilize the video x.mp4 and keep my daughter Astra as the subject. Convert it to a GIF that is under a megabyte”. It does a great job.It will sample images from the video then go crop the video to that, stabilize if required, and then make me an optimized GIF that I can put in my weekly journal.
  • mmahemoff
    Very cool idea since ffmpeg is one of those tools that has a few common tasks but most users would need to look up the syntax every time to implement them (or make an alias). In line with the ease of use motivation, you might consider supporting tab completion.
  • sirodoht
    Inspiring! I just asked Cursor to make llmwrap inspired by this, it's like rlwrap (readline wrap) but with LLMs!https://github.com/sirodoht/llmwrap
  • Kwpolska
    GitHub repo link returns 404.
  • spullara
    I have a little script that I use on the CLI to do this kind of stuff (calls an LLM to figure out how to do CLI stuff) but you can just as easily now use any of the coding agents.
  • ramigb
    That's beautiful! I see a .claude folder in your code, I am curious if you've "vibecoded" the whole project or just had claude there for some tasks! not that it matters or takes away from your work but just pure curiosity as someone who enjoys betting on the LLM output XD
  • anon
    undefined
  • Tempest1981
    I was surprised that macOS (QuickTime/Preview, iMovie) can't read .mp4 files. Not sure if it was due to H.265 or the audio codec. I tried using ffmpeg to convert to .mov but that also failed to open, since I guess MOV is just another container format.Is there an easier way?
  • naikrovek
    Small English nitpick:> ff slow down video.mp4 by 2xHow do you slow something down by 2x? x is a multiplier. 2 is a number greater than 1. Multiplying by a number greater than 1 makes the result LARGER.If you’re talking about “stretch movie duration to 2x”, say that instead.Saying something is 2x smaller or 2x shorter or 2x cheaper doesn’t make sense. 2x what? What is the unit of “cheap” or “short” or “small”?How much is “1 slow down”? How many “slow down” are in the movie where you want twice as many of them? Doesn’t make sense does it? So how can something be slowed by 2x? That also doesn’t make sense.I know what is trying to be said. I know what is meant. Please just say it right. Things like throw us autistic people for a freaking loop, man. This really rustles our jimmies.Language is for communicating. If we aren’t all on the same page about how to say stuff, you spend time typing and talking and writing and reading and your message doesn’t make it across the interpersonal language barrier.I don’t want to see people wasting their time trying to communicate good ideas with bad phrasing. I want people to be able to say what they mean and move on.I also don’t want to nitpick things like this, but I don’t want phrases like “slow down by 2x” to be considered normal English, either, because they aren’t.
  • nextstep
    This is very nice. When I use ffmpeg recently I usually ask an LLM first but it often takes a few tries to get the exact incantation right.On a side note (I’m not a web developer), why would a command line tool like this be written and distributed using node.js? Seems like an unnecessary risk to use JavaScript for a basic (local) command line tool. Couldn’t this be written more simply in like Rust or something?
  • vivzkestrel
    I would love to see something like this for OpenSSL
  • pdyc
    interesting approach, i solved similar problem by creating visual tool to generate ffmpeg commands but its not the same(it cant do conversion etc.)I like that you took no AI approach, i am looking for something like this i.e. understanding intent and generating command without using AI but so far regex based approaches have proved to be inadequate. I also tried indexing keywords and creating index of keywords with similar meaning that improved the situation a bit but without something heavy like bert its always a subpar experience.
  • gamer191
    Thanks, will definitely check this outHas anyone else been avoiding typing FFmpeg commands by using file:// URLs with yt-dlp
  • bdbdbdb
    Sometimes an idea comes along thats so obvious it makes me angry. I have been struggling with ffmpeg commands for over well a decade. All the time I wasted googling and creating scripts so I wouldn't have to regoogle and this could have existed literally from day one
  • justinhj
    There is no need for a wrapper or memorizing syntax in our new llm world.
  • lerp-io
    claude cli for ffmpeg is op lol
  • Joyfield
    Uhm... Millibit, Millibyte, Megabit, Megabyte?
  • dheera
    See also:https://github.com/dheera/scripts/blob/master/helpme helpme ffmpeg assemble all the .jpg files into an .mp4 timelapse video at 8fps This evolved from an ffmpeg wrapper I wrote before:https://news.ycombinator.com/item?id=40410637
  • maximgeorge
    [dead]
  • Kcnfjhggjbh
    [flagged]