Fixes Issue #2 #4
@ -65,12 +65,14 @@ class Mediasite:
|
||||
slides = []
|
||||
demux_file = os.path.join(slides_path, 'demux.txt')
|
||||
with open(demux_file, 'w') as f:
|
||||
elapsed = 0
|
||||
for slide in data['slides']:
|
||||
myslide = { 'url': os.path.join(slides_path, self._download(slides_path, slide['url'], session)),
|
||||
'duration': '{}ms'.format(slide['duration'])}
|
||||
'duration': '{}ms'.format(int(slide['duration'])-elapsed)}
|
||||
f.write('file \'{}\'\n'.format(myslide['url']))
|
||||
f.write('duration {}ms\n'.format(slide['duration']))
|
||||
f.write('duration {}\n'.format(myslide['duration']))
|
||||
slides.append(myslide)
|
||||
elapsed = int(slide(['duration']))
|
||||
|
||||
# to accomodate for an ffmpeg quirk that needs the last slide twice
|
||||
f.write('file \'{}\'\n'.format(slides[-1]['url']))
|
||||
|
@ -176,7 +176,7 @@ class _Worker:
|
||||
self.logger.debug("%s - Calling ffmpeg", package_id)
|
||||
start = time.time()
|
||||
(ffmpeg
|
||||
.input(demux_file, format='concat', safe=0, framerate=25)
|
||||
.input(demux_file, format='concat', safe=0)
|
||||
.filter('scale', height='min(in_h, {})'.format(maxheight), width=-2)
|
||||
.output(outpath, vcodec='libx264', crf=crf, preset=preset, vsync='vfr', movflags='+faststart', pix_fmt='yuv420p', c='copy')
|
||||
.overwrite_output()
|
||||
|
Loading…
x
Reference in New Issue
Block a user