PW Akshay

Generation

generate functionThu, 02 Mar 2023

create a python program to stream video from m3u8 url to youtube using python-ffmpeg-video-streaming module (do not create function)(do not use subprocess)

from ffmpy import FFmpeg ff = FFmpeg( inputs={'http://89.238.150.70:7000/live/phdtv/phdtv/1234.ts': None}, outputs={'rtmp://a.rtmp.youtube.com/live2/[youtube_key]': '-c:v libx264 -c:a aac -strict experimental -f flv -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2"'} ) ff.run()

Questions about programming?Chat with your personal AI assistant