live555: The input frame data was too large for our buffer size 解决方法
来源:互联网 发布:台账软件 编辑:程序博客网 时间:2024/05/16 08:56
在做live555 直播的时候,输入的图片尺寸是320*240 的时候,live555 输出的RTSP数据流可以正常解码,运行没有出现异常现象,但是把图片尺寸改为640*480的时候,就出现了问题:
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.)
这个问题的解决方式,在国外的一个网站找到了解决的方法,其原文如下:
/////////////////////////////////////////////BUFFER SIZE PROBLEM///////////////////////////////////////////////////////////
Generally, while running HD stream, one can face packet loss due to ridiculously large NAL units. This will create an error stating something like ->
“MultiFramedRTPSink::afterGettingFrame1(): The input frame data was too large for our buffer size (60753). 34086 bytes of trailing data was dropped! Correct this by increasing "OutPacketBuffer::maxSize" to at least 94839, *before* creating this 'RTPSink'. (Current value is 60000.)”
To solve this, you need to make the following changes to your code:
1. Go to “live/liveMedia/MultiFramedRTPsource.cpp” and change “increaseRecieveBufferTo(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)
与此同时,在我做的H264 直播工程中, 还需要设置const unsigned estimatedSessionBandwidth 的值,需要把它调到一个合适大小的值。
- live555: The input frame data was too large for our buffer size 解决方法
- Data for Source Column 3(’Col3’) is too large for the specified buffer size.
- "[TLIB Warning] Warning: library was too large for page size, rebuilt with page size 64"
- ERROR 1118 : Row size too large. The maximum row size for the used table type
- [MySQL 错误]ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B
- [MySQL 错误]ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B
- Value too large for defined data type
- Row size too large
- xsql---Buffer too small for record data
- [SoapUI]The maximum heap size (-Xmx) might be too large
- mysql 报错:Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65
- Row size too large (> 8126)
- gcc 编译错误 Value too large for defined data type
- Mysql 出现Error 1118 Row size too large. The maximum row size is 65535 的解决办法
- OpenStack Error – Index column size too large. The maximum column size is 767 bytes [Solved]
- Android N多窗口支持介绍
- elasticsearch查询原理
- 九度OJ Graduate Admission
- Android-解决ScrollView和ListView嵌套的问题
- [Spring boot] web应用返回jsp页面
- live555: The input frame data was too large for our buffer size 解决方法
- 实现前端图片排序,并将排序结果传给后台
- Java多态之引用类型转换
- C++实现文件查找可指定格式
- SpringDataJPA学习记录(一)--环境配置
- nodejs安装
- Win7如何解决telnet不是内部或外部命令的方案!
- 蕴涵,若A则B
- linux 把nginx加入到系统服务的方法