![]() ![]() ![]() I created a function grabUserInput() which prompts a user for input, stores that input in a dictionary, and returns that dictionary to be used in another function. import subprocess ffmpeg = "/usr/local/bin/ffmpeg" ![]() Then I setup a variable to define where the ffmpeg binary is located. More info about subprocess can be found here. The first thing I do is import the subprocess module which allows me to run shell commands from Python. I’ll go through the process of how I created the script and break down each section. To help with this I decided to create a Python script to help automate the common task of taking a video file and encoding it to an MP4 encoded with x264. Running FFmpeg commands from a Python ScriptįFmpeg is one of my favorite tools for encoding video files, but even as someone who has used it for a few years the syntax can still be pretty tricky. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |