bgrins / videoconverter.js

[UNMAINTAINED] Convert videos in your browser
http://bgrins.github.io/videoconverter.js/
Other
2.34k stars 300 forks source link

Webassembly version #63

Open jonasof opened 7 years ago

jonasof commented 7 years ago

Resolve #43.

Depends pull request #55, currently open.

I suggest merging this at new branch like "webassembly". Some things in demo are not working well like loading message and there is too repeating .wasm parses.

Demo available at: https://jonasof.github.io/videoconverter.js-wasm-demo/

bgrins commented 7 years ago

I suggest merging this at new branch like "webassembly". Some things in demo are not working well like loading message and there is too repeating .wasm parses.

Do you have any ideas on how to improve these things?

davidturissini commented 5 years ago

@bgrins @jonasof I played around with this PR recently, and I've solved the multiple .wasm download issue. The key here is to download and compile the WASM file outside of ffmpeg_run:

Change the ffmpeg_run function signature to:

function ffmpeg_run(opts, wasmBinary) {

Then update WebAssembly.instantiate (around line 1354) to:

WebAssembly.instantiate(wasmBinary, info).then((function(instance) {
    receiveInstance(instance);
}))

Finally, in the worker that calls ffmpeg_run:

WebAssembly.compileStreaming(fetch(PATH_TO_MY_WASM_FILE))
  .then((wasmBinary) => {
    ffmpeg_run(commands, wasmBinary)
})

I will open a PR against this PR later tonight.

thijstriemstra commented 5 years ago

I will open a PR against this PR later tonight.

any news?

fotoflo commented 4 years ago

Hello, what's the status of this PR? Is it production ready software? Should it branch into it's own project? Thanks.

fabyeah commented 4 years ago

I'm also wondering about the status of this. Would really love to use it.