print less
This commit is contained in:
parent
8874598ef5
commit
5486f6868e
2 changed files with 6 additions and 4 deletions
9
edit.py
9
edit.py
|
@ -43,17 +43,18 @@ def sort_clips(clips, sort):
|
|||
if __name__ == '__main__':
|
||||
import sys
|
||||
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.signin(**credentials)
|
||||
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 = []
|
||||
subtitles = []
|
||||
position = 0
|
||||
for clip in sort_clips(edit['clips'], 'year'):
|
||||
for clip in sort_clips(edit['clips'], sort_by):
|
||||
|
||||
part_pos = 0
|
||||
for i, duration in enumerate(clip['durations']):
|
||||
|
|
|
@ -54,6 +54,7 @@ for clip in edit:
|
|||
]
|
||||
cmd = [
|
||||
'ffmpeg',
|
||||
'-nostats', '-loglevel', 'error',
|
||||
'-ss', str(clip['in']),
|
||||
'-i', clip['path']
|
||||
] + options + [
|
||||
|
|
Loading…
Reference in a new issue