Found a solution:
def get_ffmpeg_bin():
ffmpeg_dir = helper_functions.get_ffmpeg_dir_path()
FFMPEG_BIN = os.path.join(ffmpeg_dir, "ffmpeg.exe")
return FFMPEG_BIN
def split_vid_from_path(video_file_path, start_time, durration):
ffmpeg_binary = get_ffmpeg_bin()
output_file_name = get_next_file_name(video_file_path)
pipe = sp.Popen([ffmpeg_binary,"-v", "quiet", "-y", "-i", video_file_path, "-vcodec", "copy", "-acodec", "copy",
"-ss", start_time, "-t", durration, "-sn", output_file_name ])
pipe.wait()
return True
sample_vid = os.path.join(get_sample_vid_dir_path(), "Superman-01-The_Mad_Scientist.mp4")
split_vid_from_path(sample_vid, "00:00:00", "00:00:17")
https://www.ffmpeg.org/ffmpeg.html -> this documentation allows you to add your own custom flags to your ffmpeg wrapper.
Something to note, you may want to verify the user is giving you valid data.