Skip to content

Instantly share code, notes, and snippets.

@Luxato
Created November 6, 2018 01:28
Show Gist options
  • Save Luxato/140c1241ca4157b9c297782bfba31887 to your computer and use it in GitHub Desktop.
Save Luxato/140c1241ca4157b9c297782bfba31887 to your computer and use it in GitHub Desktop.
Convert .mp4 video into .wav voice file. ffmpeg is required
import subprocess
command = "C:/ffmpeg/bin/ffmpeg.exe -i C:/path_to/video.mp4 -ab 160k -ac 2 -ar 44100 -vn audio.wav"
subprocess.call(command, shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment