[FFmpeg-user] fade usage in complex filter

Jesse Koegler jessekoegler at gmail.com
Mon Nov 7 17:25:22 EET 2016


Great, thanks Erik.

Here is the final version what I ended up using in case anyone is
interested, this puts a nice 2 second fade to black to next scene (I am
using 20fps video here) for each transition between scenes when you know
the frame numbers where the transitions should go:

ffmpeg.exe -y  -i "C:\Users\Public\Documents\Compressed Video
Recordings\testVideo1.mp4" -filter_complex
"[0:v]trim=start_frame=0:end_frame=80,setpts=PTS-STARTPTS[a];[0:v]trim=start_frame=80:end_frame=200,setpts=PTS-STARTPTS[b];[a]fade=in:0:20,
fade=out:60:20[a1];[b]fade=in:0:20,
fade=out:100:20[c];[a1][c]concat[d];[0:v]trim=start=200:end_frame=300,setpts=PTS-STARTPTS[e];[e]fade=in:0:20,
fade=out:80:20[e1];[d][e1]concat[out1]" -map [out1]
"C:\Users\Public\Documents\Compressed Video Recordings\testVideoFaded.mp4"

Jesse

On Fri, Nov 4, 2016 at 3:40 PM, Erik Dobberkau <erik.dobberkau at gmail.com>
wrote:

> >
> > But at this point I`m getting a 'too many inputs specified' error just
> > trying to test the fade filter
> >
> > ffmpeg.exe -y -i "C:\Users\Public\Documents\Video
> > Recordings\99-99999-99\tempc-2016-11-04-14-34-14.avi"  -preset faster -r
> > 20
> > -tune film -c:v libx264 -b:a 96k -crf 27 -pixel_format yuv420p
> > -filter_complex
> > "[0:v]scale='trunc(oh*a/2)*2:600'[ready];[ready][0:v]fade=
> > type=in:start_frame=100:nb_frames=20[out]"
> >  -map "[out]" -map 0:a "C:\Users\Public\Documents\Compressed Video
> > Recordings\fdghdfgh.mp4"
> >
> >
> > [ready] is a video-only input for fade, you do not need to specify [0:v]
> -- this is causing the error because it's recognised as second input which
> fade does not support.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list