diff --git a/pandora_client/client.py b/pandora_client/client.py index 7618393..63c0e74 100644 --- a/pandora_client/client.py +++ b/pandora_client/client.py @@ -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 @@ -71,7 +78,7 @@ class DistributedClient: self.status(oshash, 'failed') if os.path.exists(output): os.unlink(output) - + def run(self): new = True while True: