scivision / PyLivestream

Pure Python FFmpeg-based live video / audio streaming to YouTube, Facebook, Periscope, Twitch, and more
Apache License 2.0
707 stars 156 forks source link

FileGlobLivestream opens a stream for each file #77

Closed Mikulskii closed 2 years ago

Mikulskii commented 2 years ago

Hello! The script works fine, but there is a problem for me: When playing a list of files via the FileGloblivestream /playlist twitch -glob "*.mp4" -loop command, then when starts playing the next video file from the list, the broadcast restarts. Is there any way around this?

Ubuntu 20.04, ffmpeg 4, Python 3.9

Ch41r05 commented 1 year ago

Hi @Mikulskii , did you solve the issue you reported? If yes, how did you go about it? I'm encountering the same problem, given that looking at the python code I understand the stream is reset for each file.

Mikulskii commented 1 year ago

@Ch41r05 Hi! I closed this issue, because among the solved ones I found that this script is not focused on playlists. As a result, I use the ffplayout script: https://github.com/ffplayout

Ch41r05 commented 1 year ago

@Mikulskii thanks for the prompt response! Would you mind sharing what solution you implemented? I made my own fork where I fixed this issue by using a playlist generated at runtime from all files, eventually filtered by glob, present in the given folder. What doesn't work with this approach is randomization and captions.

Mikulskii commented 1 year ago

@Ch41r05 I'm not a programmer, just a user. n general, I use ffplayout-script: https://github.com/ffplayout to randomly play videos from a folder. Check it out. Maybe you will find something useful from the code. I wrote a post on my blog about how I set up everything and use it: https://mikulski.rocks/how-i-made-my-stream-radio-24-7/