PW Akshay

Generation

generate functionSun, 04 Dec 2022

stream m3u8 url to rtmp in python with pyffmpeg

import pyffmpeg ff = pyffmpeg.FFMpeg() stream = ff.open('http://example.com/live/channel1.m3u8') output = ff.open('rtmp://example.com:1935/live/channel1') while True: frame, val = stream.read() if val == 0: break output.write(frame)

Want to kickstart your project?Use the new AI Studio to create your code