Program to stream m3u8 urlto rtmp in python using GStreamer .
def stream_m3u8_to_rtmp(m3u8_url, rtmp_url): Gst.init([]) playbin = Gst.ElementFactory.make("playbin", "playbin") playbin.set_property('uri', m3u8_url) playbin.set_property('buffer-size', 20 * 1024 * 1024) playbin.set_property('buffer-duration', 20 * Gst.SECOND) playbin.set_property('latency', 20 * Gst.SECOND) playbin.set_property('connection-speed', 1000) playbin.set_property('timeout', 1000000000) playbin.set_property('buffer-mode', 2) playbin.set_property('ring-buffer-max-size', 10 * 1024 * 1024) playbin.set_property('max-lateness', -1) # Add RTMP sink sink = Gst.ElementFactory.make('rtmpsink', 'sink') sink.