[FFmpeg-user] VF Crop and overlay not working together but working seperate

Joey Leone jo2jo at validusdata.com
Tue Jul 10 00:22:35 CEST 2012


Im using FFmpeg 0.8.5 on linux and trying to Crop and Add a watermark (overlay) to videos, however I can only seem to get one or the other working, not both.  It also seems to matter where I put the -vf overlay command.  (if I put the overlay command before the crop command it will ONLY crop,  if I put the overlay command AFTER the crop command, it will NOT crop but will add the overlay)

Here is the command:  (the original video is 1280x720):  with this command it will crop and resize the video but NO watermark/overlay

/usr/local/bin/ffmpeg -i  "/home/1280x720videoIN.wmv " -vf "movie=/home/watermark.png [logo]; [in][logo] overlay=640-overlay_w-10:320-overlay_h-10 [out]" -vf crop=640:320:0:0 -s 640x360 -acodec libfaac -ab 128k -keyint_min 20 -vcodec libx264 -vpre lossless_fast -crf 23 -y -v 0 -bf 16 -threads 0 "/home/admin/videoOUTwithCROPnoOVERLAY.mp4"

With this command it will resize the video and add the watermark/overlay but it will NOT CROP:

/usr/local/bin/ffmpeg -i "/home/1280x720videoIN.wmv" -vf crop=640:320:0:0 -vf "movie=/home/watermark.png [logo]; [in][logo] overlay=640-overlay_w-10:320-overlay_h-10 [out]" -s 640x360 -acodec libfaac -ab 128k -keyint_min 20 -vcodec libx264 -vpre lossless_fast -crf 23 -y -v 0 -bf 16 -threads 0 "/home/admin/videoOUTnoCROP.mp4"

Any ideas as to why I cant get it to crop and Resize AND do the overlay?  Or what command/args should I be using to accomplish this?

Thanks a lot!

More information about the ffmpeg-user mailing list