|
|
@ -85,11 +85,13 @@ def prepare_download(form):
|
|
|
|
raise ValueError('Could not find start file')
|
|
|
|
raise ValueError('Could not find start file')
|
|
|
|
sources = sources[start_index:]
|
|
|
|
sources = sources[start_index:]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Super lazy: Limit to 5 source files input
|
|
|
|
|
|
|
|
sources = sources[:5]
|
|
|
|
|
|
|
|
|
|
|
|
# Seek into the first file
|
|
|
|
# Seek into the first file
|
|
|
|
ss = (form.start_time.data - sources[0]['start_time']).total_seconds()
|
|
|
|
ss = (form.start_time.data - sources[0]['start_time']).total_seconds()
|
|
|
|
|
|
|
|
|
|
|
|
# Let ffmpeg do the rest of the job
|
|
|
|
# Let ffmpeg do the rest of the job
|
|
|
|
# XXX Necessary to limit the concat files?
|
|
|
|
|
|
|
|
output_filename = '{}_{}.mp3'.format(form.start_time.data, form.length.data)
|
|
|
|
output_filename = '{}_{}.mp3'.format(form.start_time.data, form.length.data)
|
|
|
|
|
|
|
|
|
|
|
|
c = ['ffmpeg', '-y']
|
|
|
|
c = ['ffmpeg', '-y']
|
|
|
|