5 ms·
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 si
by MrThoughtful 1y 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.
- simlevesque 1y agoDon't try to do cutting edge stuff with a brain that doesn't know anything past a certian date.
- minimaxir 1y agoThe JS ports of FFmpeg (or WASM port if you want the in-browser approach) are very old and would be more than present in modern LLM training datasets, albeit likely not enough of a proportion for LLMs to understand it well. https://github.com/Kagami/ffmpeg.js/ https://github.com/Kagami/ffmpeg.js/ https://github.com/ffmpegwasm/ffmpeg.wasm https://github.com/ffmpegwasm/ffmpeg.wasm
- colechristensen 1y agoTrying 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.
- bigfishrunning 1y ago> I'm convinced that programmers' bias towards LLMs is strongly correlated with the weirdness of their work. This is an extremely astute observation; my work has always been somewhat weird and I've never found LLMs to be more then an interesting party-trick
- ch_sm 1y agoif 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.
- deleted 1y ago[deleted]
- bastawhiz 1y agoIf 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 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 1y agoThe 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.
- Matheus28 1y agoYou don’t need an LLM to do that. The code in there is almost complete…
- vel0city 1y agoListen buddy, I need an LLM to tie my shoes, don't be so judgemental.
- bastawhiz 1y agoThat's just wrong. The example is live: you can run it right there on the page. If the code isn't working when you write it, you're probably importing something incorrectly (or you're not running it in an environment with React, which is where the `use*` functions come from). You can even click on the source of the log lines when the example is running (on the right edge of the Chrome console) to jump into the hot-loaded code and see the exact code that's running it.
- MrThoughtful 1y agoI think there is some kind of misunderstanding here. You say "an environment with React". My environment is the browser. I don't know how one is supposed to run that nameless function on that page. What I am looking for is a simple, complete example in HTML that can run standalone when opened in the browser. Without any server side processing involved.
- prophesi 1y agoEntered 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 1y agoCan you put it on jsfiddle or some other codebin? I would love to see it.
- jsheard 1y agoI'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 1y agoTime 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.
- bastawhiz 1y agoI can't disagree with this take more vehemently. This isn't an "easy PoC". This is "copy and paste it from the docs"-level effort: https://ffmpegwasm.netlify.app/docs/getting-started/usage/ https://ffmpegwasm.netlify.app/docs/getting-started/usage/ If you can't be arsed to google the library and read the Usage page and run the _one command_ on the Installation page to come up with a working example (or: tweak the single line of the sample code in the live editor in the docs to do what you want it to do), how do you expect to do anything beyond "an easy PoC"? At what point does your inability/unwillingness to do single-digit-minutes of effort to explore an idea really just mean you aren't the right person for the job? Hell, even just pasting the code sample into the LLM and asking it to change it for you would get you to the right answer.
- MrThoughtful 1y agoIf there is a "copy and paste" way to get that to run in the browser, can you copy and paste it to a jsfiddle and post the link to the fiddle here?
- Matheus28 1y agoYou’re basically asking people to do your homework for you at this point…
- rvz 1y 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.
- mort96 1y agoYou know there's ... documentation, right?
- ycombinatrix 1y agoLLM is my eyes. LLM is my ears. LLM is my documentation. I am LLM.