News for hackers. Stuff that matters.
Re:FFmpeg by Example by nickdothutton on Tuesday January 14, 2025 @05:07PM (#42704581)
FFmpeg is one of those tools I need to use so infrequently that he exact syntax never seems to stick. I've resorted to using an LLM to give me the command line I need. The only other tool that I ever had trouble with was 1990s-era MegaCLI from LSI Logic, also something I barely used from one year to the next (but one where you really need to get it right under pressure).
Re:FFmpeg by Example by pseudosavant on Tuesday January 14, 2025 @05:37PM (#42704916)
I've been using FFMPEG for 15+ years, and still can't remember almost any commands. LLMs have been amazing for using FFMPEG though. ChatGPT and Claude do wonders with "give me an ffmpeg command that will remux a video into mkv, include subtitle.srt in the file, and I only want it between 0:00:05 and 0:01:00." It produced this in case you were wondering: `ffmpeg -i input.mp4 -i subtitle.srt -ss 00:00:05 -to 00:01:00 -map 0 -map 1 -c copy -c:s mov_text output.mkv`

I wonder how small of an LLM you could develop if you only wanted to target creating ffmpeg commands. Perhaps it could be small enough to be hosted on a static webpage where it is run locally?

Re:FFmpeg by Example by porterde on Tuesday January 14, 2025 @05:51PM (#42705030)
Perhaps small enough to include in ffmpeg itself so you can just write commands `ffmpeg do this thing I want`.

Now I say this, it seems like there should already be a shell that is also an LLM where you can mix bits of commands you vaguely remember and natural language a bit like Del Boy speaking French...

Re:FFmpeg by Example by Alex-Programs on Tuesday January 14, 2025 @06:12PM (#42705216)
Warp terminal does that. It's cool.
Re:FFmpeg by Example by pseudosavant on Wednesday January 15, 2025 @11:51AM (#42713425)
That would be an amazingly useful feature of ffmpeg, and considering how large its dependencies are (390MB of packages for `apt install ffmpeg` on a fresh Raspberry Pi OS install), it would be reasonable to have an optional model package.
Re:FFmpeg by Example by 7jjjjjjj on Tuesday January 14, 2025 @08:05PM (#42706122)
-c:s mov_text is unnecessary and in fact might be fucking things up
Re:FFmpeg by Example by pseudosavant on Wednesday January 15, 2025 @04:58PM (#42717715)
I was kind of curious about that one too. It is encoding the SRT into the MP4/MOV subtitle format. I use it all the time when muxing subs into MP4s, but I haven't seen what happens with an MKV like that. It is very well supported in MP4s.
Re:FFmpeg by Example by escapecharacter on Tuesday January 14, 2025 @05:09PM (#42704610)
I've just maintained my own note doc, going on 15 years now, of my most commonly used syntax. When that fails, I grep my bash history.
Re:FFmpeg by Example by daveslash on Tuesday January 14, 2025 @05:08PM (#42704601)
Same. The only thing that sticks is converting from format X to .mp4. Everything else I need to look up every single time.

Relevant XKCD https://xkcd.com/1168/

Re:FFmpeg by Example by dmd on Tuesday January 14, 2025 @06:26PM (#42705353)
Yeah I commented the other day, tongue firmly in cheek, that it's probably worth burning down all the rainforests just so LLMs can tell me the right ffmpeg flags to do what I want.