79682178

Date: 2025-06-27 15:39:23
Score: 1
Natty:
Report link

from moviepy.editor import *

from pydub.generators import Sine

from pydub import AudioSegment

# Regenerar audio base

voice = Sine(180).to_audio_segment(duration=8000).apply_gain(-15)

beat = Sine(100).to_audio_segment(duration=8000).apply_gain(-20)

mix = beat.overlay(voice)

# Exportar audio MP3

audio_path = "/mnt/data/saludo_piero_26is_lofi.mp3"

mix.export(audio_path, format="mp3")

# Generar video con imagen

image_path = "/mnt/data/A_digital_image_combining_text_and_a_gradient_back.png"

audio = AudioFileClip(audio_path)

clip = ImageClip(image_path).set_duration(audio.duration).set_audio(audio)

# Exportar como video MP4 final

video_path = "/mnt/data/saludo_piero_26is_final.mp4"

clip.write_videofile(video_path, fps=24)

video_path

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Kendrix Chambillo Quintana