0

How i can add watermark with text or image on ffmpeg stream ? This is my command :

ffmpeg -re -i "input.mp4" -c:v copy -c:a aac -ar 44100 -ab 128k -ac 2 -strict -2
    -flags +global_header -bsf:a aac_adtstoasc -f flv "rtmp://"
llogan
  • 121,796
  • 28
  • 232
  • 243

1 Answers1

0

You can use the overlay filter. It would look something like this:

ffmpeg -re -i "input.mp4" -i "logo.png" -filter_complex "overlay=0:0" 
    -c:v libx264 -profile:v main -level 31 -preset slow -b:v 800k -c:a aac
    -ar 44100 -ab 128k -ac 2 -strict -2 -flags +global_header
    -bsf:a aac_adtstoasc -f flv "rtmp://"
Mike
  • 562
  • 3
  • 15
  • Error : "Streamcopy requested for output streaam 0:0, which is fed from a complex filtergraph. Filtering and streamcopy cannot be used together." where should i put logo.png ? ffmpeg/bin ? – Michael Rodriguez Aug 16 '17 at 19:18
  • Sorry, edited to show how to re-encode the video stream with the overlay. You can have the input file anywhere on the system, and they can be referenced with an absolute path. – Mike Aug 17 '17 at 16:07
  • You have an orphaned `-c:v` in your command. Should be removed. – llogan Nov 28 '18 at 19:03