[Red5devs] ServerStream lagging problem

Muyen muyen_lee at hotmail.com
Tue Oct 21 19:22:02 PDT 2008


Hi,

I'm trying to use ServerStream to publish audio mp3 or flv to flash. I can hear the music playing but it seams to be lagging.


>From the console, I found the following message.

org.red5.server.stream.consumer.ConnectionConsumer - Skipping message with negative timestamp.

I think somehow, the ServerStream calc the timestamp wrong causing it to have negative value and skip some of the message to be published.
I'm not sure about this.

I searched the web and found some posts that describe the same problem. 

I'm wondering is it a bug or there is a work around for this? or is there some problem with my code?

Thanks in advance.

my code

IServerStream serverStream = StreamUtils.createServerStream(scope, publishName);
  
  String fileName = "bb.mp3";
  
  SimplePlayItem playItem = new SimplePlayItem();
  playItem.setName(fileName);

  
  playItem.setStart(0);

  IProviderService providerService = (IProviderService) scope.getContext().getBean(IProviderService.BEAN_NAME);
  if (providerService != null) {
       File file = providerService.getVODProviderFile(scope, fileName);
       if (file != null) {
            playItem.setSize(file.length());
       } else {
            log.debug("File was null, this is ok for live streams");
       }
      } else {
       log.debug("ProviderService was null");
      }

  serverStream.addItem(playItem);
    
  serverStream.start();


Best Regards,

Muyen



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5devs_osflash.org/attachments/20081022/b9a2ad11/attachment.html 


More information about the Red5devs mailing list