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 want to overlay an image (preferably one with transparency, so only certail shape of it is overlayed) on a video.

I came across this old method, which does not work for me (I can't find vhook library on my system). http://www.bernzilla.com/2008/07/09/overlaying-an-image-on-a-video-using-ffmpeg-on-ubuntu/

And then, my ffmpeg did not support -vf option, so I reinstalled from source. I can't make head or tail of the guides on the net, even the syntax to use :(. I tried to use one, and got such errors:

ffmpeg -i Day5_1.MPG -s 640x360 -f mp4  -b 800k -acodec libfaac -ab 64k  -vf "movie=0:png:test.png [wm];[in][wm] overlay=0:0:1 [out]" out.mp4
ffmpeg version git-N-29941-g5a15360, Copyright (c) 2000-2011 the FFmpeg developers
  built on May 15 2011 15:51:38 with gcc 4.4.3
  configuration: --enable-gpl --enable-nonfree --enable-shared --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-x11grab --enable-bzlib --enable-libdc1394 --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libschroedinger --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-libspeex --enable-libopenjpeg --enable-libdirac --enable-vdpau --enable-x11grab --enable-libvpx --enable-libmp3lame --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
  libavutil    51.  2. 1 / 51.  2. 1
  libavcodec   53.  5. 0 / 53.  5. 0
  libavformat  53.  0. 3 / 53.  0. 3
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  5. 0 /  2.  5. 0
  libswscale    0. 14. 0 /  0. 14. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mpeg @ 0x8b132c0] max_analyze_duration reached
Input #0, mpeg, from 'Day5_1.MPG':
  Duration: 00:53:31.12, start: 0.744000, bitrate: 1391 kb/s
    Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 352x288 [PAR 200:219 DAR 2200:1971], 1150 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
    Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s
File 'out.mp4' already exists. Overwrite ? [y/N] y
[buffer @ 0x8b17660] w:352 h:288 pixfmt:yuv420p tb:1/1000000 sar:200/219
[movie @ 0x8c5a800] Missing key or no key/value separator found after key 'png:test.png'
[movie @ 0x8c5a740] Error parsing options string: 'png:test.png'
Error initializing filter 'movie' with args '0:png:test.png'
Error opening filters!

Can someone please tell me how can I overlay a certain image, which should appear throught the video?

share|improve this question
    
Solved it. My syntax (picked up from a tutorial) was wrong (or unsupported with the new version). Someone had similar problem that was solved on this thread ffmpeg-users.933282.n4.nabble.com/… –  tanon May 15 '11 at 10:52
    
You can post your solution here as an answer and accept it in two days. That way it's easier for others to find the solution. –  slhck May 15 '11 at 12:33

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.