Set max RTMP chunk size to 64k for Youtube compatibility

This commit is contained in:
Thulinma 2017-11-09 15:58:02 +01:00
parent 3ea3721f59
commit bfe95d0bb3

View file

@ -99,7 +99,7 @@ namespace Mist{
} }
sendCommand(amfReply, 20, 0); sendCommand(amfReply, 20, 0);
} }
RTMPStream::chunk_snd_max = 10240000; //10000KiB RTMPStream::chunk_snd_max = 65536; //64KiB
myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1) myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1)
HIGH_MSG("Waiting for server to acknowledge connect request..."); HIGH_MSG("Waiting for server to acknowledge connect request...");
}else{ }else{
@ -603,7 +603,7 @@ namespace Mist{
app_name = amfData.getContentP(2)->getContentP("tcUrl")->StrValue(); app_name = amfData.getContentP(2)->getContentP("tcUrl")->StrValue();
reqUrl = app_name;//LTS reqUrl = app_name;//LTS
app_name = app_name.substr(app_name.find('/', 7) + 1); app_name = app_name.substr(app_name.find('/', 7) + 1);
RTMPStream::chunk_snd_max = 10240000; RTMPStream::chunk_snd_max = 65536; //64KiB
myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1) myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1)
myConn.SendNow(RTMPStream::SendCTL(5, RTMPStream::snd_window_size)); //send window acknowledgement size (msg 5) myConn.SendNow(RTMPStream::SendCTL(5, RTMPStream::snd_window_size)); //send window acknowledgement size (msg 5)
myConn.SendNow(RTMPStream::SendCTL(6, RTMPStream::rec_window_size)); //send rec window acknowledgement size (msg 6) myConn.SendNow(RTMPStream::SendCTL(6, RTMPStream::rec_window_size)); //send rec window acknowledgement size (msg 6)
@ -864,7 +864,7 @@ namespace Mist{
rtmpOffset = currentTime(); rtmpOffset = currentTime();
amfreply.getContentP(3)->addContent(AMF::Object("timecodeOffset", (double)rtmpOffset)); amfreply.getContentP(3)->addContent(AMF::Object("timecodeOffset", (double)rtmpOffset));
sendCommand(amfreply, playMessageType, playStreamId); sendCommand(amfreply, playMessageType, playStreamId);
RTMPStream::chunk_snd_max = 10240000; //10000KiB RTMPStream::chunk_snd_max = 65536; //64KiB
myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1) myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1)
//send dunno? //send dunno?
myConn.SendNow(RTMPStream::SendUSR(32, 1)); //send UCM no clue?, stream 1 myConn.SendNow(RTMPStream::SendUSR(32, 1)); //send UCM no clue?, stream 1
@ -925,7 +925,7 @@ namespace Mist{
amfreply.getContentP(3)->addContent(AMF::Object("timecodeOffset", (double)rtmpOffset)); amfreply.getContentP(3)->addContent(AMF::Object("timecodeOffset", (double)rtmpOffset));
} }
sendCommand(amfreply, playMessageType, playStreamId); sendCommand(amfreply, playMessageType, playStreamId);
RTMPStream::chunk_snd_max = 10240000; //10000KiB RTMPStream::chunk_snd_max = 65536; //64KiB
myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1) myConn.SendNow(RTMPStream::SendCTL(1, RTMPStream::chunk_snd_max)); //send chunk size max (msg 1)
//send dunno? //send dunno?
myConn.SendNow(RTMPStream::SendUSR(32, 1)); //send UCM no clue?, stream 1 myConn.SendNow(RTMPStream::SendUSR(32, 1)); //send UCM no clue?, stream 1