profile contains format now

This commit is contained in:
j 2011-02-06 18:13:50 +05:30
parent 210177c310
commit c623ee297b
2 changed files with 5 additions and 4 deletions

View file

@ -37,7 +37,7 @@ def encode(filename, prefix, profile):
print frame_f print frame_f
extract.frame(filename, frame_f, pos) extract.frame(filename, frame_f, pos)
frames.append(frame_f) 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): if not os.path.exists(video_f):
print video_f print video_f
extract.video(filename, video_f, profile, info) extract.video(filename, video_f, profile, info)
@ -180,7 +180,7 @@ class Client(object):
volumes[name]['available'] = False volumes[name]['available'] = False
#profile = self.api.encodingProfile()['data']['profile'] #profile = self.api.encodingProfile()['data']['profile']
profile = '480p' profile = '480p.webm'
for name in volumes: for name in volumes:
if volumes[name]['available']: if volumes[name]['available']:
prefix = volumes[name]['path'] prefix = volumes[name]['path']

View file

@ -59,7 +59,6 @@ def video(video, target, profile, info):
os.makedirs(fdir) os.makedirs(fdir)
dar = AspectRatio(info['video'][0]['display_aspect_ratio']) dar = AspectRatio(info['video'][0]['display_aspect_ratio'])
profile_cmd = []
''' '''
look into look into
lag lag
@ -71,6 +70,8 @@ def video(video, target, profile, info):
bt? bt?
''' '''
profile, format = profile.split('.')
if profile == '720p': if profile == '720p':
height = 720 height = 720
@ -133,7 +134,7 @@ def video(video, target, profile, info):
'-vb', '%dk'%bitrate, '-g', '%d' % int(fps*2), '-vb', '%dk'%bitrate, '-g', '%d' % int(fps*2),
'-s', '%dx%d'%(width, height), '-s', '%dx%d'%(width, height),
'-aspect', aspect, '-aspect', aspect,
'-deinterlace', '-vf', 'yadif',
] ]
cmd = ['ffmpeg', '-y', '-threads', '2', '-i', video] \ cmd = ['ffmpeg', '-y', '-threads', '2', '-i', video] \
+ audio_settings \ + audio_settings \