Fade In and Out text using the 'drawtext' filter

0
75
ffmpeg -f lavfi -i "color=c=black:s=1920x1080" -vf "drawtext=alpha=if(lt(t\,0.3)\,0\,if(lt(t\,1.3)\,(t-0.3)/1\,if(lt(t\,3)\,1\,if(lt(t\,4)\,(1-(t-3))/1\,0)))):fontcolor=ffffff:fontsize=64:text=\"drawtext\" text with fade in & out:x=(w-text_w)/2:y=(h-text_h)/2" -c:v libx264 -r 30 -frames:v 150 -y output.mp4