0

I have a lot of created png images with transparency / alpha channel. These need to be converted to a webm file with the VP9 codec to have a video with transparent areas. The output framerate should be 60fps. But filter_complex (which i need to select the yuva420p format) apparently has an issue with that.

I found an answer how to fix that; tried to adapt it to my case but it did not work.

The 1055 source png files should create a video with 60fps and a duration of 17.6 sec. But the result is a file with 42.2 sec (1055 frames at 25fps); according to ffmpeg 2530 frames were used. So the video file itself has 60fps but the source frames are "stretched" to 25fps. Kind of a slow-mo video.

What do i need to change? Or would it be possible to put the pngs into a VP9 webm with 60fps without using filter_complex at all?

The command i'm using by adapting another found answer is:

ffmpeg -hide_banner -i srcImgMasked_%05d.png -filter_complex "nullsrc=size=1920x1080:rate=60 [base]; [0]format=yuva420p [bla]; [base] [bla] overlay=shortest=0" -c:v libvpx-vp9 -crf 20 -b:v 0  -threads 0 result.webm -y
Jaecko
  • 1
  • you need to set the input framerate (which defaults to 25 fps as you experienced). `-r 60` **before** `-i` option. – kesh Oct 31 '22 at 14:29
  • Thanks! That did it. Sometimes it is too easy. Joke is: i also tried the -r parameter, but back in the end after -crf (which did not really change anything). – Jaecko Oct 31 '22 at 16:33

0 Answers0