lal
lal copied to clipboard
streaming not working with restream app
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?
What's the meaning of streaming?
like we start stream from obs . (playing video )
Does it use rtmp?
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?
Send me the whole completed log.
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
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.
I've handled this problem, try with the newest source code.