harlanc / xiu

A simple,high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS).🦀
https://www.rustxiu.com
MIT License
1.61k stars 168 forks source link

Xiu - Complex Handshake Failed - When rtmp connection from OBS #23

Closed koolquark closed 1 year ago

koolquark commented 1 year ago

Hi,

I just tried to setup HLS streaming using Xiu from OBS. Encountered the following error while trying to connect rtmp from OBS to Xiu

  cargo run application/xiu/src/config/config_rtmp_hls.toml 
   .... 
  Finished dev [unoptimized + debuginfo] target(s) in 0.06s
  Running `target/debug/xiu application/xiu/src/config/config_rtmp_hls.toml`
[2022-07-21T09:34:11Z INFO  hls::server] Hls server listening on http://0.0.0.0:8080
[2022-07-21T09:34:11Z INFO  rtmp::rtmp] Rtmp server listening on tcp://0.0.0.0:1935

[2022-07-21T09:34:27Z INFO  rtmp::handshake::handshake_server] [ S<-C ] [complex handshake] read C0C1
[2022-07-21T09:34:27Z WARN  rtmp::handshake::handshake_server] complex handshake failed.. err:bytes read error: not enough bytes to read

[2022-07-21T09:34:27Z INFO  rtmp::handshake::handshake_server] [ S<-C ] [simple handshake] read C0C1
[2022-07-21T09:34:27Z INFO  rtmp::rtmp] session exits, session_type: server, app_name: , stream_name: 
^Croot@ayg-cgw-csl1:~/xiu# 

Config File : config_rtmp_hls.toml

#live server configurations
#######################################
#   RTMP configurations(stand-alone)  #
#######################################
[rtmp]
enabled = true
port = 1935

######################################
#    HLS configurations              #
######################################
[hls]
enabled = true
port = 8080

#######################################
#   LOG configurations                #
#######################################
[log]
level = "debug"

I am using the master branch .

Commit (Master) : commit b1e95b76c796296da168feec6105c61598fd79ca   
koolquark commented 1 year ago

The capture screenshot is here Xiu is listening on 10.120.0.200:1935

image

koolquark commented 1 year ago

Pcap is here xiu-1935-rtmp-in.pcapng.zip

harlanc commented 1 year ago

Thanks for your report, pull the latest code and try again?

koolquark commented 1 year ago

Tried with latest code

commit : 8f62fe0ccdab9950bd82b20775e9dcc207d3f8bd 

It's woking fine.

Thanks