Skip to content

Conversation

@linoniro564-maker
Copy link

@linoniro564-maker linoniro564-maker commented Aug 31, 2025

from moviepy.editor import *

Charger la voix off (à générer avant)

voix = AudioFileClip("voix_off_masculine.mp3")

Charger les images correspondantes

images = [
"mystere5_bloop.png",
"mystere4_yonaguni.png",
"mystere3_baltique.png",
"mystere2_ourang.png",
"mystere1_heracleion.png"
]

Créer un diaporama (20s par image, ajustable)

clips = [ImageClip(img).set_duration(20).resize(height=720) for img in images]

Concaténer les images

video = concatenate_videoclips(clips, method="compose")

Ajouter la voix off

video = video.set_audio(voix)

Ajouter musique d’ambiance

musique = AudioFileClip("mystere_music.mp3").volumex(0.2) final_audio = CompositeAudioClip([voix.volumex(1), musique]) video = video.set_audio(final_audio)

Exporter en MP4

video.write_videofile("video_mysteres.mp4", fps=24)


📚 Documentation preview 📚: https://python-packaging-user-guide--1903.org.readthedocs.build/en/1903/

from moviepy.editor import *

# Charger la voix off (à générer avant)
voix = AudioFileClip("voix_off_masculine.mp3")

# Charger les images correspondantes
images = [
    "mystere5_bloop.png",
    "mystere4_yonaguni.png",
    "mystere3_baltique.png",
    "mystere2_ourang.png",
    "mystere1_heracleion.png"
]

# Créer un diaporama (20s par image, ajustable)
clips = [ImageClip(img).set_duration(20).resize(height=720) for img in images]

# Concaténer les images
video = concatenate_videoclips(clips, method="compose")

# Ajouter la voix off
video = video.set_audio(voix)

# Ajouter musique d’ambiance
musique = AudioFileClip("mystere_music.mp3").volumex(0.2)
final_audio = CompositeAudioClip([voix.volumex(1), musique])
video = video.set_audio(final_audio)

# Exporter en MP4
video.write_videofile("video_mysteres.mp4", fps=24)
@pypa pypa locked as spam and limited conversation to collaborators Aug 31, 2025
@webknjaz webknjaz added the spam For issues/PRs that are clearly spam. label Aug 31, 2025
@webknjaz webknjaz closed this Aug 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

spam For issues/PRs that are clearly spam.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants