2012-11-20 17 views
2

我在CentOS上成功安装了red5服务器。也就是说,演示oflaDemo正在运行文件prometheus.mp4和JWplayer没有问题。但是,当我把另一个MP4文件在地方像这样的:WARN o.r.s.net.rtmpt.BaseRTMPTConnection - 编码后响应缓冲区为空

http://content.bitsontherun.com/videos/nhYDGoyh-kNspJqnJ.mp4

播放器加载很慢,只显示视频的几秒钟。在red5日志文件中,我看到多个警告“响应缓冲区在编码后为空”,如下所示。试了几个其他的MP4文件,所有相同的结果。对mp4文件有特殊要求吗?或者我错过了一个特定的视频解码器?或者它在red5中是个问题?欢迎任何提示!

 
2012-11-20 15:49:55,261 [Red5_Scheduler_Worker-2] INFO o.red5.server.net.rtmp.RTMPHandler - Connecting to: [[email protected] Depth = 1, Path = '/default', Name = 'oflaDemo'] 
2012-11-20 15:49:55,264 [Red5_Scheduler_Worker-2] INFO org.red5.demos.oflaDemo.Application - W3C x-category:session x-event:connect c-ip:37.251.89.8 c-client-id:0 
2012-11-20 15:49:55,265 [Red5_Scheduler_Worker-2] INFO org.red5.demos.oflaDemo.Application - oflaDemo appConnect 
2012-11-20 15:49:55,360 [http-0.0.0.0-5080-exec-4] INFO o.r.s.n.r.codec.RTMPProtocolDecoder - Action createStream 
2012-11-20 15:49:55,507 [Red5_Scheduler_Worker-4] INFO o.red5.server.net.rtmp.RTMPHandler - Remembering client buffer on stream: 2000 
2012-11-20 15:49:55,556 [http-0.0.0.0-5080-exec-2] INFO o.r.s.n.r.codec.RTMPProtocolDecoder - Action play 
2012-11-20 15:49:56,052 [pool-5-thread-1] INFO org.red5.demos.oflaDemo.Application - W3C x-category:stream x-event:play c-ip:37.251.89.8 x-sname:29295add-1dcc-4d74-b5e1-c7cd34c2b5c1 
2012-11-20 15:49:56,837 [Red5_Scheduler_Worker-1] INFO org.red5.io.mp4.MP4Atom - Apple flag?: appl 
2012-11-20 15:49:56,867 [Red5_Scheduler_Worker-1] WARN org.red5.io.mp4.impl.MP4Reader - Skipping video frame with invalid position 
2012-11-20 15:49:57,531 [pool-5-thread-1] INFO org.red5.demos.oflaDemo.Application - W3C x-category:stream x-event:play c-ip:37.251.89.8 x-sname:29295add-1dcc-4d74-b5e1-c7cd34c2b5c1 x-name:mp4: 
demo2.mp4 
2012-11-20 15:50:34,376 [pool-5-thread-4] WARN o.r.s.net.rtmpt.BaseRTMPTConnection - Response buffer was null after encoding 
2012-11-20 15:50:34,398 [pool-5-thread-4] WARN o.r.s.net.rtmpt.BaseRTMPTConnection - Response buffer was null after encoding 
2012-11-20 15:50:34,410 [pool-5-thread-4] WARN o.r.s.net.rtmpt.BaseRTMPTConnection - Response buffer was null after encoding 
[etc] 

回答

1

,你可以到以下几点: 使用FFMPEG阅读每例MP4秒速度的精确比特率和框架,然后你的视频转换为完全相同的设置。

看来的确如同Red5在您提供的格式中存在mp4问题。但是,你应该首先找出mp4的例子和你的例子之间的区别。 FFMPEG应该使你能够做到这一点。

塞巴斯蒂安

+0

而且您正在使用RTMPT,什么不是首先尝试使用RTMP? –

+0

感谢您指点我ffmpeg,尽管我无法找到格式上的差异,可以澄清我的问题。但经过Google搜索之后,我发现使用red5进行流式处理的帧率必须保持不变。因此,我安装了ffmpeg并将视频转换为以下选项,其中选项“-vsync 1”将强制固定帧速率: -async 1 -vsync 1 -vcodec libx264 -r 24 -vpre fast -b 726k 现在视频正在播放,虽然不像原来那么流畅,但这可能与其他设置有关。不管怎么说,还是要谢谢你! – user1839424

+0

MP4阅读器已在以后的版本中重构,应该更有效地运行。如果它仍然可用,我会测试你的视频。 –