FFmpeg - Show logo at the top left corner at specific time

By xngo on June 8, 2019

# Show logo at the top left corner at specific time.
    ffmpeg -y -i VIDEO.mp4 -i logo.png \
        -filter_complex "[0:v][1:v]overlay=x=10:y=10:enable=between(t\,3\,5)" OUTPUT.mp4
    # [0:v] refers to the video stream of the 1st input (VIDEO.mp4)
    # [1:v] refers to the video stream of the 2nd input (logo.png)
    # overlay=x=10:y=10 refers to (x,y) position of the overlay(logo.png).
    # enable=between(t\,3\,5) shows the overlay(logo.png) between 3 to 5 seconds.
 
# Show logo at the top left corner for the first 3 seconds and fade aways.
    ffmpeg -y -i VIDEO.mp4 -framerate 30000/1001 -loop 1 -i logo.png -filter_complex \
        "[1:v] fade=out:st=3:d=1:alpha=1 [ov]; [0:v][ov] overlay=10:10 [v]" -map "[v]" \
            -map 0:a -c:v libx264 -c:a copy -shortest OUTPUT_FADE.mp4

If you want to position your logo at specific location, see FFmpeg - Add logo to video

Output

Show logo at the top left corner at specific time

Show logo at the top left corner at specific time

Fade out logo after 3 seconds

Fade out logo after 3 seconds

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.