2

I diligently followed

FFMPEG: how to add watermark to video? FFmpeg watermark

but under linux (ubuntu 13.04 64bit) the command to WATERMARK

  • video file stream
  • a png watermark

seems NOT to work anymore.

Even more strangely, the errors reported from ffmpeg and avconv are different (see codes, vesion and errors below)

But syntax seems correct to me. Any Idea ?

Please note that the -filter_complex (no more available) has been replaced in snipped with -vf

$ ffmpeg -i ariel.mov -i logostilo7.png -vf "[0:v][1:v]overlay=x=10:y=main_h-overlay_h-10[outv]" -map "[outv]"  out.mp4
ffmpeg version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
[h264 @ 0x1ce9d60] max_analyze_duration reached
[h264 @ 0x1ce9d60] Estimating duration from bitrate, this may be inaccurate
Input #0, h264, from 'ariel.mov':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264 (Main), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1200k tbn, 50 tbc
Input #1, image2, from 'logostilo7.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #1.0: Video: png, bgra, 479x339, 25 tbr, 25 tbn, 25 tbc
File 'out.mp4' already exists. Overwrite ? [y/N] y
[buffer @ 0x1cebcc0] w:1920 h:1080 pixfmt:yuv420p
Output pad "default" for the filter "src" of type "buffer" not connected to any destination
Error opening filters!

avconv

$ avconv -i ariel.mov -i logostilo7.png -vf "[0:v][1:v]overlay=x=10:y=main_h-overlay_h-10[outv]" -map "[outv]"  out.mp4
avconv version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
  built on Mar 30 2013 22:20:06 with gcc 4.7.2
[h264 @ 0x19f2d40] max_analyze_duration reached
[h264 @ 0x19f2d40] Estimating duration from bitrate, this may be inaccurate
Input #0, h264, from 'ariel.mov':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264 (Main), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1200k tbn, 50 tbc
Input #1, image2, from 'logostilo7.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #1.0: Video: png, bgra, 479x339, 25 tbr, 25 tbn, 25 tbc
[h264 @ 0x19f2d40] Invalid stream specifier: [outv].
Stream map '[outv]' matches no streams.

Any idea on which changes could be happened in ffmpeg overlay commands ?

More strangely, the code that seems to FIX the problem is completely different:

ffmpeg -i ariel.mov   -vf "movie=logostilo7.png [logo]; [in][logo] overlay=10:main_h-overlay_h-10 [out]" out.mov

Does it mean that the "OLD" fashioned way of watermarking is over ?

2

Your ffmpeg is not the "real" one from FFmpeg, but a pretty outdated and misnamed one from the Ubuntu repositories. It has countless unfixed bugs, and does not support as many features as ffmpeg versions 1.0 (perhaps even 0.9) and above do.

So, -filter_complex has not been removed—quite the contrary: your build doesn't have it. You need the filter_complex option for filter graphs with multiple inputs and outputs.

Also, -vf is a shorthand for -filter:v. If your version does not recognize -filter:v, it's also too old.

Download a recent static build, or compile ffmpeg yourself. Then, the examples you saw in the other questions should be working fine. You can find static builds for all major operating systems on the download page and compilation guides here, including specific guides for Ubuntu.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.