codecVis: allow whitespace in file path
This commit is contained in:
parent
251859e989
commit
6949d4cecf
|
@ -10,7 +10,6 @@ import os
|
|||
import sys
|
||||
import time
|
||||
import subprocess
|
||||
import shlex
|
||||
import shutil
|
||||
import glob
|
||||
import PIL
|
||||
|
@ -50,9 +49,10 @@ def get_codec(filename):
|
|||
return str(result.stdout.decode("utf-8")).rstrip("\n")
|
||||
|
||||
def extract_frame(video_file, time_offset, output_file):
|
||||
cmd = "ffmpeg -y -ss " + time.strftime('%H:%M:%S', time.gmtime(time_offset)) + ".00 -i " + str(video_file) + " -frames:v 1 " + str(output_file)
|
||||
cmd = ["ffmpeg", "-y", "-ss", time.strftime('%H:%M:%S', time.gmtime(time_offset)) + ".00",
|
||||
"-i", str(video_file), "-frames:v", "1", str(output_file)]
|
||||
devnull = open(os.devnull, 'w')
|
||||
subprocess.call(shlex.split(cmd),stdout=devnull, stderr=devnull)
|
||||
subprocess.call(cmd, stdout=devnull, stderr=devnull)
|
||||
|
||||
def get_font_path():
|
||||
path = "/usr/share/fonts"
|
||||
|
|
Loading…
Reference in New Issue