Skip to main content
February 27, 2011
Question

Help, publish live stream(H.264) to FMS(NetStream.Buffer.Empty)

  • February 27, 2011
  • 1 reply
  • 1231 views

Hi,

I am developing a C++ program to connect FMS via RTMP, and then publish a live stream

I can't use FMLE here because I need collect the H.264 NALU from somewhere and forward them to the FMS.

I write a demo app, which parses H.264 encoded FLV file, and send the VideoTag in the FLV as RTMP Message content for publishing.

Finally, I make it run and I can see some frames of video!

But the problem is: The video does not play smoothly and it just updates some frames.

Then I looked at the NetStream event and found that:

Everytime when there is a NetStream.Buffer.Full event, the frame in the video is updated and display correctly.

But immediately there is another NetStream.Buffer.Empty event followed and the video is frozen.

This happens every several seconds as below.

22:08:00:104 - Playback - NetStream.Buffer.Full

22:08:00:357 - Playback - NetStream.Buffer.Empty

22:08:03:631 - Playback - NetStream.Buffer.Full

22:08:03:774 - Playback - NetStream.Buffer.Empty

22:08:06:989 - Playback - NetStream.Buffer.Full

22:08:07:106 - Playback - NetStream.Buffer.Empty

22:08:10:356 - Playback - NetStream.Buffer.Full

22:08:10:605 - Playback - NetStream.Buffer.Empty

22:08:15:960 - Playback - NetStream.Buffer.Full

22:08:15:356 - Playback - NetStream.Buffer.Empty

22:08:19:761 - Playback - NetStream.Buffer.Full

22:08:19:889 - Playback - NetStream.Buffer.Empty

22:08:24:239 - Playback - NetStream.Buffer.Full

22:08:24:355 - Playback - NetStream.Buffer.Empty

22:08:28:753 - Playback - NetStream.Buffer.Full

22:08:28:856 - Playback - NetStream.Buffer.Empty

22:08:33:725 - Playback - NetStream.Buffer.Full

22:08:34:106 - Playback - NetStream.Buffer.Empty

22:08:38:444 - Playback - NetStream.Buffer.Full

22:08:38:772 - Playback - NetStream.Buffer.Empty

22:08:43:139 - Playback - NetStream.Buffer.Full

22:08:43:606 - Playback - NetStream.Buffer.Empty

22:08:48:105 - Playback - NetStream.Buffer.Full

22:08:48:222 - Playback - NetStream.Buffer.Empty

22:08:52:723 - Playback - NetStream.Buffer.Full

22:08:52:957 - Playback - NetStream.Buffer.Empty

22:08:57:573 - Playback - NetStream.Buffer.Full

22:08:57:689 - Playback - NetStream.Buffer.Empty

22:09:02:740 - Playback - NetStream.Buffer.Full

22:09:02:306 - Playback - NetStream.Buffer.Empty

22:09:07:789 - Playback - NetStream.Buffer.Full

22:09:08:220 - Playback - NetStream.Buffer.Empty

22:09:18:250 - Playback - NetStream.Buffer.Full

22:09:18:524 - Playback - NetStream.Buffer.Empty

I don't know where the problem is.

Why NetStream.Buffer.Empty happens?

I know this is some kind of questions for protocol details but I can't find a better forum to post.

Thanks

    This topic has been closed for replies.

    1 reply

    February 28, 2011

    I have resolved this issue, caused by timestamps