google-code-export / red5

Automatically exported from code.google.com/p/red5
0 stars 0 forks source link

I use JAVA capture screen then into H264 encoded video, sent rtmp, but I saw the movie will be delayed for 2 seconds, much like the recorded video playback, rather than real-time streaming #444

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.You can set according to this picture
https://docs.google.com/file/d/0Bx3lBHD5BXi-V0hSV3U3d0pLZGc/edit

2.Here download java executable file and then go to red5 publish, you can see
https://docs.google.com/file/d/0Bx3lBHD5BXi-Rk9QNHpFdlhyUXM/edit

3.my code
https://docs.google.com/file/d/0Bx3lBHD5BXi-c2xROU45Z1ZFeWM/edit?usp=sharing

What is the expected output? What do you see instead?

I use JAVA capture screen then into H264 encoded video, sent rtmp, but I saw 
the movie will be delayed for 2 seconds, much like the recorded video playback, 
rather than real-time streaming

What version of the product are you using? On what operating system?

win7
red5 1.0

Original issue reported on code.google.com by eggeggeg@gmail.com on 26 Sep 2013 at 12:08

GoogleCodeExporter commented 9 years ago
Take out the Thread.sleep portion first to see how fast you can publish; then 
check your output buffering.

Original comment by mondain on 27 Sep 2013 at 7:00

GoogleCodeExporter commented 9 years ago
Make sure you're not buffering 2 seconds on the publish side.

Original comment by mondain on 6 Oct 2013 at 12:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i don't know how to publish to download..
but i set buffering 0 seconds

i guess Picture encoding a movie want to spend two seconds ? 

Original comment by eggeggeg@gmail.com on 6 Oct 2013 at 3:55

GoogleCodeExporter commented 9 years ago
i use ffmpeg download streams no lag and vlc publish screen also no lag 
i don't know why 
is my code problem or red5?

Original comment by eggeggeg@gmail.com on 7 Oct 2013 at 3:38

GoogleCodeExporter commented 9 years ago
I'm not exactly sure what the difference is, but I use output buffering and a 
few other properties when I use Xuggler. Here is some of the code i use: 

format.setOutputFormat("flv", uri, null);
container.setInputBufferLength(0);
coder = 
stream.getStreamCoder();    coder.setStandardsCompliance(IStreamCoder.CodecStandard
sCompliance.COMPLIANCE_EXPERIMENTAL);
coder.setPixelType(IPixelFormat.Type.YUV420P);
coder.setFlag(IStreamCoder.Flags.FLAG_QSCALE, true);
coder.setNumPicturesInGroupOfPictures(fps * 10);
coder.setGlobalQuality(0);

Original comment by mondain on 18 Apr 2014 at 3:09