Skip to content

Instantly share code, notes, and snippets.

@asvechkar
Created June 28, 2023 07:21
Show Gist options
  • Save asvechkar/fbe4bf5ad6e4a9b7285d3dab1faaa03f to your computer and use it in GitHub Desktop.
Save asvechkar/fbe4bf5ad6e4a9b7285d3dab1faaa03f to your computer and use it in GitHub Desktop.
Извлечь аудио с видеофайла
pip install moviepy
from moviepy.editor import VideoFileClip
# Define the path to the video file
video_path = "path/to/video/file.mp4"
# Create a VideoFileClip object
video_clip = VideoFileClip(video_path)
# Extract the audio from the video
audio_clip = video_clip.audio
# Define the output audio file path
output_audio_path = "path/to/output/audio/file.mp3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment