print less

This commit is contained in:
j 2017-08-10 14:56:11 +02:00
parent 8874598ef5
commit 5486f6868e
2 changed files with 6 additions and 4 deletions

View file

@ -43,17 +43,18 @@ def sort_clips(clips, sort):
if __name__ == '__main__': if __name__ == '__main__':
import sys import sys
edit_id = sys.argv[1] edit_id = sys.argv[1]
if len(sys.argv) > 2:
sort_by = sys.argv[2]
else:
sort_by = 'year'
api = ox.API(base_url + '/api/') api = ox.API(base_url + '/api/')
api.signin(**credentials) api.signin(**credentials)
edit = api.getEdit(id=edit_id)['data'] edit = api.getEdit(id=edit_id)['data']
with open('%s_info.json' % normalize(edit_id), 'w') as fd:
json.dump(edit, fd, indent=4, ensure_ascii=False)
videos = [] videos = []
subtitles = [] subtitles = []
position = 0 position = 0
for clip in sort_clips(edit['clips'], 'year'): for clip in sort_clips(edit['clips'], sort_by):
part_pos = 0 part_pos = 0
for i, duration in enumerate(clip['durations']): for i, duration in enumerate(clip['durations']):

View file

@ -54,6 +54,7 @@ for clip in edit:
] ]
cmd = [ cmd = [
'ffmpeg', 'ffmpeg',
'-nostats', '-loglevel', 'error',
'-ss', str(clip['in']), '-ss', str(clip['in']),
'-i', clip['path'] '-i', clip['path']
] + options + [ ] + options + [