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
4c5b5c51
Commit
4c5b5c51
authored
Sep 25, 2020
by
Jerome Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ffmpeg mp4 scale only build script
parent
96f478ae
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
29 deletions
+58
-29
build-ffmpeg.sh
wasm/build-scripts/build-ffmpeg.sh
+1
-0
configure-ffmpeg.mp4-scale.sh
wasm/build-scripts/configure-ffmpeg.mp4-scale.sh
+24
-0
configure-ffmpeg.sh
wasm/build-scripts/configure-ffmpeg.sh
+1
-26
var.sh
wasm/build-scripts/var.sh
+32
-3
No files found.
wasm/build-scripts/build-ffmpeg.sh
View file @
4c5b5c51
...
@@ -16,6 +16,7 @@ FLAGS=(
...
@@ -16,6 +16,7 @@ FLAGS=(
-s
USE_PTHREADS
=
1
# enable pthreads support
-s
USE_PTHREADS
=
1
# enable pthreads support
-s
PROXY_TO_PTHREAD
=
1
# detach main() from browser/UI main thread
-s
PROXY_TO_PTHREAD
=
1
# detach main() from browser/UI main thread
-s
INVOKE_RUN
=
0
# not to run the main() in the beginning
-s
INVOKE_RUN
=
0
# not to run the main() in the beginning
-s
EXIT_RUNTIME
=
1
# exit runtime after execution
-s
MODULARIZE
=
1
# use modularized version to be more flexible
-s
MODULARIZE
=
1
# use modularized version to be more flexible
-s
EXPORT_NAME
=
"createFFmpegCore"
# assign export name for browser
-s
EXPORT_NAME
=
"createFFmpegCore"
# assign export name for browser
-s
EXPORTED_FUNCTIONS
=
"[_main, _proxy_main]"
# export main and proxy_main funcs
-s
EXPORTED_FUNCTIONS
=
"[_main, _proxy_main]"
# export main and proxy_main funcs
...
...
wasm/build-scripts/configure-ffmpeg.mp4-scale.sh
0 → 100755
View file @
4c5b5c51
#!/bin/bash
set
-euo
pipefail
source
$(
dirname
$0
)
/var.sh
FLAGS
=(
"
${
FFMPEG_CONFIG_FLAGS_BASE
[@]
}
"
--disable-all
--enable-avcodec
--enable-avformat
--enable-avfilter
--enable-swresample
--enable-swscale
--enable-decoder
=
h264
--enable-encoder
=
rawvideo,libx264
--enable-parser
=
h264
--enable-protocol
=
file
--enable-demuxer
=
mov
--enable-muxer
=
rawvideo,mp4
--enable-filter
=
scale,format
)
echo
"FFMPEG_CONFIG_FLAGS=
${
FLAGS
[@]
}
"
emconfigure ./configure
"
${
FLAGS
[@]
}
"
wasm/build-scripts/configure-ffmpeg.sh
View file @
4c5b5c51
...
@@ -3,33 +3,8 @@
...
@@ -3,33 +3,8 @@
set
-euo
pipefail
set
-euo
pipefail
source
$(
dirname
$0
)
/var.sh
source
$(
dirname
$0
)
/var.sh
CFLAGS
=
"-s USE_PTHREADS=1 -I
$BUILD_DIR
/include
$OPTIM_FLAGS
"
LDFLAGS
=
"
$CFLAGS
-L
$BUILD_DIR
/lib"
FLAGS
=(
FLAGS
=(
--target-os
=
none
# use none to prevent any os specific configurations
"
${
FFMPEG_CONFIG_FLAGS_BASE
[@]
}
"
--arch
=
x86_32
# use x86_32 to achieve minimal architectural optimization
--enable-cross-compile
# enable cross compile
--disable-x86asm
# disable x86 asm
--disable-inline-asm
# disable inline asm
--disable-stripping
# disable stripping
--disable-programs
# disable programs build (incl. ffplay, ffprobe & ffmpeg)
--disable-doc
# disable doc
--enable-gpl
# required by x264
--enable-libx264
# enable x264
--disable-debug
# disable debug info, required by closure
--disable-runtime-cpudetect
# disable runtime cpu detect
--disable-autodetect
# disable external libraries auto detect
--extra-cflags
=
"
$CFLAGS
"
--extra-cxxflags
=
"
$CFLAGS
"
--extra-ldflags
=
"
$LDFLAGS
"
--nm
=
"llvm-nm -g"
--ar
=
emar
--as
=
llvm-as
--ranlib
=
emranlib
--cc
=
emcc
--cxx
=
em++
--objcc
=
emcc
--dep-cc
=
emcc
)
)
echo
"FFMPEG_CONFIG_FLAGS=
${
FLAGS
[@]
}
"
echo
"FFMPEG_CONFIG_FLAGS=
${
FLAGS
[@]
}
"
emconfigure ./configure
"
${
FLAGS
[@]
}
"
emconfigure ./configure
"
${
FLAGS
[@]
}
"
wasm/build-scripts/var.sh
View file @
4c5b5c51
...
@@ -10,9 +10,6 @@ OPTIM_FLAGS=(
...
@@ -10,9 +10,6 @@ OPTIM_FLAGS=(
-O3
-O3
)
)
# Directory to install headers and libraries
BUILD_DIR
=
$PWD
/build
if
[[
"
$OSTYPE
"
==
"linux-gnu"
*
]]
;
then
if
[[
"
$OSTYPE
"
==
"linux-gnu"
*
]]
;
then
# Use closure complier only in linux environment
# Use closure complier only in linux environment
OPTIM_FLAGS
=(
OPTIM_FLAGS
=(
...
@@ -24,5 +21,37 @@ fi
...
@@ -24,5 +21,37 @@ fi
# Convert array to string
# Convert array to string
OPTIM_FLAGS
=
"
${
OPTIM_FLAGS
[@]
}
"
OPTIM_FLAGS
=
"
${
OPTIM_FLAGS
[@]
}
"
# Directory to install headers and libraries
BUILD_DIR
=
$PWD
/build
CFLAGS
=
"-s USE_PTHREADS=1 -I
$BUILD_DIR
/include
$OPTIM_FLAGS
"
LDFLAGS
=
"
$CFLAGS
-L
$BUILD_DIR
/lib"
FFMPEG_CONFIG_FLAGS_BASE
=(
--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
--disable-x86asm
# disable x86 asm
--disable-inline-asm
# disable inline asm
--disable-stripping
# disable stripping
--disable-programs
# disable programs build (incl. ffplay, ffprobe & ffmpeg)
--disable-doc
# disable doc
--enable-gpl
# required by x264
--enable-libx264
# enable x264
--disable-debug
# disable debug info, required by closure
--disable-runtime-cpudetect
# disable runtime cpu detect
--disable-autodetect
# disable external libraries auto detect
--extra-cflags
=
"
$CFLAGS
"
--extra-cxxflags
=
"
$CFLAGS
"
--extra-ldflags
=
"
$LDFLAGS
"
--nm
=
"llvm-nm -g"
--ar
=
emar
--as
=
llvm-as
--ranlib
=
emranlib
--cc
=
emcc
--cxx
=
em++
--objcc
=
emcc
--dep-cc
=
emcc
)
echo
"OPTIM_FLAGS=
$OPTIM_FLAGS
"
echo
"OPTIM_FLAGS=
$OPTIM_FLAGS
"
echo
"BUILD_DIR=
$BUILD_DIR
"
echo
"BUILD_DIR=
$BUILD_DIR
"
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