Filter has an unconnected output

user4051844 picture user4051844 · Nov 16, 2017 · Viewed 13.2k times · Source

I am using FFMPEG to merch 2 videos together with a fade effect in between. The console output shows the following error:

Filter setpts has an unconnected output

I have looked up what could be wrong, but can't find anything related to my error that helps me out.

ffmpeg -i ./temp/1900f421192fcdaf.ts -i ./temp/35c16f3debf9e730.ts -an \
    -filter_complex \
    [0:v]trim=start=0:end=9,setpts=PTS-STARTPTS[firstclip];\
    [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip];\
    [0:v]trim=start=9:end=10,setpts=PTS-STARTPTS[fadeoutsrc];\
    [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc];\
    [fadeinsrc]format=pix_fmts=yuva420p,fade=t=in:st=0:d=1:alpha=1[fadein];\
    [fadeoutsrc]format=pix_fmts=yuva420p,fade=t=out:st=0:d=1:alpha=1[fadeout];\
    [fadein]fifo[fadeinfifo];\
    [fadeout]fifo[fadeoutfifo];\
    [fadeoutfifo][fadeinfifo]overlay[crossfade];\
    [firstclip][crossfade][secondclip]concat=n=3[output]\
-map ./rendered/2017-11-16_11:59:41.mp4

Thank you in advance for helping me out.

Edit// Console output:

[root@webcasting2 videocuttool]# ffmpeg -i ./temp/1900f421192fcdaf.ts -i ./temp/35c16f3debf9e730.ts -an \
>     -filter_complex \
>     [0:v]trim=start=0:end=9,setpts=PTS-STARTPTS[firstclip];\
>     [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip];\
>     [0:v]trim=start=9:end=10,setpts=PTS-STARTPTS[fadeoutsrc];\
>     [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc];\
>     [fadeinsrc]format=pix_fmts=yuva420p,fade=t=in:st=0:d=1:alpha=1[fadein];\
>     [fadeoutsrc]format=pix_fmts=yuva420p,fade=t=out:st=0:d=1:alpha=1[fadeout];\
>     [fadein]fifo[fadeinfifo];\
>     [fadeout]fifo[fadeoutfifo];\
>     [fadeoutfifo][fadeinfifo]overlay[crossfade];\
>     [firstclip][crossfade][secondclip]concat=n=3[output]\
> -map ./rendered/2017-11-16_11:59:41.mp4
ffmpeg version 3.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.4.0 (Debian 6.4.0-7) 20170920
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Trailing options were found on the commandline.
Input #0, mpegts, from './temp/1900f421192fcdaf.ts':
  Duration: 00:00:10.02, start: 1.419856, bitrate: 3291 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 640x360 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
    Stream #0:1[0x101](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 22050 Hz, stereo, s16p, 160 kb/s
Input #1, mpegts, from './temp/35c16f3debf9e730.ts':
  Duration: 00:00:10.02, start: 1.419856, bitrate: 3291 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #1:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 640x360 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
    Stream #1:1[0x101](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 22050 Hz, stereo, s16p, 160 kb/s
Filter setpts has an unconnected output
-bash: [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]: opdracht niet gevonden
-bash: [0:v]trim=start=9:end=10,setpts=PTS-STARTPTS[fadeoutsrc]: opdracht niet gevonden
-bash: [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]: opdracht niet gevonden
-bash: [fadeinsrc]format=pix_fmts=yuva420p,fade=t=in:st=0:d=1:alpha=1[fadein]: opdracht niet gevonden
-bash: [fadeoutsrc]format=pix_fmts=yuva420p,fade=t=out:st=0:d=1:alpha=1[fadeout]: opdracht niet gevonden
-bash: [fadein]fifo[fadeinfifo]: opdracht niet gevonden
-bash: [fadeout]fifo[fadeoutfifo]: opdracht niet gevonden
-bash: [fadeoutfifo][fadeinfifo]overlay[crossfade]: opdracht niet gevonden
-bash: [firstclip][crossfade][secondclip]concat=n=3[output]-map: opdracht niet gevonden

Answer

user4051844 picture user4051844 · Nov 16, 2017

This error has nothing to do with setpts, but with the syntax of the parameters for complex_filter, they should be enclosed in quotes.


Changed:

  • Enclosed filter_complex parameters in quotes
  • Removed -map parameter
  • Removed [output]
  • Added whitespace before every line-break

Editted command:

Remove -report parameter if not debugging.

ffmpeg -report -i "./video/big_buck_bunny.mp4" -i "./video/big_buck_bunny.mp4" -an \
    -filter_complex \
    "[0:v]trim=start=0:end=9,setpts=PTS-STARTPTS[firstclip]; \
    [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]; \
    [0:v]trim=start=9:end=10,setpts=PTS-STARTPTS[fadeoutsrc]; \
    [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]; \
    [fadeinsrc]format=pix_fmts=yuva420p,fade=t=in:st=0:d=1:alpha=1[fadein]; \
    [fadeoutsrc]format=pix_fmts=yuva420p,fade=t=out:st=0:d=1:alpha=1[fadeout]; \
    [fadein]fifo[fadeinfifo]; \
    [fadeout]fifo[fadeoutfifo]; \
    [fadeoutfifo][fadeinfifo]overlay[crossfade]; \
    [firstclip][crossfade][secondclip]concat=n=3" \
./rendered/outputname.mp4