forked from localhorst/media_management_scripts
Compare commits
1 Commits
dejavu-mac
...
webm-suppo
Author | SHA1 | Date | |
---|---|---|---|
4a93c1f9db
|
@ -25,7 +25,7 @@ class MediaFile:
|
|||||||
duration: int #in sec
|
duration: int #in sec
|
||||||
|
|
||||||
def supported_file_extension(filename):
|
def supported_file_extension(filename):
|
||||||
if filename.endswith('.mp4') or filename.endswith('.mkv'):
|
if filename.endswith('.mp4') or filename.endswith('.mkv') or filename.endswith('.webm'):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -56,12 +55,6 @@ def extract_frame(video_file, time_offset, output_file):
|
|||||||
subprocess.call(shlex.split(cmd),stdout=devnull, stderr=devnull)
|
subprocess.call(shlex.split(cmd),stdout=devnull, stderr=devnull)
|
||||||
|
|
||||||
def get_font_path():
|
def get_font_path():
|
||||||
if platform.system() == "Darwin":
|
|
||||||
# Assume DejaVu to be installed in the user library
|
|
||||||
path = "~/Library/Fonts/DejaVuSans-Bold.ttf"
|
|
||||||
return os.path.expanduser(path)
|
|
||||||
|
|
||||||
# Default platform: Linux
|
|
||||||
path = "/usr/share/fonts"
|
path = "/usr/share/fonts"
|
||||||
files = glob.glob(path + "/**/DejaVuSans-Bold.ttf", recursive = True)
|
files = glob.glob(path + "/**/DejaVuSans-Bold.ttf", recursive = True)
|
||||||
return files[0]
|
return files[0]
|
||||||
|
Reference in New Issue
Block a user