0

I am trying to modify code from one of my previous quesitons so that the images are resized to 1280x720 and there is a fade transition. This is my code currently --

ffmpeg -threads 1 -y \
    '.$startline.' \
    -i '.$output.' \
    '.$endline.' \
    -f lavfi -t 3 -i anullsrc \
    -filter_complex "[0:v]setpts=PTS-STARTPTS,fade=t=out:st=2:d=1,scale=1280:720,setdar=16/9,setsar=sar=300/300[v0]; \
    [1:v]setpts=PTS-STARTPTS,fade=t=in:st=0:d=1,fade=t=out:st=2:d=1,scale=1280:720,setdar=16/9,setsar=sar=300/300[v1]; \
    [2:v]setpts=PTS-STARTPTS,fade=t=in:st=0:d=1,fade=t=out:st=2:d=1,scale=1280:720,setdar=16/9,setsar=sar=300/300[v2]; \
    [0:v][3:a][1:v][1:a][2:v][3:a] concat=n=3:v=1:a=1 [v] [a]" \
    -c:v libx264 -c:a aac -map "[v]" -map "[a]" -preset ultrafast '.$thepath.'/output-'.$v_Id.'.mp4 2>&1

Right now it is giving me the following error --

Filter setsar has an unconnected output

Any help is appreciated.

730wavy
  • 159

1 Answers1

1

The concat is being fed the source streams and not the filtered ones.

Change to

[v0][3:a][v1][1:a][v2][3:a] concat=n=3:v=1:a=1 [v] [a]

Note that only one of setsar and setdar should be set. They both affect the same property.

Gyan
  • 38,955