我有一个安装了High Sierra v10.13的虚拟机
RenderTune-mac.dmg
从我的
RenderTune releases page
,然后我从下载2个音频文件和图像
this link
. 我打开RenderOne,并尝试渲染视频。我将音频文件合并为单个mp3的命令运行良好,但当我尝试将该mp3与图像文件合并时,我与electron应用程序打包的ffmpeg版本失败,出现以下错误:
Command was killed with SIGABRT (Aborted): /Applications/RenderTune.app/Contents/Resources/ffmpeg -loop 1 -framerate 2 -i /Users/martin/Downloads/R-3777978-1344032418-8379.jpeg.jpg -i /Users/martin/Downloads/output-871140.mp3 -y -acodec copy -b:a 320k -vcodec libx264 -b:v 8000k -maxrate 8000k -minrate 8000k -bufsize 3M -filter:v scale=w=1920:h=1954 -preset medium -tune stillimage -crf 18 -pix_fmt yuv420p -shortest /Users/martin/Downloads/concatVideo-871140.mp4
ffmpeg version git-2021-03-24-13335df Copyright (c) 2000-2021 the FFmpeg developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --pkgconfigdir=/Users/martinbarker/Documents/projects/rendertune-0.5.0/workspace/lib/pkgconfig --prefix=/Users/martinbarker/Documents/projects/rendertune-0.5.0/workspace --pkg-config-flags=--static --extra-cflags='-I/Users/martinbarker/Documents/projects/rendertune-0.5.0/workspace/include -mmacosx-version-min=10.10' --extra-ldflags='-L/Users/martinbarker/Documents/projects/rendertune-0.5.0/workspace/lib -mmacosx-version-min=10.10' --extra-libs='-lpthread -lm' --enable-static --disable-securetransport --disable-debug --disable-shared --disable-ffplay --disable-lzma --disable-doc --enable-version3 --enable-pthreads --enable-runtime-cpudetect --enable-avfilter --enable-filters --disable-libxcb --enable-gpl --enable-nonfree --disable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libx264
libavutil 56. 66.100 / 56. 66.100
libavcodec 58.128.100 / 58.128.100
libavformat 58. 69.100 / 58. 69.100
libavdevice 58. 12.100 / 58. 12.100
libavfilter 7.107.100 / 7.107.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, image2, from '/Users/martin/Downloads/R-3777978-1344032418-8379.jpeg.jpg':
Duration: 00:00:00.50, start: 0.000000, bitrate: 1758 kb/s
Stream #0:0: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 590x600 [SAR 1:1 DAR 59:60], 2 fps, 2 tbr, 2 tbn, 2 tbc
Input #1, mp3, from '/Users/martin/Downloads/output-871140.mp3':
Metadata:
title : My Little Grass Shack
album : Our Hawaii - A Collection Of Personal Favorites
artist : Society Of Seven
track : 11
encoder : Lavf58.69.100
Duration: 00:06:25.59, start: 0.025057, bitrate: 320 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.12
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[swscaler @ 0x7fbad9167600] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x7fbad9040400] using SAR=2681/2679
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
Referenced from: /Applications/RenderTune.app/Contents/Resources/ffmpeg
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ____chkstk_darwin
Referenced from: /Applications/RenderTune.app/Contents/Resources/ffmpeg
Expected in: /usr/lib/libSystem.B.dylib
at makeError (/Applications/Renderâ¦eca/lib/error.js:59)
at handlePromise (/Applications/Renderâ¦/execa/index.js:114)
at async file:/Applicatâ¦js/newindex.js:1323
这些文件在windows/linux和最新mac版本上可以很好地渲染。为了在mac电脑上的electron应用程序中打包ffmpeg,我必须构建一个没有动态链接库的自定义沙盒版本。我有一个.sh文件,可以自动下载ffmpeg,并为mac电脑构建所有必要的标志。
https://github.com/MartinBarker/RenderTune/blob/master/buildffmpeg.sh
./configure \
--pkgconfigdir="$WORKSPACE/lib/pkgconfig" \
--prefix=${WORKSPACE} \
--pkg-config-flags="--static" \
--extra-cflags="-I$WORKSPACE/include -mmacosx-version-min=${MACOS_MIN}" \
--extra-ldflags="-L$WORKSPACE/lib -mmacosx-version-min=${MACOS_MIN}" \
--extra-libs="-lpthread -lm" \
--enable-static \
--disable-securetransport \
--disable-debug \
--disable-shared \
--disable-ffplay \
--disable-lzma \
--disable-doc \
--enable-version3 \
--enable-pthreads \
--enable-runtime-cpudetect \
--enable-avfilter \
--enable-filters \
--disable-libxcb \
--enable-gpl \
--enable-nonfree \
--disable-libass \
--enable-libfdk-aac \
--enable-libmp3lame \
--enable-libx264
如果我尝试在High Sierra VM中运行此脚本,它将失败,并显示以下消息:
Unknown option "-extra-libs=-lpthread"
Unknown option "--enable-static"
我需要这个标志才能在mac apple store上发布我的electron应用程序,
有谁能帮我编译一个ffmpeg的静态版本,它既可以在High Sierra 10.13等旧版本上工作,也可以在现代mac os系统上工作?