pedroSG94 / RootEncoder

RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP, SRT and UDP with all code written in Java/Kotlin
Apache License 2.0
2.57k stars 776 forks source link

Does the URL parameter not support Chinese characters #1570

Closed Moyout closed 2 months ago

Moyout commented 2 months ago

RTMP URL :

rtmp://192.168.238.182:1935/live/100044?userId=100044&authToken=118d595cf5fb505e191aa502374e46b3&roomTitle=1234中文

When there are Chinese characters in the URL of my RTMP, it will cause an exception :

Invalid character found in the request target 
[/rtmp/live/start?app=live&flashver=FMLE/3.0%20(compatible%3B%20Lavf57.56&swfurl=&tcurl=rtmp://192.168.238.182:1935/live&pageurl=&addr=192.168.238.182&clientid=2&call=publish&name=100044&
type=live&userId=100044&
authToken=118d595cf5fb505e191aa502374e46b3&
roomTitle=12340xe50xae0x8c0xe50x850xa80xe60x810xb60xe80xb60xa30xe50x910xb30xe50x930xa6
......
pedroSG94 commented 2 months ago

Hello,

I tested that url (obviously I replaced only the ip) with the new parser implementation and it is working fine. Are you using the last commit to test it?

pedroSG94 commented 2 months ago
2024-09-05 19:52:23.411 24025-24353 CommandsManager         com.pedro.streamer                   I  send Command(name='connect', transactionId=1, timeStamp=0, streamId=0, data=[AmfString value: connect, AmfNumber value: 1.0, AmfObject properties: {AmfString value: app=AmfString value: live, AmfString value: flashVer=AmfString value: FMLE/3.0 (compatible; Lavf57.56.101), AmfString value: tcUrl=AmfString value: rtmp://192.168.0.191:1935/live, AmfString value: objectEncoding=AmfNumber value: 0.0}], bodySize=149)
2024-09-05 19:52:23.424 24025-24353 CommandsManager         com.pedro.streamer                   I  read WindowAcknowledgementSize(acknowledgementWindowSize=2500000)
2024-09-05 19:52:23.424 24025-24353 CommandsManager         com.pedro.streamer                   I  read SetPeerBandwidth(acknowledgementWindowSize=2500000, type=DYNAMIC)
2024-09-05 19:52:23.425 24025-24353 CommandsManager         com.pedro.streamer                   I  read SetChunkSize(chunkSize=65536)
2024-09-05 19:52:23.425 24025-24353 RtmpClient              com.pedro.streamer                   I  chunk size configured to 65536
2024-09-05 19:52:23.427 24025-24353 CommandsManager         com.pedro.streamer                   I  read Command(name='_result', transactionId=1, timeStamp=0, streamId=0, data=[AmfString value: _result, AmfNumber value: 1.0, AmfObject properties: {AmfString value: fmsVer=AmfString value: LNX 9,0,124,2, AmfString value: capabilities=AmfNumber value: 31.0}, AmfObject properties: {AmfString value: level=AmfString value: status, AmfString value: code=AmfString value: NetConnection.Connect.Success, AmfString value: description=AmfString value: Connection succeeded., AmfString value: objectEncoding=AmfNumber value: 0.0}], bodySize=190)
2024-09-05 19:52:23.428 24025-24353 CommandsManager         com.pedro.streamer                   I  send Command(name='releaseStream', transactionId=2, timeStamp=0, streamId=0, data=[AmfString value: releaseStream, AmfNumber value: 2.0, AmfNull, AmfString value: 100044?userId=100044&authToken=118d595cf5fb505e191aa502374e46b3&roomTitle=1234中文], bodySize=113)
2024-09-05 19:52:23.428 24025-24353 CommandsManager         com.pedro.streamer                   I  send Command(name='FCPublish', transactionId=3, timeStamp=0, streamId=0, data=[AmfString value: FCPublish, AmfNumber value: 3.0, AmfNull, AmfString value: 100044?userId=100044&authToken=118d595cf5fb505e191aa502374e46b3&roomTitle=1234中文], bodySize=109)
2024-09-05 19:52:23.429 24025-24353 CommandsManager         com.pedro.streamer                   I  send Command(name='createStream', transactionId=4, timeStamp=0, streamId=0, data=[AmfString value: createStream, AmfNumber value: 4.0, AmfNull], bodySize=25)
2024-09-05 19:52:23.429 24025-24353 RtmpClient              com.pedro.streamer                   I  success response received from connect
2024-09-05 19:52:23.573 24025-24353 CommandsManager         com.pedro.streamer                   I  read Command(name='_result', transactionId=4, timeStamp=0, streamId=0, data=[AmfString value: _result, AmfNumber value: 4.0, AmfNull, AmfNumber value: 1.0], bodySize=29)
2024-09-05 19:52:23.574 24025-24353 CommandsManager         com.pedro.streamer                   I  send Command(name='publish', transactionId=5, timeStamp=0, streamId=1, data=[AmfString value: publish, AmfNumber value: 5.0, AmfNull, AmfString value: 100044?userId=100044&authToken=118d595cf5fb505e191aa502374e46b3&roomTitle=1234中文, AmfString value: live], bodySize=114)
Moyout commented 2 months ago

The version I am using is this:

implementation "com.github.pedroSG94.RootEncoder:library:591f882147"

Hello,

I tested that url (obviously I replaced only the ip) with the new parser implementation and it is working fine. Are you using the last commit to test it?

Moyout commented 2 months ago

I understand, maybe I don't support the RTMP NGINX module, sorry to bother you

Hello,

I tested that url (obviously I replaced only the ip) with the new parser implementation and it is working fine. Are you using the last commit to test it?

pedroSG94 commented 2 months ago

I understand, maybe I don't support the RTMP NGINX module, sorry to bother you

Hello, I tested that url (obviously I replaced only the ip) with the new parser implementation and it is working fine. Are you using the last commit to test it?

I tested using MediaMTX server

Moyout commented 2 months ago

I understand, maybe I don't support the RTMP NGINX module, sorry to bother you

Hello, I tested that url (obviously I replaced only the ip) with the new parser implementation and it is working fine. Are you using the last commit to test it?

I tested using MediaMTX server

okay, thank you