Hacker News new | past | comments | ask | show | jobs | submit login

I 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.






If you want to copy/paste, try taking the first example and asking the llm to refactor the code to run in a browser with no dependencies. It should be able to strip out the react stuff, or at least get it close and you can fix it from there.

I have tried that a bunch of times and a bunch of ways and did not get ffmpeg to work.

It might have to do with these two strange comments at the top:

    // import { FFmpeg } from '@ffmpeg/ffmpeg';
    // import { fetchFile, toBlobURL } from '@ffmpeg/util';
The rest of the code seems to assume "FFmpeg", "fetchFile" and "toBlobUrl" are somehow magically available. Neither me nor any LLM have yet managed to get these into existance.

OK to your credit your original request was to get this all working in a single html file. That is not possible with the easy paths documented on ffmpeg.

By default, the build relies on web workers which need to load their code from somewhere (and usually it has to be the same origin as the code making the request)

Through much mastery of JS build systems that I would not wish on my enemies, I bet you could get it working on localhost, but you’ll have a much better time of it if you set up vite or something for a local build. You can still easily do a “serverless” deploy with GitHub pages or similar but you do need an http server correctly configured for asset requests.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: