Commit af443d9
authored
Update index.rst
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)1 parent 4cfc8b9 commit af443d9
1 file changed
+1
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 86 | + | |
0 commit comments