-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(lib): add audio to partial movie files and section videos #3763
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Benjamin Hackl <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
Note: the commit history looks very weird, even though I rebased onto your main branch... |
Hello, and thanks for your contribution!
Is it still a draft? (asking because of the failing tests) If so, please mark it as a draft, thanks! |
Hello! Yes it is, I forgot to tick the « draft » box :) |
@chopan050 This is now ready for reviewing! I haven't added any test yet, but not sure where / how to correctly test this. I have looked at the current test suite, and we don't have many tests for sound nor partial movie files. Edit: it seems that adding audio alters the duration of the media (could be logic) but also the frame rate?? So some tests (based on video metadata) are failing... |
for more information, see https://pre-commit.ci
Overview: What does this pull request change?
With this PR, audio is added when writing partial movies. Before, it was only added at the end, so partial movie files and section videos did not contain audio.
Motivation and Explanation: Why and how do your changes improve the library?
My main motivation is jeertmans/manim-slides#375, in line with what I mentioned in #3501 (@behackl).
Further Information and Comments
The current PR is still in draft for the following reasons:
self.add_sound
) is added before the first animation, I need to understand why and how to fix this (zero-padding does not seem to work as theconcat
output does not contain any audio stream in this case);[ ] check if we can avoid padding audio every time we write some partial movie;I think zero-padding is necessary, having possibly empty audio streams seems to be a problem;webm
;Idea: it might be interesting to rethink the
add_sound
function to, e.g., let the user pass anAudioSegment
instead of a file. This would be very useful for truncating audio, for example. That could also be a separate PR.Reviewer Checklist