This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const str = "FFmpeg.wasm"; | |
| const buf = Module._malloc(str.length + 1); // Allocate a memory with extra byte with value 0 to indicate the end of the string | |
| Module.writeAsciiToMemory(str, buf); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Module = require('./dist/ffmpeg-core.js'); | |
| Module.onRuntimeInitialized = () => { | |
| const ffmpeg = Module.cwrap('proxy_main', 'number', ['number', 'number']); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -x | |
| # verify Emscripten version | |
| emcc -v | |
| # configure FFMpeg with Emscripten | |
| CFLAGS="-s USE_PTHREADS -O3" | |
| LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB | |
| CONFIG_ARGS=( | |
| --target-os=none # use none to prevent any os specific configurations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <script src="./dist/ffmpeg.js"></script> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -x | |
| # verify Emscripten version | |
| emcc -v | |
| # configure FFMpeg with Emscripten | |
| CFLAGS="-s USE_PTHREADS" | |
| LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB | |
| CONFIG_ARGS=( | |
| --target-os=none # use none to prevent any os specific configurations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -x | |
| # verify Emscripten version | |
| emcc -v | |
| # configure FFMpeg with Emscripten | |
| CFLAGS="-s USE_PTHREADS" | |
| LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB | |
| ARGS=( | |
| --target-os=none # use none to prevent any os specific configurations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -x | |
| # verify Emscripten version | |
| emcc -v | |
| # configure FFMpeg with Emscripten | |
| CFLAGS="-s USE_PTHREADS" | |
| LDFLAGS="$CFLAGS" | |
| ARGS=( | |
| --target-os=none # use none to prevent any os specific configurations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -x | |
| # verify Emscripten version | |
| emcc -v | |
| # configure FFMpeg with Emscripten | |
| CFLAGS="-s USE_PTHREADS" | |
| LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB | |
| ARGS=( | |
| --target-os=none # use none to prevent any os specific configurations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -x | |
| # verify Emscripten version | |
| emcc -v | |
| # configure FFMpeg with Emscripten | |
| ARGS=( | |
| --target-os=none # use none to prevent any os specific configurations | |
| --arch=x86_32 # use x86_32 to achieve minimal architectural optimization | |
| --enable-cross-compile # enable cross compile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -x | |
| # verify Emscripten version | |
| emcc -v | |
| # configure FFMpeg with Emscripten | |
| ARGS=( | |
| --target-os=none # use none to prevent any os specific configurations | |
| --arch=x86_32 # use x86_32 to achieve minimal architectural optimization | |
| --enable-cross-compile # enable cross compile |