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

Closed
wants to merge 1 commit into 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")

@OsaAjani
Copy link
Collaborator

OsaAjani commented Jan 5, 2025

The original problem was fixed by #2269, do you think we still need to add a codec parameter in regard to this new information, or should we let ffmpeg choose by himself ?

@OsaAjani
Copy link
Collaborator

OsaAjani commented Jan 5, 2025

Actually #2230 answer that question, I close

@OsaAjani OsaAjani closed this Jan 5, 2025
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.

2 participants