Support Edge or forward to the Douyu platform.
yangchar opened this issue · comments
Douyu push stream address:
rtmp://send1.douyu.com/live/3455056rTfTqkuKRwsSecret=1c010114d48d8cd7dec686bdb705ec30&wsTime=5a3d1733&wsSeek=off
Error code location:
30696 amf0 read undefined marker failed. ret=2003
TRANS_BY_GPT3
The librtmp inside SRS has issues when integrating with other platforms. Currently, it can only be integrated with SRS and nginx-rtmp.
TRANS_BY_GPT3
Please provide detailed logs or packet captures. It seems that there is some information in the AMF0 object returned by the Douyu server that cannot be parsed.
TRANS_BY_GPT3
SRS is configured as Edge, for example:
listen 1935;
max_connections 1000;
pid objs/edge.pid;
daemon off;
srs_log_tank console;
vhost __defaultVhost__ {
mode remote;
origin send3a.douyu.com;
}
Alternatively, it can be configured as Forwarder as well:
listen 1935;
max_connections 1000;
pid ./objs/srs.master.pid;
daemon off;
srs_log_tank console;
vhost __defaultVhost__ {
forward send3a.douyu.com;
}
Use FFMPEG to push the stream to SRS, replace the token with your token:
token="wsSecret=xxxxxxxxx&wsTime=xxxxx&wsSeek=off&wm=0&tw=0" &&
ffmpeg -re -i doc/source.200kbps.768x320.flv -c copy -f flv -y \
"rtmp://127.0.0.1/live/5426598rVrGUlcxm?$token"
Watch in Douyu room:
TRANS_BY_GPT3
@yangchar please re-export srslibrtmp and test if it works. If there are any issues, reopen this issue.
TRANS_BY_GPT3