lal icon indicating copy to clipboard operation
lal copied to clipboard

streaming not working with restream app

Open kuabhish opened this issue 1 year ago • 8 comments

Hello @q191201771

I ran the lal server and tried to stream from restream web app. (https://studio.restream.io/) It does not work. Is there any way we can make it work?

kuabhish avatar Apr 20 '23 12:04 kuabhish

What's the meaning of streaming?

q191201771 avatar Apr 21 '23 02:04 q191201771

like we start stream from obs . (playing video )

kuabhish avatar Apr 21 '23 05:04 kuabhish

Does it use rtmp?

q191201771 avatar Apr 21 '23 12:04 q191201771

yes they use rtmp. i see this error when running lal server and stremaing from restream app.

2023/04/21 14:37:36.362542  INFO [RTMPPUBSUB1] lifecycle dispose rtmp ServerSession. err=lal.rtmp: too short to unmarshal amf0 data(amf0.go:229) - server_session.go:542
if len(b) < 1 {
		return "", 0, nazaerrors.Wrap(base.ErrAmfTooShort)
	}

what is the significance of this error.. and why should we check for this condition?

kuabhish avatar Apr 21 '23 14:04 kuabhish

Send me the whole completed log.

q191201771 avatar Apr 22 '23 02:04 q191201771

2023/04/24 10:31:56.236502  INFO accept a rtmp connection. remoteAddr=172.17.0.1:59616 - server.go:97
2023/04/24 10:31:56.236812 DEBUG [NAZACONN1] lifecycle new connection. net.Conn=0x40000ac2f0, naza.Connection=0x40002ae000 - connection.go:192
2023/04/24 10:31:56.245250  INFO [RTMPPUBSUB1] lifecycle new rtmp ServerSession. session=0x40002b8000, remote addr=172.17.0.1:59616 - server_session.go:112
2023/04/24 10:31:56.245858 DEBUG handshake complex mode. - handshake.go:248
2023/04/24 10:31:56.246331  INFO [RTMPPUBSUB1] < R Handshake C0+C1. - server_session.go:196
2023/04/24 10:31:56.246354  INFO [RTMPPUBSUB1] > W Handshake S0+S1+S2. - server_session.go:198
2023/04/24 10:31:56.339836  INFO [RTMPPUBSUB1] < R Handshake C2. - server_session.go:206
2023/04/24 10:31:56.340373  INFO [RTMPPUBSUB1] < R connect('stream'). tcUrl=myurl - server_session.go:403
2023/04/24 10:31:56.340767  INFO [RTMPPUBSUB1] > W Window Acknowledgement Size 5000000. - server_session.go:407
2023/04/24 10:31:56.341544  INFO [RTMPPUBSUB1] > W Set Peer Bandwidth. - server_session.go:412
2023/04/24 10:31:56.341743  INFO [RTMPPUBSUB1] > W SetChunkSize 4096. - server_session.go:417
2023/04/24 10:31:56.342771  INFO [RTMPPUBSUB1] > W _result('NetConnection.Connect.Success'). - server_session.go:422
2023/04/24 10:31:56.442218 DEBUG [RTMPPUBSUB1] read command message, ignore it. cmd=releaseStream, header={Csid:3 MsgLen:39 MsgTypeId:20 MsgStreamId:0 TimestampAbs:0}, b=len(core)=128, rpos=25, wpos=39, hex=00000000  05 02 00 0a 6c 69 76 65  73 74 72 65 61 6d        |....livestream|
 - server_session.go:356
2023/04/24 10:31:56.442452 DEBUG [RTMPPUBSUB1] read command message, ignore it. cmd=FCPublish, header={Csid:3 MsgLen:35 MsgTypeId:20 MsgStreamId:0 TimestampAbs:0}, b=len(core)=128, rpos=21, wpos=35, hex=00000000  05 02 00 0a 6c 69 76 65  73 74 72 65 61 6d        |....livestream|
 - server_session.go:356
2023/04/24 10:31:56.442491  INFO [RTMPPUBSUB1] < R createStream(). - server_session.go:434
2023/04/24 10:31:56.442513  INFO [RTMPPUBSUB1] > W _result(). - server_session.go:435
2023/04/24 10:31:56.535261  INFO [RTMPPUBSUB1] lifecycle dispose rtmp ServerSession. err=lal.rtmp: too short to unmarshal amf0 data(amf0.go:229) - server_session.go:537
2023/04/24 10:31:56.535454 DEBUG [NAZACONN1] Close. - connection.go:376
2023/04/24 10:31:56.535508 DEBUG [NAZACONN1] close once. err=<nil> - connection.go:504

kuabhish avatar Apr 24 '23 10:04 kuabhish

found the issue.. the problem is coming in reading pubtype

pubType, err := stream.msg.readStringWithType()

if the pubtype is not sent.. then the error occurs. this is happening when the publish command is sent.

kuabhish avatar Apr 24 '23 14:04 kuabhish

I've handled this problem, try with the newest source code.

q191201771 avatar Apr 25 '23 14:04 q191201771