采用Live555作为流媒体服务器端,进行RTSP的请求的时候,会出现如下的提示:
MultiFramedRTPSink::afterGettingFrame1(): The input frame data was too large for our buffer size (100452). 13457 bytes of trailing data was dropped! Correct this by increasing "OutPacketBuffer::maxSize" to at least 113457, *before* creating this ‘RTPSink‘. (Current value is 100000.)
To solve this, you need to make the following changes to your code:
1. Go to “live/liveMedia/MultiFramedRTPsource.cpp” and change “ increaseReceiveBufferTo(env, RTPgs->socketNum(), 2000000);”
2. go to “live/liveMedia/StreamParser.cpp” and increase BANK_SIZE to 300000 or 600000.
(This will also help remove StreamParser Error that you might encounter!)
3. In “live/liveMedia/MediaSink.cpp” change the value of unsigned OutPacketBuffer::max size to 600000.
4. In “mediaServer/DynamicRTSPServer.cpp”, change OutPacketBuffer::maxSize to 600000 at all places where it is defined.
5. *Most importantly, you need to change the code in your own program, more so than the libraries themselves. This means that if you just do what pt.5 tells you to, you can avoid pts 1-4. Therefore, in your code change OutPacketBuffer::maxsize to 600000 (Our code file is testH264VideoStreamer.cpp so we made the above change in that. Note: testH264VideoStreamer.cpp lies in testProgs directory). You NEED to change this value in your code before you create any RTP sinks.
6. Also to allow for more holistic changes, go to “testProgs/playCommon.cpp” and change the value of fileSinkBufferSize to 600000.
///////////////////////////////////////////////WHAT ELSE CAN BE DONE////////////////////////////////////////////////////////
It is more advisable to reduce the buffer size of your stream by increasing compression levels. Also you would need to increase the buffer size of vlc player to allow for smooth streaming. To do so, go to VLC-> Tools -> Preferences -> Select “Show All” -> Click on Stream Output -> Change “stream output muxer caching” to a suitable value in ms. (1500 - 3000)
参考
http://blog.csdn.net/li_wen01/article/details/59520914