2

I have installed the red5 server on CentOS successfully. That is, the demo oflaDemo is running with file prometheus.mp4 and JWplayer without problems. But when I put another mp4 file in place like this one:

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

the player is loading very slowly and only shows a few seconds of the video. In the red5 log file I see multiple warnings "Response buffer was null after encoding" as listed below. Tried several other mp4 files, all the same result. Are there specific requirements for the mp4 files? Or do I miss a specific video-decoder? Or is it a problem within red5? Any hints are welcome!

2012-11-20 15:49:55,261 [Red5_Scheduler_Worker-2] INFO  o.red5.server.net.rtmp.RTMPHandler - Connecting to: [WebScope@6f51b1b7 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]
user1839424
  • 251
  • 1
  • 4

1 Answers1

1

You could to the following: Use FFMPEG to read the exact bitrate and frame per seconds rate of the example MP4, and then convert your videos to exactly the same settings.

It seems indeed like Red5 has issues with the mp4 in the format that your provided. However you should first find out the differences between the example mp4's that work and your ones. FFMPEG should enable you to do that.

Sebastian

seba.wagner
  • 3,668
  • 3
  • 22
  • 47
  • And you are using RTMPT, what not trying with RTMP first? – seba.wagner Nov 21 '12 at 07:47
  • Thanks for pointing me to ffmpeg, although I couldn't find a difference in format in the first place which could clarify my problems. But after googling around I found out that the frame rate must be constant for streaming with red5. So I installed ffmpeg and converted the video with the following options where option "-vsync 1" will force a constant frame rate: -async 1 -vsync 1 -vcodec libx264 -r 24 -vpre fast -b 726k Now the video is playing, although not so smooth as the original, but that has probably to do with other settings. Thanks anyway! – user1839424 Nov 22 '12 at 11:07
  • The MP4 reader has been refactored in later versions and should operate more effectively. I'll test your video if its still available. – Paul Gregoire Mar 11 '13 at 16:01