ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.72k stars 5.28k forks source link

RTMP: Response accurate error when rejecting OBS. #4037

Closed winlinvip closed 2 months ago

winlinvip commented 2 months ago

alexanderh5453: Same error is present when trying to stream to a Twitch server

If use invalid key publishing to twitch.tv, failed with message:

Image

No special error message sent from twitch.tv to OBS:

Image

twitch-obs-fail.pcapng.zip twitch-obs-ok.pcapng.zip

SRS responsed the onStatus(NetStream.Publish.Start) message before close the TCP connection when hooks failed, which cause the OBS reconnecting again and again.

srs.obs.fail.pcapng.zip

But please note that twitch.tv never response error message, and OBS/FFmpeg never handle the error message.