ffmpeg: Adding Drawtext timecode & Watermark with -filter_complex, Stream Matching

0

I am trying to add the timecode with drawtext and put a logo with ffmpeg.

The command line looks like this:

ffmpeg -i INPUT.MP4 -i logo.png /
-filter_complex "drawtext=fontfile=arialbd.ttf:text='UTC': /
timecode='09\:59\:12\:05':r=25:\x=(w-tw)/2:y=h-(2*lh):fontcolor=white: / 
fontsize=30:box=0:boxcolor=white;overlay=10:main_h-overlay_h-10" / 
-vcodec h264 -preset veryslow -crf 18 -acodec copy -y OUTPUT.mp4

I think I have a problem with the mapping of the streams, as I receive the following error:

Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_overlay
_1

Any ideas?

Thanks in advance.

Jan

Posted 2014-08-08T08:05:01.400

Reputation: 1

Please show the complete ffmpeg console output. – llogan – 2014-08-08T17:31:23.953

Answers

0

I would try to build it up with two overlays, for example:

ffmpeg -i INPUT.MP4 -loop 1 -i logo.png -filter_complex " [0] [1] overlay=10:main_h-overlay_h-10 [input_with_logo] ; \
drawtext=...your drawtext stuff... [drawtext] ; \
[input_with_logo][drawtext] overlay=...position the drawtext... " \
-vcodec h264 -preset veryslow -crf 18 -acodec copy -y OUTPUT.mp4

deadcode

Posted 2014-08-08T08:05:01.400

Reputation: 295