Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
acd70a80
Commit
acd70a80
authored
Oct 29, 2020
by
Jerome Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add WavPack build scripts
parent
64d3e62f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
4 deletions
+61
-4
main.yml
.github/workflows/main.yml
+4
-1
README.md
README.md
+11
-2
build.sh
build.sh
+4
-0
build-ffmpeg.sh
wasm/build-scripts/build-ffmpeg.sh
+1
-1
build-wavpack.sh
wasm/build-scripts/build-wavpack.sh
+22
-0
install-deps.sh
wasm/build-scripts/install-deps.sh
+18
-0
var.sh
wasm/build-scripts/var.sh
+1
-0
No files found.
.github/workflows/main.yml
View file @
acd70a80
...
@@ -8,7 +8,7 @@ on:
...
@@ -8,7 +8,7 @@ on:
branches
:
[
n4.3.1-wasm
]
branches
:
[
n4.3.1-wasm
]
env
:
env
:
EM_VERSION
:
1.39.1
8
EM_VERSION
:
2.0.
8
EM_CACHE_FOLDER
:
'
emsdk-cache'
EM_CACHE_FOLDER
:
'
emsdk-cache'
jobs
:
jobs
:
...
@@ -22,6 +22,9 @@ jobs:
...
@@ -22,6 +22,9 @@ jobs:
shell
:
bash
shell
:
bash
run
:
|
run
:
|
bash build-with-docker.sh
bash build-with-docker.sh
-
name
:
Run Tests
run
:
|
cd wasm && npm install && npm test
-
uses
:
actions/upload-artifact@master
-
uses
:
actions/upload-artifact@master
with
:
with
:
name
:
ffmpeg-core-linux
name
:
ffmpeg-core-linux
...
...
README.md
View file @
acd70a80
...
@@ -26,7 +26,16 @@ If nothing goes wrong, you can find JavaScript files in `wasm/dist`.
...
@@ -26,7 +26,16 @@ If nothing goes wrong, you can find JavaScript files in `wasm/dist`.
## Configuration
## Configuration
#### Base
-
Emscripten: 2.0.8
-
Emscripten: 2.0.8
-
FFmpeg: 4.3.1
-
FFmpeg: 4.3.1
-
x264: 0.160.x
-
libvpx: 1.9.0
#### Video
-
x264 (mp4): 0.160.x
-
libvpx (webm): 1.9.0
#### Audio
-
wavpack (wav): 5.3.0
build.sh
View file @
acd70a80
...
@@ -6,12 +6,16 @@ SCRIPT_ROOT=$(dirname $0)/wasm/build-scripts
...
@@ -6,12 +6,16 @@ SCRIPT_ROOT=$(dirname $0)/wasm/build-scripts
# verify Emscripten version
# verify Emscripten version
emcc
-v
emcc
-v
# install dependencies
$SCRIPT_ROOT
/install-deps.sh
# build x264
# build x264
$SCRIPT_ROOT
/build-x264.sh
$SCRIPT_ROOT
/build-x264.sh
# build x265 (WIP)
# build x265 (WIP)
# $SCRIPT_ROOT/build-x265.sh
# $SCRIPT_ROOT/build-x265.sh
# build libvpx
# build libvpx
$SCRIPT_ROOT
/build-libvpx.sh
$SCRIPT_ROOT
/build-libvpx.sh
# build WavPack
$SCRIPT_ROOT
/build-wavpack.sh
# configure FFmpeg with Emscripten
# configure FFmpeg with Emscripten
$SCRIPT_ROOT
/configure-ffmpeg.sh
$SCRIPT_ROOT
/configure-ffmpeg.sh
# build ffmpeg.wasm core
# build ffmpeg.wasm core
...
...
wasm/build-scripts/build-ffmpeg.sh
View file @
acd70a80
...
@@ -9,7 +9,7 @@ FLAGS=(
...
@@ -9,7 +9,7 @@ FLAGS=(
-I
.
-I
./fftools
-I
$BUILD_DIR
/include
-I
.
-I
./fftools
-I
$BUILD_DIR
/include
-Llibavcodec
-Llibavdevice
-Llibavfilter
-Llibavformat
-Llibavresample
-Llibavutil
-Llibpostproc
-Llibswscale
-Llibswresample
-L
$BUILD_DIR
/lib
-Llibavcodec
-Llibavdevice
-Llibavfilter
-Llibavformat
-Llibavresample
-Llibavutil
-Llibpostproc
-Llibswscale
-Llibswresample
-L
$BUILD_DIR
/lib
-Wno-deprecated-declarations
-Wno-pointer-sign
-Wno-implicit-int-float-conversion
-Wno-switch
-Wno-parentheses
-Qunused-arguments
-Wno-deprecated-declarations
-Wno-pointer-sign
-Wno-implicit-int-float-conversion
-Wno-switch
-Wno-parentheses
-Qunused-arguments
-lavdevice
-lavfilter
-lavformat
-lavcodec
-lswresample
-lswscale
-lavutil
-lpostproc
-lm
-lx264
-lvpx
-pthread
-lavdevice
-lavfilter
-lavformat
-lavcodec
-lswresample
-lswscale
-lavutil
-lpostproc
-lm
-lx264
-lvpx
-
lwavpack
-
pthread
fftools/ffmpeg_opt.c fftools/ffmpeg_filter.c fftools/ffmpeg_hw.c fftools/cmdutils.c fftools/ffmpeg.c
fftools/ffmpeg_opt.c fftools/ffmpeg_filter.c fftools/ffmpeg_hw.c fftools/cmdutils.c fftools/ffmpeg.c
-o
wasm/dist/ffmpeg-core.js
-o
wasm/dist/ffmpeg-core.js
-s
USE_SDL
=
2
# use SDL2
-s
USE_SDL
=
2
# use SDL2
...
...
wasm/build-scripts/build-wavpack.sh
0 → 100755
View file @
acd70a80
#!/bin/bash
set
-euo
pipefail
source
$(
dirname
$0
)
/var.sh
LIB_PATH
=
third_party/WavPack
FLAGS
=
"-s USE_PTHREADS=1
$OPTIM_FLAGS
"
CONF_FLAGS
=(
--prefix
=
$BUILD_DIR
# install library in a build directory for FFmpeg to include
--host
=
x86-linux-gnu
--disable-asm
# disable asm optimization
--disable-man
--disable-tests
--disable-apps
--disable-dsd
--enable-legacy
--disable-shared
# enable building static library
)
echo
"CONF_FLAGS=
${
CONF_FLAGS
[@]
}
"
(
cd
$LIB_PATH
&&
CFLAGS
=
$FLAGS
emconfigure ./autogen.sh
"
${
CONF_FLAGS
[@]
}
"
)
emmake make
-C
$LIB_PATH
clean
emmake make
-C
$LIB_PATH
install
-j
wasm/build-scripts/install-deps.sh
0 → 100755
View file @
acd70a80
#!/bin/bash
missingCmds
=()
for
cmd
in
autoconf libtool
do
if
!
command
-v
$cmd
&> /dev/null
then
missingCmds+
=(
"
$cmd
"
)
fi
done
if
[
${#
missingCmds
[@]
}
-ne
0
]
;
then
echo
"Install missing dependencies"
apt-get update
apt-get
install
-y
${
missingCmds
[@]
}
fi
wasm/build-scripts/var.sh
View file @
acd70a80
...
@@ -44,6 +44,7 @@ FFMPEG_CONFIG_FLAGS_BASE=(
...
@@ -44,6 +44,7 @@ FFMPEG_CONFIG_FLAGS_BASE=(
--enable-gpl
# required by x264
--enable-gpl
# required by x264
--enable-libx264
# enable x264
--enable-libx264
# enable x264
--enable-libvpx
# enable libvpx / webm
--enable-libvpx
# enable libvpx / webm
--enable-libwavpack
# enable libwavpack
--disable-debug
# disable debug info, required by closure
--disable-debug
# disable debug info, required by closure
--disable-runtime-cpudetect
# disable runtime cpu detect
--disable-runtime-cpudetect
# disable runtime cpu detect
--disable-autodetect
# disable external libraries auto detect
--disable-autodetect
# disable external libraries auto detect
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment