for i in `find path/pngfiles/ -type f -name "*.png"`; do optipng -preserve -strip all $i; done
How to Add a Watermark to Video
FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and itâ€™s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you donâ€™t have to worry about including and installing all the right dependencies and codecs you will be using.
Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:
ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4
Basically, weâ€™re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.