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

Livestreaming for hours instead of seconds? #68

Closed TheBotlyNoob closed 2 years ago

TheBotlyNoob commented 3 years ago

I need to use hours. But because the python library only supports seconds I have to multiply the number of hours by 3600 to get the number of seconds. But then ffmpeg throws: Invalid duration specification for t: And tons of 1's.

btw my code is:

import pylivestream.api as pls
def livestream(hours):
    hours *= 3600
    pls.stream_screen(r"path\to\ini\pylivestream.ini", "youtube", assume_yes = True, timeout = hours)
scivision commented 2 years ago

You don't have to specify timeout=. It might be a limitation of FFmpeg. So if you can, just omit the timeout= parameter