sistason / rtmp_stream_delayer

Uses ffmpeg and nginx to delay (buffer) an incoming rtmp-stream for an amount of time.
GNU General Public License v2.0
42 stars 12 forks source link

Having trouble getting this to work #5

Closed rameshliyanage closed 4 years ago

rameshliyanage commented 4 years ago

Hi. Been unable to get this to work. Cant understand what the issue seems to be. I merged the nginx.conf file and it runs without an error. Tried streaming to /delay and the stream goes successfully via OBS without an error. I can see a file being created inside /tmp/nginx. Tried switching ports, endpoints of the outgoing servers, etc but no stream comes after the delay scheduled. Nothing goes out to Twitch, YouTube for example. Any help is appreciated.

sistason commented 4 years ago

Hi, I did a complete rewrite, please check it again as it now produces logs :)

(now uses python3 and takes the stream_directory (default: /tmp/nginx) as argument. use -v for more logs)

rameshliyanage commented 4 years ago

Hi. Thanks for the update @sistason. I tried it on a fresh install with Python 3 but I run into the following error. Assuming I got the arguments correct. Thanks again for your work on this.

Just to be clear, the folder I run this in has the delayer_settings.py as well. I have merged your nginx.conf directly.

python rtmp_stream_delayer.py -v -w 120 /tmp/nginx

Traceback (most recent call last): File "rtmp_stream_delayer.py", line 182, in if check_running(PID_FILE): File "rtmp_stream_delayer.py", line 162, in check_running except FileNotFoundError: NameError: global name 'FileNotFoundError' is not defined

sistason commented 4 years ago

FileNotFoundError is an exception from python3.

By executing python, you run python2 or python3, depending on your default, which seems to be python2. Try to run it with python3 explicitly :)

Thanks for trying this out and hopefully using this.

rameshliyanage commented 4 years ago

Been testing and using this fine now for the past month or so. Just wanted to thank you on the support @sistason! I do have a follow up query regarding backup streams since I cant seem to get that to work. Maybe its best to close this and I could start a new thread for that? Thanks again for the support and hope this helps others in future too.

sistason commented 4 years ago

Please open another issue for this, as this will be much more of a feature request (...I admin I did not really test backup streams myself when building this 6 years ago^^)