Coder Social home page Coder Social logo

Comments (6)

jprjr avatar jprjr commented on July 2, 2024

This is something I've had happen a few times, and it is really, really tricky.

So basically, if you get a network hiccup, you've got a few things that can happen:

  • The ffmpeg processes can die (I'm not sure what the default ffmpeg timeout is)
    • this is partially mitigated with version 11.1.0, since it will try to restart ffmpeg a few times
  • The RTMP module can decide that OBS has timed out, and close the connection

The RTMP module closing the connection causes the most frustration. When that happens and OBS eventually reconnects, the follow things happen:

  • The RTMP module calls "on-done", indicating the stream is over
  • It then immediately calls "on-publish", which triggers all the stream-setup stuff. On YouTube and Facebook, this can create a new event.

I think (though I'm not entirely sure) that this can be controlled a bit with the ping and ping_timeout directives, here: https://github.com/arut/nginx-rtmp-module/wiki/Directives#ping - but the behavior can still get pretty weird.

I'll have to experiment some more. It seems like shorter outages (<= 30 seconds) are fine now that ffmpeg will try restarting a few times.

from multistreamer.

pogzie avatar pogzie commented on July 2, 2024

OBS was able to recover, but none of the stream was unable. Let me know if you need more logs or info.

from multistreamer.

jprjr avatar jprjr commented on July 2, 2024

Yeah, I'm not sure what to do on this issue. I created short network hiccups (~10 seconds) and everything recovered fine. Any longer, it seems like no matter what combination of timeout, ping_timeout, etc -- either OBS never succesfully reconnects, or the RTMP module winds up calling "on-done" followed by "on-publish", which ends existing videos and starts new ones. I don't have a good way to detect a dropped connection vs somebody actually clicking "end stream" in OBS.

There's a bit of a work-around on the Facebook module - you can choose a pre-existing live video and uncheck "End live video when stream ends" - I wrote that specifically for a time I did a 24-hour marathon stream on Facebook, so I could disconnect/reconnect.

Implementing similar functionality in the YouTube module wouldn't be too hard. But for both the Facebook and YouTube modules, you'd have to create the event first on Facebook/YouTube, then log into Facebook/YouTube when you want the video to end instead of just ending the stream in OBS.

from multistreamer.

k1ck3r avatar k1ck3r commented on July 2, 2024

not sure if this helps you, but the issue can't be reproduced with Xsplit

from multistreamer.

pogzie avatar pogzie commented on July 2, 2024

This happened again when my network connection got knocked out. My PC (gaming, OBS) is separate from my Multistreamer server. I had to stop/start the stream from OBS.

I think the only info I got was I waited for it if it would recover but after a minute i decided to just restart the OBS stream.

from multistreamer.

jprjr avatar jprjr commented on July 2, 2024

I've been considering discontinuing this project for some time now. I'm sorry I couldn't solve your issue, but I just don't enjoy working on multistreamer anymore.

from multistreamer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.