使用参数 'stereo:c0<c0+c2:c1<c1+c3' 初始化过滤器 'pan' 时出错
Error initializing filter 'pan' with args 'stereo:c0<c0+c2:c1<c1+c3'
我运行下面的FFmpeg命令合并音频和视频使用FFmpeg 4.0-39版本保持视频的原始音频-
-i /storage/emulated/0/Movies/extract_audio.mp3 -i /storage/emulated/0/Movies/VID-20200501-WA0000.mp4 -filter_complex [0:a][1:a]amerge,pan=stereo:c0<c0+c2:c1<c1+c3[out] -map 1:v -map [out] -c:v copy -c:a aac -shortest /storage/emulated/0/Movies/merge_video.mp4
所有视频都失败并出现以下错误!但是,使用旧版本 3.0.1 的 FFMpeg 时,相同的命令 运行 没问题!
FAILED with output : ffmpeg version n4.0-39-gda39990 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.9.x (GCC) 20150123 (prerelease)
configuration: --target-os=linux --cross-prefix=/root/bravobit/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/root/bravobit/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-ffprobe --enable-libopus --enable-libvorbis --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-libvpx --enable-libass --enable-yasm --enable-pthreads --disable-debug --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-linux-perf --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --enable-nonfree --enable-network --enable-avresample --enable-avformat --enable-avcodec --enable-indev=lavfi --enable-hwaccels --enable-ffmpeg --enable-zlib --enable-gpl --enable-small --enable-nonfree --pkg-config=pkg-config --pkg-config-flags=--static --prefix=/root/bravobit/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/root/bravobit/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/root/bravobit/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-cxxflags=
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, mp3, from '/storage/emulated/0/Movies/extract_audio.mp3.mp4':
Metadata:
major_brand : M4V
minor_version : 512
compatible_brands: isomiso2avc1
encoder : Lavf58.12.100
Duration: 00:00:20.04, start: 0.025057, bitrate: 256 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s
Metadata:
encoder : Lavc58.18
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/VID-20200501-WA0000.mp4.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:00:09.83, start: 0.000000, bitrate: 809 kb/s
Stream #1:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 480x600, 737 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
[Parsed_pan_1 @ 0xaef0c000] This syntax is deprecated. Use '|' to separate the list items ('stereo|c0<c0+c2|c1<c1+c3' instead of 'stereo:c0<c0+c2:c1<c1+c3')
[AVFilterGraph @ 0xaf117180] Error initializing filter 'pan' with args 'stereo:c0<c0+c2:c1<c1+c3'
Error initializing complex filters.
Invalid argument
新语法是pan=stereo|c0<c0+c2|c1<c1+c3
。它是由 |
分隔并由 pan
固有的解析器解析的单个参数。根据您的 shell/wrapper.
引用参数
我运行下面的FFmpeg命令合并音频和视频使用FFmpeg 4.0-39版本保持视频的原始音频-
-i /storage/emulated/0/Movies/extract_audio.mp3 -i /storage/emulated/0/Movies/VID-20200501-WA0000.mp4 -filter_complex [0:a][1:a]amerge,pan=stereo:c0<c0+c2:c1<c1+c3[out] -map 1:v -map [out] -c:v copy -c:a aac -shortest /storage/emulated/0/Movies/merge_video.mp4
所有视频都失败并出现以下错误!但是,使用旧版本 3.0.1 的 FFMpeg 时,相同的命令 运行 没问题!
FAILED with output : ffmpeg version n4.0-39-gda39990 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.9.x (GCC) 20150123 (prerelease)
configuration: --target-os=linux --cross-prefix=/root/bravobit/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/root/bravobit/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-ffprobe --enable-libopus --enable-libvorbis --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-libvpx --enable-libass --enable-yasm --enable-pthreads --disable-debug --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-linux-perf --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --enable-nonfree --enable-network --enable-avresample --enable-avformat --enable-avcodec --enable-indev=lavfi --enable-hwaccels --enable-ffmpeg --enable-zlib --enable-gpl --enable-small --enable-nonfree --pkg-config=pkg-config --pkg-config-flags=--static --prefix=/root/bravobit/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/root/bravobit/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/root/bravobit/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-cxxflags=
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, mp3, from '/storage/emulated/0/Movies/extract_audio.mp3.mp4':
Metadata:
major_brand : M4V
minor_version : 512
compatible_brands: isomiso2avc1
encoder : Lavf58.12.100
Duration: 00:00:20.04, start: 0.025057, bitrate: 256 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s
Metadata:
encoder : Lavc58.18
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/VID-20200501-WA0000.mp4.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:00:09.83, start: 0.000000, bitrate: 809 kb/s
Stream #1:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 480x600, 737 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
[Parsed_pan_1 @ 0xaef0c000] This syntax is deprecated. Use '|' to separate the list items ('stereo|c0<c0+c2|c1<c1+c3' instead of 'stereo:c0<c0+c2:c1<c1+c3')
[AVFilterGraph @ 0xaf117180] Error initializing filter 'pan' with args 'stereo:c0<c0+c2:c1<c1+c3'
Error initializing complex filters.
Invalid argument
新语法是pan=stereo|c0<c0+c2|c1<c1+c3
。它是由 |
分隔并由 pan
固有的解析器解析的单个参数。根据您的 shell/wrapper.