Fixes Issue #2 #4
@ -3,6 +3,7 @@ import json
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import logging
|
||||
|
||||
import requests
|
||||
from requests.auth import HTTPBasicAuth
|
||||
@ -23,6 +24,7 @@ class Mediasite:
|
||||
config['mediasite']['password'])
|
||||
self.chunk_size = 10485760 # 10MiB; seems optimal for speed
|
||||
# Tested 8k, 10MiB and 20MiB
|
||||
self.logger = logging.getLogger('play-daemon')
|
||||
|
||||
def pack(self, pres_id, queue_item):
|
||||
data = queue_item['data']
|
||||
@ -64,10 +66,11 @@ class Mediasite:
|
||||
demux_file = os.path.join(slides_path, 'demux.txt')
|
||||
with open(demux_file, 'w') as f:
|
||||
for slide in data['slides']:
|
||||
self.logger.info('Slide: {}'.format(slide))
|
||||
myslide = { 'url': os.path.join(slides_path, self._download(slides_path, slide['url'], session)),
|
||||
'duration': slide['time'] }
|
||||
'duration': slide['duration'] }
|
||||
f.write('file \'{}\'\n'.format(myslide['url']))
|
||||
f.write('duration {}\n'.format(slide['time']))
|
||||
f.write('duration {}\n'.format(slide['duration']))
|
||||
mypackage['slides'].append(myslide)
|
||||
|
||||
# to accomodate for an ffmpeg quirk that needs the last slide twice
|
||||
|
Loading…
x
Reference in New Issue
Block a user