# -*- coding: utf-8 -*-
from moviepy.editor import *
video = VideoFileClip('Sora no Kiseki the 3rd Evolution [BGM RIP] - Cry for your Eternity.mp4')
video.audio.write_audiofile('test.mp3')
# If the mp4 vedio is without any frame (black screen) use this
import os
my_mp4="Video.mp4"
base, ext = os.path.splitext(my_mp4)
my_mp3 = base + '.mp3'
os.rename(my_mp4, my_mp3)
import os
from moviepy.editor import *
video = VideoFileClip(os.path.join("path","to","movie.mp4"))
video.audio.write_audiofile(os.path.join("path","to","movie_sound.mp3"))
ffmpeg -loop 1 -framerate 1 -i image.png -i audio.mp3 -map 0:v -map 1:a -r 10 -vf "scale='iw-mod(iw,2)':'ih-mod(ih,2)',format=yuv420p" -movflags +faststart -shortest -fflags +shortest -max_interleave_delta 100M output.mp4