Bug Report OBS doesn't try to auto reconnect stream :(

I run a stream 24/7 with OBS. About once a week my stream will die and when I check OBS it will say 0kb/s in the bottom right corner and the icon will be gray but it thinks it's still streaming. If I click stop stream, then start stream, it won't reconnect to the stream and OBS will continually disconnect and try and reconnect every 10 seconds. If I close OBS, fire it back up and click "start streaming" it'll connect to the stream first try and everything is peachy for another week or so.

Just some info about the stream:

HDMI 1080i59.94 with 16bit 48khz stereo input (Black Magic Intensity Pro), OBS spits out 540p30 2000kbps bitrate with 16bit 48khz AAC stereo audio at 320kbps. The target is a VPS server at dreamhost running NGINX RTMP edition.

OBS window when it's working properly:

obs_stream.jpg


I'll grab another screen cap (and fresh log) next time it messes up.

Any information you could provide would be great!

Thanks.

-Jamie M.
 

Attachments

  • 2014-03-04-1338-27.log
    7.1 KB · Views: 51
  • 2014-02-25-0246-13.log
    110.1 KB · Views: 42

Boildown

Active Member
If you ever get a crash log, be sure to post it up. I don't think anyone besides you is trying to stream 24/7/7 with OBS. I think you should just do pre-emptive restarts occasionally, but if you get a legit crash file, it could help the developers here.

You have a pretty unique system there. Which Xeon does it use? Your GPU is pretty old, and I haven't seen one of those sound cards in use in years (though they were great in their day, I have one somewhere).

Based on the content in the screenshot, you're probably not all that interested, but you could improve your stream by replacing your video card with something newer (a GTX 750 is fast and cheap). Also I question the wisdom of using 10000 buffer with 2000 bitrate. It probably really spikes the bandwidth you're sending to your viewers (unless your NGINX server is re-encoding anyways) and could be causing some of the unstable connection messages seen in your logs. Its generally better to use a buffer close to your bitrate, if not equal.
 
Boildown said:
If you ever get a crash log, be sure to post it up. I don't think anyone besides you is trying to stream 24/7/7 with OBS. I think you should just do pre-emptive restarts occasionally, but if you get a legit crash file, it could help the developers here.

You have a pretty unique system there. Which Xeon does it use? Your GPU is pretty old, and I haven't seen one of those sound cards in use in years (though they were great in their day, I have one somewhere).

Based on the content in the screenshot, you're probably not all that interested, but you could improve your stream by replacing your video card with something newer (a GTX 750 is fast and cheap). Also I question the wisdom of using 10000 buffer with 2000 bitrate. It probably really spikes the bandwidth you're sending to your viewers (unless your NGINX server is re-encoding anyways) and could be causing some of the unstable connection messages seen in your logs. Its generally better to use a buffer close to your bitrate, if not equal.
I don't think I've ever had it crash, ever? lol :( When it has the problem it doesn't crash, video is still playing in the preview window, still shows 30fps in the corner, just isn't spitting out any data.

How do I make OBS "start streaming" when I open it? If I can do that I can set up a program to kill it and restart it at 4am every morning because there's no problem cutting the stream about that time. The viewers/players will automatically re-connect to the stream, even if the stream key changes.

The computer has two Xeon CPU's in it. I know they are old school and they run hot as hell but not sure exactly which model/specs they are!! lol. They sure crunch video like a champ though! :)

xeon_cpu.png


Is there any use in upgrading the GPU? I don't even have a screen connected to this box, and as far as I understand it, OBS isn't using the GPU for anything the way I have it configured? The stream runs super smooth and nice with flawless quality at the moment, check it out: http://ecuflashking.com/OBS_1080i59_in_ ... _audio.flv (right click, save as. Play with VLC player.)

I captured that just now, with RTMPdump right from my live stream. I think it's REALLY good considering the settings and hardware I'm running on! Let me know what you think ;)

That sound card was mind blowing in its day. It had replaceable OpAmps so I put in all top of the line burr brown ones. I used to run 7.1 channel ANALOG audio from that card (talk about lots of cables!) to two separate amps (they didn't really have good 7.1 channel amps back then) and it was an insane setup. When 1080p came along and the GPU couldn't take it I just bought a media player box (aios) and got a new receiver/amp with HDMI and haven't really used this box since, hence why I recycled it for my video streaming :D It's got a 15k RPM SCSI raid array in it and a couple other drives so it's a pretty goofy setup for streaming right now. If I can get OBS/my streaming super stable I'll rip out all the drives and put in a single SSD. Should help it run cooler too as the air for the CPU's gets sucked through the hard drive rack at the front of the case to pre-heat it nicely :( lol.

Nginx only does re-streaming at the moment, no encoding or anything. In the future when I start streaming in 1080p I'd like nginx to encode multi streams (720p, 540p, etc.) but not sure if my VPS would have the power to do that.

I tried running Wirecast on this box but it just maxes all the CPU's at 100% and drops frames left right and center no matter how horrible I make the settings (even on Ultrafast). Identical encoder settings to OBS. Same problem with Adobe FMLE or whatever it's called.

I'm not sure how that 10000kb buffer setting got in there. I just set it to 2000 and restarted OBS so we'll see how that goes.

Thanks again for all your help! I'd really like to use this box for streaming, and it seems OBS is the only thing that likes it!

-Jamie M.
 

R1CH

Forum Admin
Developer
This is very strange, your log seems to show quite a few successful reconnects. A grey icon in the bottom right is supposed to mean 'connection in progress'. Do you have any firewall / security software that may be interfering with it?

You can also provide a full dump file which will be helpful to figure out what's happening. Next time OBS is stuck in the non-reconnecting state (ideally with the grey icon indicating a pending connection), right click OBS.exe in task manager and choose create dump file. Zip and upload that .dmp file to a site such as www.copy.com or www.zippyshare.com and PM the link to me (don't post it on the forum - it may contain sensitive information such as URLs and stream keys).
 
R1CH said:
This is very strange, your log seems to show quite a few successful reconnects. A grey icon in the bottom right is supposed to mean 'connection in progress'. Do you have any firewall / security software that may be interfering with it?

You can also provide a full dump file which will be helpful to figure out what's happening. Next time OBS is stuck in the non-reconnecting state (ideally with the grey icon indicating a pending connection), right click OBS.exe in task manager and choose create dump file. Zip and upload that .dmp file to a site such as http://www.copy.com or http://www.zippyshare.com and PM the link to me (don't post it on the forum - it may contain sensitive information such as URLs and stream keys).
If you look near the end of the large log file I attached you see a lot of:

Code:
13:37:50: librtmp error: RTMPSockBuf_Fill, recv returned -1. GetSockError(): 10053 (An established connection was aborted by the software in your host machine.)
13:37:50: Connection to rtmp://fake.dreamhostps.com:12345/fake failed: Could not access the specified channel or stream key.  This could be because the key/channel is invalid, or because the server still thinks you are logged in.
13:37:50: 
13:37:50: RTMPSockBuf_Fill, recv returned -1. GetSockError(): 10053 (An established connection was aborted by the software in your host machine.)
13:37:50:
And I think that's what it does right before it gets stuck on the gray icon and never tries to reconnect.

It's a fresh install of Windows 7 Ultimate x64 SP1. Only changes made after running Windows Update was to disable Windows Firewall and Windows Defender and install UltraVNC (no monitor connected to this box). No anti-virus, security or firewall software is installed on this computer.

I run pfSense as my main router and I know its firewall is tighter than a Nun on Sunday but I looked through its log files and no mention of the streaming computers name, ip or the RTMP port I'm using, so I don't think it's interfering.

The dump sounds good. Next time it messes up I'll create the dump and PM you the link (I can host it on my own server).

-Jamie M.
 

Boildown

Active Member
R1CH said:
it may contain sensitive information such as URLs and stream keys).
Is this true of regular crash dumps?

toysareforboys said:
Is there any use in upgrading the GPU? I don't even have a screen connected to this box, and as far as I understand it, OBS isn't using the GPU for anything the way I have it configured?
That would be true for a program like Handbrake (as far as I know), but OBS utilizes the video card to increase the encoding speed. This works because OBS is mostly used to stream games and gamers have good video cards.

OBS requires a DirectX 10 capable video card, and needs a certain level of speed out of it. I used to have a GTX 260 in my encoder box, and it lagged pretty bad: like you I could only manage Super Fast preset, and I really needed to use UltraFast to avoid duplicated frames. Same for when I borrowed my media center PC's GT630 (just for testing). A half-way decent video card does make a difference, but only to a point. After about the $100 dollar GPU range, OBS becomes CPU-bound. This equates to a GTX 650, not sure on the AMD side. I recommend the just-released GTX 750, which is just a few dollars more than the GTX 650, you'll save the price differential in electricity alone, and its faster.

But as I implied, even more than this doesn't really give better results in OBS. After about the low-mid tier of video cards, OBS becomes CPU bound and putting a GTX 780 won't have any added OBS benefit over a GTX 750 if you're just encoding and not gaming on it.
 
Boildown said:
OBS requires a DirectX 10 capable video card, and needs a certain level of speed out of it. I used to have a GTX 260 in my encoder box, and it lagged pretty bad: like you I could only manage Super Fast preset, and I really needed to use UltraFast to avoid duplicated frames.
Sweet, thanks for the info :) If it'd let me run "fast" preset so I could lower my bitrate but keep the same quality stream I'd be tempted to go for it, but I am a little worried about these ancient CPU's being the bottleneck even with a great GPU :(

R1CH said:
Next time OBS is stuck in the non-reconnecting state (ideally with the grey icon indicating a pending connection)
DONE! Amazingly OBS messed up only 12 mins after restarting it (with the 10000kb buffer moved down to 2000kb, was working fine but as per boildown's recommendation I changed it and restarted OBS just to make sure it applied). I've never had it mess up that quick before, it's usually only after about 5 or more days.

Screen cap:

obs_stream_broke.jpg


I tried the same things again. Click stop streaming, click start streaming, says it can't connect, then it tries to connect every 10 seconds over and over. As soon as I close OBS, re-open it, click start streaming, poof, connects instantly and stream is back up and running.

Super fresh log file is attached.

I PM'd you a link to the dump file (was 256mb zipped down to 77mb).

-Jamie M.
 

Attachments

  • 2014-03-05-0242-01.log
    17.2 KB · Views: 19

R1CH

Forum Admin
Developer
Thanks for the dump file. It seems the code to set a timeout on connection was not executing, so OBS sat there waiting forever for the server to respond. It's odd that stopping and starting wouldn't fix it though.

You can try the dev channel build (master) from https://builds.catchexception.org/#branch_master to see if it fixed it for you.
 
R1CH said:
Thanks for the dump file. It seems the code to set a timeout on connection was not executing, so OBS sat there waiting forever for the server to respond. It's odd that stopping and starting wouldn't fix it though.

You can try the dev channel build (master) from https://builds.catchexception.org/#branch_master to see if it fixed it for you.
I downloaded OBS-00.61.02-7ed9306-x64.7z (devchannel master) and unzipped it to a new folder, ran OBS and clicked start streaming and off it went.

I'll let you know when/if I have the same problem again :)

-Jamie M.
 
Well, looks like it's all fixed! Running for a week now, not one problem! It seems to use way less CPU than the previous version, even though it reports a bunch of dropped frames.

OBS_its_fixed.jpg


^^ check out that live time!!

I had a case fan in the computer fail 2 days into the test and when I tried to hot swap the fan the computer shut down so technically it's only been running 5 days since last reboot :)

-Jamie M.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Also, your mic appears to be having some issues. Do me a small favor and turn up "scene buffering time" in advanced to like 1000.
 
Jim said:
Also, your mic appears to be having some issues. Do me a small favor and turn up "scene buffering time" in advanced to like 1000.
I don't use the mic at all, should I disable the onboard soundcard in device manager or something, so OBS ignores it?

I turned up scene buffering to 1000 :)

-Jamie M.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
You can disable the mic in OBS' audio settings as well if you don't use it.
 
Top