moviepy icon indicating copy to clipboard operation
moviepy copied to clipboard

Add 'decoder' Parameter to VideoFileClip and ffmpeg_reader

Open BackrndSource opened this issue 4 months ago • 1 comments

This commit allows users to specify the decoder used to decode the video file.

Fixed bug:

  • When importing a .webm video with alpha channel, transparency are not working.

Solved issue:

  • #2008

References:

  • https://www.reddit.com/r/ffmpeg/comments/fgpyfb/help_with_webm_with_alpha_channel/

"FFmpeg's native VPx decoders don't decode alpha. You have to use the libvpx decoder to preserve transparency in .webm videos. "

Example of use:

VideoFileClip("video.webm", decoder="libvpx-vp9")

BackrndSource avatar Oct 13 '24 04:10 BackrndSource