Esempio n. 1
0
def _generate_xml(rendition_id, keyframes, xml_path):
    template_path = os.path.join(os.path.dirname(__file__), 'metadata.xml')
    xml = Template(filename=template_path).render(renditionId=rendition_id,
                                                  keyframes=keyframes)
    fileutil.writefile(xml_path, xml)
Esempio n. 2
0
def generate_m3u8(m3u8_path, segments, segment_seconds, end=True):
    template_path = os.path.join(os.path.dirname(__file__), 'template.m3u8')
    m3u8 = Template(filename=template_path).render(segments=segments, segmentSeconds=segment_seconds, end=end)
    fileutil.writefile(m3u8_path, m3u8)
    
Esempio n. 3
0
def _generate_xml(rendition_id, keyframes, xml_path):
    template_path = os.path.join(os.path.dirname(__file__), 'metadata.xml')
    xml = Template(filename=template_path).render(renditionId=rendition_id, keyframes=keyframes)
    fileutil.writefile(xml_path, xml)
Esempio n. 4
0
def generate_m3u8(m3u8_path, segments, segment_seconds, end=True):
    template_path = os.path.join(os.path.dirname(__file__), 'template.m3u8')
    m3u8 = Template(filename=template_path).render(
        segments=segments, segmentSeconds=segment_seconds, end=end)
    fileutil.writefile(m3u8_path, m3u8)