FFMPEG Add 2 watermarks (txt + png) to a video

razz

I'm trying to add 2 watermarks to a video, one should be a .png file and the second some moving/scrolling text.

Png = fixed at right bottom

Text = Moving/scrolling from the top right to the top left. Starting at 50% of total video length (appear at 1:00 if total length is 2:00) and disappearing in 20 seconds.

I already use a command to encode the video and add a logo at the right bottom but having trouble adding scrolling text at the same time.

-i logo.png -filter_complex "overlay=main_w-overlay_w:main_h-overlay_h-4" -keyint_min 20 -vcodec libx264 -c:a copy -b:v 1500k -movflags +faststart
m8factorial

You need to concatenate overlay and drawtext filters:

ffmpeg -i input.mp4 -i logo.png -filter_complex "[0:v][1:v] overlay=x=(main_w-overlay_w):y=(main_h-overlay_h),drawtext=text=string1:y=line_h-10:x='if(gte(t,30),w-(t-30)*w/20,w)'" -c:a copy output.mp4

In this example, the video lasts 60s, so I set 30s into the if block. If you need to automate the video length, I recommend you a bash script (use ffprobe to get the duration). You can also customize the font (color, size...) adding colons between properties. More info:

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

FFMPEG Add 2 watermarks to an Image using single command

From Dev

Update PNG overlay on video with ffmpeg

From Dev

Add border to video (FFMPEG)

From Dev

Ffmpeg add new audio in video (mixing 2 audio)

From Dev

ffmpeg / batch addition of watermarks for videos

From Dev

FFmpeg: Fade in and out from PNG generated video

From Dev

ffmpeg: overlay a png image on a video with custom transparency?

From Dev

FFMPEG - zoom an overlaid PNG in the centre of a video

From Dev

FFMPEG - Convert png's to video files

From Dev

ffmpeg export video from png sequence is not correct

From Dev

Extract transparent png in .mov video without ffmpeg

From Dev

Are watermarks constrained by the quality of the underlay video?

From Dev

add current video time with ffmpeg

From Dev

Add captions to ffmpeg video slideshow

From Dev

Add audio to video using FFmpeg

From Dev

Add two video to a canvas with ffmpeg

From Dev

Add image overlay on video FFmpeg

From Dev

Add two watermark on ffmpeg video

From Dev

How to add a video on a template with ffmpeg

From Dev

How to overlay a transparent PNG over video and scale to video size in FFmpeg

From Dev

ffmpeg add music to video playing after video

From Dev

FFMPEG add audio to a video but clip it to the video length

From Dev

How to add multiply watermarks in Excel?

From Dev

Terminal Software to add Watermarks to Videos?

From Dev

Ffmpeg : Overlay 2 images on a video

From Dev

[FFmpeg on Windows]: help me converting a set of .png files to a video file

From Dev

Producing lossless video from set of .png images using ffmpeg

From Dev

How to overlay a png to piped video source with audio mixed in via ffmpeg?

From Dev

Overlay image on video using ffmpeg with adjustable png image

Related Related

  1. 1

    FFMPEG Add 2 watermarks to an Image using single command

  2. 2

    Update PNG overlay on video with ffmpeg

  3. 3

    Add border to video (FFMPEG)

  4. 4

    Ffmpeg add new audio in video (mixing 2 audio)

  5. 5

    ffmpeg / batch addition of watermarks for videos

  6. 6

    FFmpeg: Fade in and out from PNG generated video

  7. 7

    ffmpeg: overlay a png image on a video with custom transparency?

  8. 8

    FFMPEG - zoom an overlaid PNG in the centre of a video

  9. 9

    FFMPEG - Convert png's to video files

  10. 10

    ffmpeg export video from png sequence is not correct

  11. 11

    Extract transparent png in .mov video without ffmpeg

  12. 12

    Are watermarks constrained by the quality of the underlay video?

  13. 13

    add current video time with ffmpeg

  14. 14

    Add captions to ffmpeg video slideshow

  15. 15

    Add audio to video using FFmpeg

  16. 16

    Add two video to a canvas with ffmpeg

  17. 17

    Add image overlay on video FFmpeg

  18. 18

    Add two watermark on ffmpeg video

  19. 19

    How to add a video on a template with ffmpeg

  20. 20

    How to overlay a transparent PNG over video and scale to video size in FFmpeg

  21. 21

    ffmpeg add music to video playing after video

  22. 22

    FFMPEG add audio to a video but clip it to the video length

  23. 23

    How to add multiply watermarks in Excel?

  24. 24

    Terminal Software to add Watermarks to Videos?

  25. 25

    Ffmpeg : Overlay 2 images on a video

  26. 26

    [FFmpeg on Windows]: help me converting a set of .png files to a video file

  27. 27

    Producing lossless video from set of .png images using ffmpeg

  28. 28

    How to overlay a png to piped video source with audio mixed in via ffmpeg?

  29. 29

    Overlay image on video using ffmpeg with adjustable png image

HotTag

Archive