[FFmpeg-user] PNG images to avi - transparency issue

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Dec 24 13:13:09 EET 2020


Am Mi., 23. Dez. 2020 um 06:18 Uhr schrieb Gopi Nath <tagopinath at gmail.com>:

> i am trying to convert png images to avi which is working fine, but the
> video is not showing the background transparency (png images has)
>
> this is what my statement
> ffmpeg -r 30 -start_number 1 -f image2 -i "imagespath" -y -pix_fmt yuv420p
> -q:v 1 "output.avi"
>
> after reading from forum, i tried adding png codec
> ffmpeg -r 30 -start_number 1 -f image2 -i "imagespath" -vcodec png -y
> -pix_fmt yuv420p -q:v 1 "output.avi"
>
> then it shows the error
> Incompatible pixel format 'yuv420p' for codec 'png', auto-selecting format
> 'rgb24'
>
> so, i removed pix_fmt, then it creates video with transparency, but i am
> able to open this video ONLY in VLC player, not any other players supported
> this codec
> ffmpeg -r 30 -start_number 1 -f image2 -i "imagespath" -vcodec png -y -q:v
> 1 "output.avi"
>
> please suggest me any working method.

You would need a codec that supports transparency and is common for
the avi container, png may already be the best solution.

If mov is a possibility, qtrle would work.

Please find out what top-posting means and avoid it here.

Merry Christmas, Carl Eugen


More information about the ffmpeg-user mailing list