top | item 44182546

(no title)

MrThoughtful | 9 months ago

I know there are JavaScript ports of FFmpeg and I would love to use them. But so far, I never got it working. I tried it with AI and this prompt:

    Make a simple example of speeding up an mp4
    video in the browser using a version of ffmpeg
    that runs in the browser. Don't use any server
    side tech like node. Make it a single html file.
But so far every LLM I tried failed to come up with a working solution.

discuss

order

bastawhiz|9 months ago

If you visit the ffmpeg.wasm documentation, the first example on the Usage page does almost exactly this:

https://ffmpegwasm.netlify.app/docs/getting-started/usage

It transcodes a webm file to MP4, but making it speed up the video is trivial: just add arguments to `ffmpeg.exec()`. Your lack of success in this task is trusting an LLM to know about cutting-edge libraries and how to use them, not a lack of progress in the area.

MrThoughtful|9 months ago

The problem is that they don't provide the full code that can run in the browser. I have not managed to get the function they show in the first example to run in the browser.

simlevesque|9 months ago

Don't try to do cutting edge stuff with a brain that doesn't know anything past a certian date.

colechristensen|9 months ago

Trying to do things off the beaten path with LLMs is rarely successful, especially if there's a related much more popular option.

I'm convinced that programmers' bias towards LLMs is strongly correlated with the weirdness of their work. Very often my strange ideas pushed to LLMs look like solutions but are rather broken and hallucinated attempts which only vaguely represent what needs to be done.

rvz|9 months ago

> But so far every LLM I tried failed to come up with a working solution.

Maybe you need to actually learn how it works instead of deferring to LLMs that have no understanding of what you are specifically requesting.

Just read the fine documentation.

prophesi|9 months ago

Entered the same prompt with Sonnet 4. Just needed to paste the two errors in the console (trying to load the CDN which won't work since it uses a web worker, and hallucinated an ffmpegWasm function) and it output an HTML file that worked.

MrThoughtful|9 months ago

Can you put it on jsfiddle or some other codebin? I would love to see it.

jsheard|9 months ago

I'm sorry, but if you give up on something you would "love to use" just because LLMs are unable to oneshot it then you might be a bit too dependent on AI.

minimaxir|9 months ago

Time is a finite resource, and there's an opportunity cost. If an easy PoC for a complex project can't be created using AI and it would take hours/days to create a PoC organically that may not even be useful, it's better project management to just do something else entirely if it's not part of a critical path.

ch_sm|9 months ago

if you‘re really interested in doing that, i‘m certain you can with a bit of effort. There are plenty of docs and examples online.

mort96|9 months ago

You know there's ... documentation, right?

ycombinatrix|9 months ago

LLM is my eyes. LLM is my ears. LLM is my documentation. I am LLM.