Running FFmpeg commands from a Python Script

import subprocessffmpeg = "/usr/local/bin/ffmpeg"
def grabUserInput():    def filterInput(message, default):
user_input = input (message)
if user_input == "":
user_input = default
return user_input
print("Hit enter for default values\n") user_input_dict = {} user_input_dict["input_file"] = filterInput("Input File: ", "")
return user_input_dict
def buildFFmpegCommand():    final_user_input = grabUserInput()    commands_list = [
return commands_list
def runFFmpeg(commands):    if == 0:
print ("FFmpeg Script Ran Successfully")
print ("There was an error running your FFmpeg script")



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arthur Wilton

Arthur Wilton


Software Developer and Video/Post Production Professional. Recent graduate of Flatiron School.