warn if ffmpeg does not support requested format
This commit is contained in:
parent
49aa7e3746
commit
252158a216
1 changed files with 8 additions and 1 deletions
|
@ -16,6 +16,7 @@ class DistributedClient:
|
|||
def __init__(self, url, name):
|
||||
self.url = url
|
||||
self.name = name
|
||||
self.supported_formats = extract.supported_formats()
|
||||
|
||||
def ping(self, oshash):
|
||||
try:
|
||||
|
@ -44,6 +45,12 @@ class DistributedClient:
|
|||
|
||||
def encode(self, oshash, cmd, output):
|
||||
cmd[0] = extract.command('ffmpeg')
|
||||
if 'webm' in cmd and not self.supported_formats['webm']:
|
||||
print "ffmpeg is compiled without WebM support"
|
||||
return
|
||||
elif cmd[-1].endswith('.mp4') and not self.supported_formats['webm']:
|
||||
print "ffmpeg is compiled without H.264 support"
|
||||
return
|
||||
try:
|
||||
p = subprocess.Popen(cmd)
|
||||
r = None
|
||||
|
|
Loading…
Reference in a new issue