Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to watermark a video using FFmpeg and -vf to overlay a PNG, but it's not working.

My command line:

$ffmpeg->exec('-i "' . $path_src . '" -vf "movie=watermark.png [wm]; [in][wm] overlay=0:0 [out]" -map_chapters -1:-1 -threads 2 -ar 44100 -ab 96k -vcodec libx264 -level 41 -crf 25 -bufsize 2000k -maxrate 2500k -r 25 -g 250 -s 720x480 ' .  '-coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +dct8x8+bpyramid -me_method umh -subq 7 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq \'blurCplx^(1-qComp)\' -bf 16 -b_strategy 1 -bidir_refine 1 -refs 6 -deblockalpha 0 -deblockbeta 0 -y "' . $path_dst . '"');

Result:

FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers built on Dec 4 2010 15:37:20 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48) 
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab 
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2 
libavformat 52.64. 2 / 52.64. 2 
libavdevice 52. 2. 0 / 52. 2. 0 
libavfilter 1.19. 0 / 1.19. 0 
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0 
[aac @ 0x81a54f0]Transition from an ONLY_LONG or LONG_STOP to an EIGHT_SHORT sequence detected. If you heard an audible artifact, please submit the sample to the FFmpeg developers. 
Last message repeated 1 times 
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/content/blabla.com/htdocs/setup/megaupload/upload/blabla/0001.mp4': 
Metadata: 
major_brand : mp42 
minor_version : 0 
compatible_brands: isom 
Duration: 00:05:16.28, start: 0.000000, bitrate: 1598 kb/s 
Stream #0.0(eng): Video: h264, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 1499 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc 
Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 94 kb/s
Unrecognized option 'vf'"
share|improve this question
add comment

migrated from stackoverflow.com Apr 29 '12 at 9:34

This question came from our site for professional and enthusiast programmers.

2 Answers

Your version of ffmpeg (0.6.1/2010) is a bit on the old side, it might be that the command line format has changed since it came out.

Try the latest version.

share|improve this answer
add comment

To watermark a video in ffmpeg you can try this tutorial.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.