Fixes Issue #2 #4
@ -53,6 +53,8 @@ class Mediasite:
|
|||||||
session.auth = self.auth
|
session.auth = self.auth
|
||||||
session.stream = True
|
session.stream = True
|
||||||
mypackage['thumb'] = self._download(base, data['thumb'], session)
|
mypackage['thumb'] = self._download(base, data['thumb'], session)
|
||||||
|
|
||||||
|
# Download video sources, and store the information with a local file path in mypackage for the transcoder
|
||||||
for source in data['sources']:
|
for source in data['sources']:
|
||||||
mysource = {'video': self._download(base, source['video'], session),
|
mysource = {'video': self._download(base, source['video'], session),
|
||||||
'poster': self._download(base, source['poster'], session),
|
'poster': self._download(base, source['poster'], session),
|
||||||
@ -73,6 +75,8 @@ class Mediasite:
|
|||||||
|
|
||||||
# loop all slides and download, calculate the duration and create a text file holding all the info for he ffmpeg demuxer
|
# loop all slides and download, calculate the duration and create a text file holding all the info for he ffmpeg demuxer
|
||||||
for i in range(num_slides):
|
for i in range(num_slides):
|
||||||
|
|
||||||
|
# Download the source file and change the url to a local file path
|
||||||
myslide['url'] = os.path.join(slides_path, self._download(slides_path, data['slides'][i]['url'], session))
|
myslide['url'] = os.path.join(slides_path, self._download(slides_path, data['slides'][i]['url'], session))
|
||||||
|
|
||||||
# Handle the different edgecases for indiviual slide duration
|
# Handle the different edgecases for indiviual slide duration
|
||||||
@ -90,6 +94,8 @@ class Mediasite:
|
|||||||
|
|
||||||
# to accomodate for an ffmpeg quirk that needs the last slide twice
|
# to accomodate for an ffmpeg quirk that needs the last slide twice
|
||||||
f.write('file \'{}\'\n'.format(slides[-1]['url']))
|
f.write('file \'{}\'\n'.format(slides[-1]['url']))
|
||||||
|
|
||||||
|
# put all the slides info in mypackage for the transcoder to rework into a mp4 video
|
||||||
mypackage['sources'].append({'demux_file': demux_file,
|
mypackage['sources'].append({'demux_file': demux_file,
|
||||||
'poster': slides[-1]['url'],
|
'poster': slides[-1]['url'],
|
||||||
'playAudio': False })
|
'playAudio': False })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user