0

I have a png and would like to add there video, so png is my case is something like a border.

I trying :

ffmpeg -i cat.mp4 -framerate 30 -i dem.png -filter_complex "[0]pad=1920:1080:500:0[vid];[vid][1]overlay" -c:a copy -movflags +faststart out2.mp4

But png is not a transparent and video hiding behind the picture. How can i set order or "z-index" position of the video to see it OVER the image?

enter image description here

6
  • 2
    Change [vid][1] to [1][vid]
    – Gyan
    Jul 28 at 4:11
  • @Gyan, in this case - png is not shown : c2n.me/4gfPjBc.png
    – Nigrimmist
    Jul 28 at 7:39
  • Likely because your png is smaller than the video. Pad the image, not the video, OR downscale the video.
    – Gyan
    Jul 28 at 10:10
  • @Gyan, png size is 600x554, mp4 is 148x114. I uploaded my files in case you would like to check them... drive.google.com/drive/folders/…
    – Nigrimmist
    Jul 28 at 13:56
  • 1
    -i cat.mp4 -framerate 30 -i dem.png -filter_complex "[1][0]overlay=x=W*.27:y=H*.58" -c:a copy -movflags +faststart out2.mp4
    – Gyan
    Jul 28 at 17:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.