Live data from Hacker News

Show HN: LLMpeg

github.com

1–10 of 83 posts

Show HN: LLMpeg

#1
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.

Show HN: LLMpeg
github.com

Re: Show HN: LLMpeg

#2
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?

Re: Show HN: LLMpeg

#4
post #2

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?

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

Re: Show HN: LLMpeg

#6
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.

Re: Show HN: LLMpeg

#7
post #2

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?

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

Did you look at the implementation? It executes arbitrary code

Re: Show HN: LLMpeg

#8
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!

Re: Show HN: LLMpeg

#9
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.

Re: Show HN: LLMpeg

#10
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".

Post reply on HN