Open dinedal opened 7 years ago
Was running into the following error but it was solved by providing Module['memoryInitializerPrefixURL'] = 'http://localhost:3000/'
here, https://github.com/bgrins/videoconverter.js/blob/42def8c4136b03cbe55951fbf6fcda214f51059a/demo/worker-asm.js#L25
XMLHttpRequest cannot load . Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
ffmpeg-all-codecs.js:83 Uncaught could not load memory initializer ffmpeg-all-codecs.js.mem
Why is the mem
file necessary now?
Anything left to move this forward to get a merge?
I suppose the new async nature needs to be decided on.
Why is the
mem
file necessary now?
The newer Emscripten generates it. https://kripken.github.io/emscripten-site/docs/optimizing/Optimizing-Code.html#memory-initialization
@dinedal I pulled this down and everything seems to work except png output. Can you advise what needs to change for png output to behave as expected?
For reference, the following ffmpeg command fails at /demo
:
-i input.webm -filter_complex showwavespic -frames:v 1 output.png
Output: Encoder (codec png) not found for output stream #0:0
Whereas, this command runs as expected:
-i input.webm -filter_complex showwavespic -frames:v 1 output.jpg
@bgrins Friendly ping on timeline to review/merge?
This PR fixes both the all codecs and lgpl only build paths.
I tried to keep all emscripten only configure patches to either sed or .patch files, this way it makes it a little easier to upgrade dependencies later.
I had to make a change to the JS other changes for this to work; in this version of emscripten, using -O2 somehow breaks the synchronous API in ffmpeg-pre.js and ffmpeg-post.js. You must now use an asynchronous API during conversion; by specifying
Module['returnCallback'] = function(result) { ... }
seeworker-asm.js
for a full example. If you disable the -O2, the synchronous API from before works, I can only imagine that the new emscrpiten is culling the changes in optimization now.I also upgraded libvpx to 1.6 and x264 to x264-snapshot-20160910-2245