feat(lib): add audio to partial movie files and section videos#3763
feat(lib): add audio to partial movie files and section videos#3763jeertmans wants to merge 2 commits into
Conversation
|
Note: the commit history looks very weird, even though I rebased onto your main branch... |
| if ptype == "video": | ||
| packet.stream = output_video_stream | ||
| elif ptype == "audio": | ||
| packet.stream = output_audio_stream |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable
|
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... |
|
Hi @chopan050 / @behackl, I finally had some time to work again on this, and think I have a good working prototype :-) |
|
Can't reproduce the failing tests locally: they all pass on my machine (Ubuntu 24.04.4)... |
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
Minimal working example:
Reviewer Checklist