[HN Gopher] Show HN: LLMpeg
___________________________________________________________________
Show HN: LLMpeg
Inspired by the "ffmpeg by examples" comments, here's a simple
script that pulls it all together. Set your OpenAI API key env var
and make the script executable, and you're golden.
Author : jjcm
Score : 35 points
Date : 2025-01-15 02:29 UTC (3 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| alpb wrote:
| I'd probably use GitHub's `??` CLI or `llm-term` that already
| this without needing to install a purpose-specific tool. Do you
| provide any specific value add on top of these?
| lutherqueen wrote:
| Probably the fact that the AI has only access to the ffmpeg
| command is a value itself. Supervision is much less needed vs
| something that could hallucinate using rm -rf on the wrong
| place
| stabbles wrote:
| Did you look at the implementation? It executes arbitrary
| code
| xnx wrote:
| Reminds me of llm-jq: https://github.com/simonw/llm-jq
| scosman wrote:
| I installed warp, the LLM terminal and tried to track where it
| helped. It was crazy helpful for ffmpeg... and not much else.
| yreg wrote:
| FFmpeg is a tool that I now use purely with LLM help (and it is
| the only such tool for me). I do however want to read the
| explanation of what the AI-suggested command does and understand
| it instead of just YOLO running it like in this project.
|
| I have had the experience where GPT/LLAMA suggested parameters
| that would have produced unintended consequences and if I haven't
| read their explanation I would never know (resulting in e.g. a
| lower quality video).
|
| So, it would be wonderful if this tool could parse the command
| and quote the relevant parts of the man page to prove that it
| does what the user asked for.
| minimaxir wrote:
| The system prompt may be a bit too simple, especially when using
| gpt-4o-mini as the base LLM that doesn't adhere to prompts well.
|
| > You write ffmpeg commands based on the description from the
| user. You should only respond with a command line command for
| ffmpeg, never any additional text. All responses should be a
| single line without any line breaks.
|
| I recently tried to get Claude 3.5 Sonnet to solve an FFmpeg
| problem (write a command to output 5 equally-time-spaced frames
| from a video) with some aggressive prompt engineering and while
| it seems internally consistent, I went down a rabbit hole trying
| to figure out why it didn't output anything, as the LLMs assume
| integer frames-per-second which is definitely not the case in the
| real world!
| davmar wrote:
| i think this type of interaction is the future in lots of areas.
| i can imagine we replace API's completely with a single endpoint
| where you hit it up with a description of what you want back.
| like, hit up 'news.ycombinator.com/api' with "give me all the
| highest rated submissions over the past week about LLMs". a
| server side LLM translates that to SQL, executes the query,
| returns the results.
|
| this approach is broadly applicable to lots of domains just like
| FFMpeg. very very cool to see things moving in this direction.
| kazinator wrote:
| Parsing simple English and converting it to ffmpeg commands can
| be done without an LLM, running locally, using megabytes of RAM.
|
| Check out this AI: $ apt install cdecl [
| ... ] After this operation, 62.5 kB of additional disk
| space will be used. [ ... ] $ cdecl Type `help'
| or `?' for help cdecl> declare foo as function (pointer to
| char) returning pointer to array 4 of pointer to function
| (double) returning double double (*(*foo(char
| *))[4])(double )
|
| Granted, this one has a very rigid syntax that doesn't allow for
| variation, but it could be made more flexible.
|
| If FFMpeg's command line bugged me badly enough, I'd write
| "ffdecl".
| unleaded wrote:
| "declare foo as function (pointer to char) returning pointer to
| array 4 of pointer to function (double) returning double" i
| would not call English
___________________________________________________________________
(page generated 2025-01-18 23:00 UTC)