diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 3c0dbc7..8d37be0 100644 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -37,7 +37,7 @@ def encode(filename, prefix, profile): print frame_f extract.frame(filename, frame_f, pos) frames.append(frame_f) - video_f = os.path.join(cache, '%s.webm' % profile) + video_f = os.path.join(cache, profile) if not os.path.exists(video_f): print video_f extract.video(filename, video_f, profile, info) @@ -180,7 +180,7 @@ class Client(object): volumes[name]['available'] = False #profile = self.api.encodingProfile()['data']['profile'] - profile = '480p' + profile = '480p.webm' for name in volumes: if volumes[name]['available']: prefix = volumes[name]['path'] diff --git a/pandora_client/extract.py b/pandora_client/extract.py index d86217b..7dbab09 100644 --- a/pandora_client/extract.py +++ b/pandora_client/extract.py @@ -59,7 +59,6 @@ def video(video, target, profile, info): os.makedirs(fdir) dar = AspectRatio(info['video'][0]['display_aspect_ratio']) - profile_cmd = [] ''' look into lag @@ -71,6 +70,8 @@ def video(video, target, profile, info): bt? ''' + profile, format = profile.split('.') + if profile == '720p': height = 720 @@ -133,7 +134,7 @@ def video(video, target, profile, info): '-vb', '%dk'%bitrate, '-g', '%d' % int(fps*2), '-s', '%dx%d'%(width, height), '-aspect', aspect, - '-deinterlace', + '-vf', 'yadif', ] cmd = ['ffmpeg', '-y', '-threads', '2', '-i', video] \ + audio_settings \