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

Implement FLAC codec in video encode #2220

Open
kubinka0505 opened this issue Sep 22, 2024 · 0 comments
Open

Implement FLAC codec in video encode #2220

kubinka0505 opened this issue Sep 22, 2024 · 0 comments
Labels
feature-request Request for a new feature or additional functionality.

Comments

@kubinka0505
Copy link

As this one reports ValueError, this would allow lossless audio encoding

from moviepy import editor as mp

clip = mp.ColorClip((100,) * 2, color = (0,) * 3, duration = 2)
audio_clip = mp.AudioFileClip("in.wav")
clip = clip.set_audio(audio_clip)

clip.write_videofile(
    "out.mp4",
    fps = 24,
    codec = "libx264",
    audio_fps = clip.audio.fps,
    audio_codec = "flac",
    rewrite_audio = False, # ignored
    ffmpeg_params = ["-strict", "-2"],
)
@kubinka0505 kubinka0505 added the feature-request Request for a new feature or additional functionality. label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for a new feature or additional functionality.
Projects
None yet
Development

No branches or pull requests

1 participant