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

Adjust volume does not work? #418

Open
edwardlee23 opened this issue Jan 8, 2025 · 1 comment
Open

Adjust volume does not work? #418

edwardlee23 opened this issue Jan 8, 2025 · 1 comment

Comments

@edwardlee23
Copy link

edwardlee23 commented Jan 8, 2025

The filename is *.mp4, and the volume is set to 0.0:
When I use ffmpeg.input(filename).audio.volume(volume=volume), the final output seems to retain the original volume. However, after setting the volume as a string: "0.0", it mutes as expected.

I noticed the ignore_default comment: Convert the values of the dictionary to strings., but it actually converts them to a tuple of objects.

def ignore_default(
kwargs: dict[str, str | int | float | bool | Default]
) -> tuple[tuple[str, str | int | float | bool | LazyValue], ...]:
"""
Convert the values of the dictionary to strings.
"""
return tuple((k, v) for k, v in kwargs.items() if not isinstance(v, Default))

Is this a bug, or am I misusing it? Thanks.

@edwardlee23
Copy link
Author

Update:
When I set the volume to 0.1, it still works correctly without needing to cast it to a string.

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

No branches or pull requests

1 participant