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

Use audio codec for existing audiofile #2346

Merged
merged 17 commits into from
Jan 26, 2025

Conversation

zalgo3
Copy link
Contributor

@zalgo3 zalgo3 commented Jan 25, 2025

moviepy.video.VideoClip.write_videofile ignores audio_codec when audio is a file name. I have fixed it in this PR.

Although #1906 was closed when v2 was released, I am reopening this PR because I still believe it will improve functionality.

  • I have provided code that clearly demonstrates the bug and that only works correctly when applying this fix
    • moviepy.video.VideoClip.write_videofile("output.mp4", audio="input.wav", fps=60, audio_codec="aac") have run ffmpeg with -acodec copy. With this PR, it will run the command with -acodec aac.
  • I have added suitable tests demonstrating a fixed bug or new/changed feature to the test suite in tests/
  • I have properly documented new or changed features in the documentation or in the docstrings
  • I have properly explained unusual or unexpected code in the comments around it

@OsaAjani
Copy link
Collaborator

That seems like a nice and coherent addition. Thanks for your contribution !

@OsaAjani OsaAjani merged commit 8d271ea into Zulko:master Jan 26, 2025
15 checks passed
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