简体   繁体   中英

Stream a video file using RTMP protocol to an rtmp server using Python

can anyone guide me to do the mentioned above? basically what i want:

A python script that will stream a single video file to an RTMP Server (in my case nginx), to the link:

rtmp://<ip>/stream/<stream_name>

So, ideally the video file will be streamed with a <Stream_name> . Next i want this stream_name to be generated in a series, for example: stream_1, stream_2,....stream_n . Then i would want the stream link: rtmp://<ip>/stream/<stream_name> being pushed n times , but in each iteration, the stream name is incremented from "stream_1" to "stream_2" and so on .

I am currently struggling to find the right library to do this in python.

Thanks in advance!

The key in here is FFMpeg. Use any suitable wrapper of FFMpeg based on your needs. Here is the first one in Google: https://pypi.org/project/python-ffmpeg-video-streaming/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM