Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

814.ffmpeg.js:1 Uncaught SyntaxError: Unexpected token '<' (at 814.ffmpeg.js:1:1) #583

Unanswered
stoplion asked this question in Q&A
Discussion options

I'm following this pattern. https://github.com/ffmpegwasm/ffmpeg.wasm/blob/main/apps/react-vite-app/src/App.tsx
And getting the above error whenever I try to load this library.

 const loadFFMpeg = async () => {
 // TRIED UMD AND ESM, BOTH BOMB
 // const baseURL = 'https://unpkg.com/@ffmpeg/core@0.12.2/dist/umd';
 const baseURL = "https://unpkg.com/@ffmpeg/core-mt@0.12.2/dist/esm";
 const ffmpeg = ffmpegRef.current;
 ffmpeg.on('log', ({ message }) => {
 console.log({message});
 });
 // BOMBS OUT HERE
 await ffmpeg.load({
 coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, 'text/javascript'),
 wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, 'application/wasm'),
 });
 setLoaded(true);
 }
You must be logged in to vote

Replies: 3 comments

Comment options

I'm getting the same error too.

You must be logged in to vote
0 replies
Comment options

Same root cause as issues #594, #548, etc... will be fixed when pull request #562 is implemented. For now here are 3 options:

You must be logged in to vote
0 replies
Comment options

same issue on me with webpack 4 project.
I also tried to solve this problem by directly downloading and hosting the core files and wasm files, but it didn't work properly.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /