[Red5] Stream Not Closed FLV File
Homero Thomsom
homerothomsom at gmail.com
Fri Oct 27 09:19:22 EDT 2006
Hello, excuse if I am insistent, but I need to know this detail for a
possible development.
I have a process that generate a FLV File in certain directory. This file
is used by Red5 for server streaming. The detail is that the FLV file is not
closed and it grows continuously.
This is a fragment of the Red5 Server Code:
serverStream = StreamUtils.createServerStream (appScope, "liveX");
SimplePlayItem item = new SimplePlayItem();
item.setStart(0);
item.setLength(200000);
item.setName("dynamic.flv");
serverStream.addItem(item);
serverStream.start();
Another solution is using the getStreamLength and addItem, like this:
serverStream = StreamUtils.createServerStream (appScope, "liveX");
String fileName = "dynamic.flv";
int fileLength = getStreamLength(fileName);
log.info("first fileLength: " + fileLength );
SimplePlayItem item = new SimplePlayItem();
item.setStart(0);
item.setLength(fileLength);
item.setName(fileName);
serverStream.addItem(item);
serverStream.start();
// In another Thread or Timer Event
while (true)
{
fileLength = getStreamLength(fileName);
log.info("fileLength: " + fileLength );
SimplePlayItem item = new SimplePlayItem();
item.setStart(lastLength);
item.setLength(fileLength);
item.setName(fileName);
serverStream.addItem(item);
lastLength = fileLength;
}
The problem with that is that the "getStreamLength" funtion always returns
the first value.
first fileLength: 300
fileLength: 300
fileLength: 300
...
Thank you verry much!!!!
HT. BA, Argentina.
---------- Forwarded message ----------
From: Homero Thomsom < homerothomsom at gmail.com>
Date: Oct 26, 2006 12:39 AM
Subject: Stream FLV File while it grows
To: Red5 at osflash.org
Hi
I have the following code:
serverStream = StreamUtils.createServerStream (appScope, "liveX");
SimplePlayItem item = new SimplePlayItem();
item.setStart(0);
item.setLength(200000);
item.setName("dynamic.flv");
serverStream.addItem(item);
serverStream.start();
Another process has open the file and adds frames to this.
The objective is that the file is Streamed while is modified by the other
process.
Some idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20061027/e76e089d/attachment-0001.htm
More information about the Red5
mailing list