ffmpeg Merge videos removing audio Error:setsar has a unconnected output

ffmpeg Merge videos removing audio Error:setsar has a unconnected output

我正在使用下面的命令来合并删除音频的视频-

-i /storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20200501-WA0000.mp4 -i /storage/emulated/0/Download/g3cm1tt7qtd41.mp4 -filter_complex [0:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1[v0];[1:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1[v1];[0:0] [1:0] concat=n=2:v=1:a=0 /storage/emulated/0/Movies/merge_video10.mp4

但是命令失败并出现以下错误-

FAILED with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (GCC) configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags= libavutil 55. 17.103 / 55. 17.103 libavcodec 57. 24.102 / 57. 24.102 libavformat 57. 25.100 / 57. 25.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 31.100 / 6. 31.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/WhatsApp/Media/WhatsApp Video/VID-20200501-WA0000.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 #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 480x600, 737 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default) Metadata: handler_name : SoundHandler Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/g3cm1tt7qtd41.mp4': Metadata: major_brand : iso6 minor_version : 1 compatible_brands: mp42iso6avc1isom creation_time : 2020-01-30 11:13:07 Duration: 00:00:00.00, start: 0.042667, bitrate: N/A Stream #1:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480 [SAR 2136:2135 DAR 89:50], 1225 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default) Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Filter setsar has a unconnected output

您必须连接过滤后的流,而不是源流,因此请更改输入标签,即

[v0] [v1] concat=n=2:v=1:a=0

添加 -an 删除音频。