50 ms·
> incantation FFmpeg arguments, the original prompt engineering
by Culonavirus 1y ago
> incantation
FFmpeg arguments, the original prompt engineering
- Keyframe 1y agowith gemini-cli and claude-cli you can now prompt while it prompts ffmpeg, and it does work.
- NSUserDefaults 1y agoCurious to see how quickly each LLM picks up the new codecs/options.
- baq 1y agothe canonical (if that's the right word for a 2-year-old technique) solution is to paste the whole manual into the context before asking questions
- xnx 1y agoGemini can now load context from a URL in the API (https://ai.google.dev/gemini-api/docs/url-context https://ai.google.dev/gemini-api/docs/url-context), but I'm not sure if that has made it to the web interfaces yet.
- stevejb 1y agoI use the Warp terminal and I can ask it to run —-help and it figures it out
- conradev 1y agoYeah, you can give an LLM queries like “make this smaller with libx265 and add the hvc1 tag” or “concatenate these two videos” and it usually crushes it. They have a similar level of mastery over imagemagick, too!
- turnsout 1y agoYeah, LLMs have honestly made ffmpeg usable for me, for the first time. The difficulty in constructing commands is not really ffmpeg's fault—it's just an artifact of the power of the tool and the difficulties in shoehorning that power into flags for a single CLI tool. It's just not the ideal human interface to access ffmpeg's functionality. But keeping it CLI makes it much more useful as part of a larger and often automated workflow.
- lukeschlather 1y agoIt's funny because GPU stuff like what this article is about is where the LLMs totally fall apart. I can make any LLM produce volumes hallucinations at the drop of a hat by asking it how to construct ffmpeg commands that use hardware acceleration.
- profsummergig 1y agoJust seeking a clarification on how this would be done: One would use gemini-cli (or claude-cli), - and give a natural language prompt to gemini (or claude) on what processing needs to be done, - with the correct paths to FFmpeg and the media file, - and g-cli (or c-cli) would take it from there. Is this correct?
- RedShift1 1y agoYes. It works amazingly well for ffmpeg.
- profsummergig 1y agoThank you.
- logicalmind 1y agoAnother option is to use a non-cli LLM and ask it to produce a script (bash/ps1) that uses ffmpeg to do X, Y, and Z to your video files. If using a chat LLM it will often provide suggestions or ask questions to improve your processing as well. I do this often and the results are quite good.
- jeanlucas 1y agonope, that would be handling tar balls ffmpeg right after
- porridgeraisin 1y agoPersonally I never understood the problem with tar balls. The only options you ever need are tar -x, tar -c (x for extract and c for create). tar -l if you wanna list, l for list. That's really it, -v for verbose just like every other tool if you wish. Examples: tar -c project | gzip > backup.tar.gz cat backup.tar.gz | gunzip | tar -l cat backup.tar.gz | gunzip | tar -x You never need anything else for the 99% case.
- drivers99 1y agoExcept it's tar -t to list, not -l
- porridgeraisin 1y agoWhoops, lol. Well that's unfortunate.
- sdfsdfgsdgg 1y ago> tar -l if you wanna list, l for list. Surely you mean -t if you wanna list, t for lisT. l is for check-Links. -l, --check-links (c and r modes only) Issue a warning message unless all links to each file are archived. And you don't need to uncompress separately. tar will detect the correct compression algorithm and decompress on its own. No need for that gunzip intermediate step.
- porridgeraisin 1y ago> -l Whoops, lol. > on its own Yes.. I'm aware, but that's more options, unnecessary too, just compose tools.
- 1y ago
- mrandish 1y agoI'd also include Regex in the list of dark arts incantations.
- RedShift1 1y agoI'm ok with regex, but the ffmpeg manpage, it scares me...
- quectophoton 1y agoFfmpeg was designed to be unusable if it falls into enemy hands.
- falloon 1y agoI defer understanding FFMPEG arguments to the LLMs.
- zvr 1y agoI am perfectly at home with regexp, but ffmpeg, magick, and jq are still on the list to master.
- lukeschlather 1y agoRegex is only difficult because it's complicated, the primitives are all sensibly arranged and predictable. FFmpeg is layers of dark magic where the primitives are often inscrutable before you compose them.
- agos 1y agoOT, but yours has to be the best username on this site. Props.
- bobsmooth 1y agoCulón is Spanish for big-bottomed, for anyone else wondering.