Problema con el comando FFMPEG

Problema con el comando FFMPEG

estoy ejecutando unffmpegcomando para crear un video: los primeros 5 segundos son una introducción, el medio tiene una presentación de diapositivas de imágenes con una imagen de marca de agua superpuesta y una escena de salida de 5 segundos con audio en la parte superior de todo el video. Este proceso ha estado funcionando. Pero una vez intenté ejecutarlo y apareció el error:

Input link in2:v0 parameters (size 1282x720, SAR 1:1) do not match the corresponding output link in0:v0 parameters (1280x720, SAR 1:1)

Aquí está el comando:

ffmpeg -y -t 5.000000 \
-loop 1 -i splash.png \
-i img-1.jpg \
-i img-2.jpg \
-i img-3.jpg \
-f lavfi -i color=black:r=25:s=1280x720:d=15.000000  \
-loop 1 -i watermark.png -t 5.000000 \
-loop 1 \
-i exit.png \
-i final.mp3 \
-filter_complex \
"[0:v]fade=t=in:st=0:d=0.500000,fade=t=out:st=4.500000:d=0.500000[splash]; \
[6:v]fade=t=in:st=0:d=0.500000,fade=t=out:st=4.500000:d=0.500000[end]; \
[1:v]scale=iw*max(1280*5/iw\,720*5/ih):ih*max(1280*5/iw\,720*5/ih):flags=lanczos,crop=1280*5:720*5,zoompan=z='min(zoom+0.0005,1.1)':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':d=125,setsar=1,setdar=16/9,setpts=PTS-STARTPTS[v1]; \
[2:v]scale=iw*max(1280*5/iw\,720*5/ih):ih*max(1280*5/iw\,720*5/ih):flags=lanczos,crop=1280*5:720*5,zoompan=z='min(zoom+0.0005,1.1)':x=0:y=2880:d=125,fade=t=in:st=0:d=0.500000:alpha=1,setsar=1,setdar=16/9,setpts=PTS-STARTPTS+5.000000/TB[v2]; \
[3:v]scale=iw*max(1280*5/iw\,720*5/ih):ih*max(1280*5/iw\,720*5/ih):flags=lanczos,crop=1280*5:720*5,zoompan=z='if(lte(zoom,1.0),1.1,max(1.001,zoom-0.0005))':x='iw/2-(iw/zoom/2)':y=0:d=125,fade=t=in:st=0:d=0.500000:alpha=1,setsar=1,setdar=16/9,setpts=PTS-STARTPTS+10.000000/TB[v3]; \
[4:v][v1]overlay[over1]; \
[over1][v2]overlay[over2]; \
[over2][v3]overlay[over3]; \
[over3][5:v]overlay=shortest=1,fade=t=in:st=0:d=0.500000,fade=t=out:st=14.500000:d=0.500000[main];\
[splash][main][end]concat=n=3:v=1:a=0[v]" \
-c:v libx264 -map [v] -crf 18 -map 7:a -shortest -pix_fmt yuv420p -preset ultrafast output.mp4

Y la salida:

ffmpeg version 3.1.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.1 (Debian 5.4.1-2) 20160904
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libzimg --cc=gcc-5 --disable-ffplay
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, png_pipe, from 'splash.png':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: png, rgba(pc), 1280x720 [SAR 2835:2835 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, image2, from 'img-1.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 85822 kb/s
    Stream #1:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 2560x1704 [SAR 1:1 DAR 320:213], 25 tbr, 25 tbn, 25 tbc
Input #2, image2, from 'img-2.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 40378 kb/s
    Stream #2:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 2560x1704 [SAR 1:1 DAR 320:213], 25 tbr, 25 tbn, 25 tbc
Input #3, image2, from 'img-3.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 43527 kb/s
    Stream #3:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 2560x1708 [SAR 1:1 DAR 640:427], 25 tbr, 25 tbn, 25 tbc
Input #4, lavfi, from 'color=black:r=25:s=1280x720:d=15.000000':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #4:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Input #5, png_pipe, from 'watermark.png':
  Duration: N/A, bitrate: N/A
    Stream #5:0: Video: png, rgba(pc), 1280x720 [SAR 2835:2835 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #6, png_pipe, from 'exit.png':
  Duration: N/A, bitrate: N/A
    Stream #6:0: Video: png, rgba(pc), 1282x720 [SAR 2835:2835 DAR 641:360], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #7, mp3, from 'final.mp3':
  Metadata:
    artist          : Music 2 Hues
    album           : Vol. 23 Light Jazz
    album_artist    : Music 2 Hues
    title           : Dream River 60 Sec
    encoded_by      : iTunes v7.0.2.16
    track           : 26
    genre           : Jazz
    encoder         : Lavf57.41.100
  Duration: 00:00:25.05, start: 0.025057, bitrate: 64 kb/s
    Stream #7:0: Audio: mp3, 44100 Hz, mono, s16p, 64 kb/s
[swscaler @ 0x58a4280] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x59b9720] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x5aca920] deprecated pixel format used, make sure you did set range correctly
[Parsed_concat_30 @ 0x51d9b20] Input link in2:v0 parameters (size 1282x720, SAR 1:1) do not match the corresponding output link in0:v0 parameters (1280x720, SAR 1:1)
[Parsed_concat_30 @ 0x51d9b20] Failed to configure output pad on Parsed_concat_30
Error configuring complex filters.
Invalid argument
2016/10/17 09:29:27 exit status 1
exit status 1

Hay diferentes imágenes que se procesan usando este comando cada vez, por lo que se especifica sar/dar en el comando. Y ha funcionado para todas las imágenes que le he proporcionado hasta ahora. ¿Por qué estas imágenes arrojarían de repente este error?

Respuesta1

Tiene exit.pnguna resolución diferente (1282x720) en comparación con otras transmisiones (1280x720) y concatel filtro no puede hacer su trabajo.
puedes escalarlo para que sea igual que otros. para hacer eso, edite la segunda línea filter_complexde esta manera:
...[6:v]fade=t=in:st=0:d=0.500000,fade=t=out:st=4.500000:d=0.500000,scale=1280:720,setsar=1[end]; \ ...

información relacionada