Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'decoder' Parameter to VideoFileClip and ffmpeg_reader #2229

Open
wants to merge 1 commit into
base: v1.0.x
Choose a base branch
from

Conversation

BackrndSource
Copy link

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:

References:

"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")

FFmpeg's native VPx decoders don't decode alpha. You have to use the libvpx decoder to preserve transparency in .webm video.
This commit allows the user to specify the the decoder used to decode the video file.

Example of use:

VideoFileClip("video.webm", decoder="libvpx-vp9")
@BackrndSource
Copy link
Author

To preserve the alpha channel also needs to set has_mask parameter to True:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant