Ok I've checked the 1945 trunk version and there is no problem when
broadcasting from Flex and also no frame dropping ;)
(wouldn't it be a good idea to update the final version or write somewhere that
such problems may occur?)
But still I can't add the live stream to the server playlist :/
I guess it may be something connected with the naming of the streams - because
a live stream doesn't have a publishedName (I guess) so the question is: what
should I type into the item.setName(...)? (I'm invoking it from the client-side
function with the name parameter)
my SS code:
public void switchStream(String nameOfTheNewStream){
SimplePlayItem item = new SimplePlayItem();
item.setStart(0);
item.setLength(100000);
item.setName(nameOfTheNewStream);
myServerStream.addItem(item);
myServerStream.next()
}
- or it may be something with the org.red5.server.stream.ServerStream part of
code:
/**
* Play a specific IPlayItem.
* The strategy for now is VOD first, Live second.
* Should be called in a synchronized context.
*
* @param item Item to play
*/
private void play(IPlayItem item) {
// Return if already playing
if (state != State.STOPPED) {
return;
}
// Assume this is not live stream
boolean isLive = false;
// Get provider service from Spring bean factory
IProviderService providerService = (IProviderService) getScope()
.getContext().getBean(IProviderService.BEAN_NAME);
msgIn = providerService.getVODProviderInput(getScope(), item.getName());
if (msgIn == null) {
msgIn = providerService.getLiveProviderInput(getScope(), item
.getName(), true);
isLive = true;
}
if (msgIn == null) {
log
.warn("ABNORMAL Can't get both VOD and Live input from providerService");
return;
}
state = State.PLAYING;
currentItem = item;
sendResetMessage();
if (isLive) {
if (item.getLength() >= 0) {
liveJobName = scheduler.addScheduledOnceJob(item.getLength(),
new IScheduledJob() {
/** [EMAIL PROTECTED] */
public void execute(ISchedulingService service) {
synchronized (ServerStream.this) {
if (liveJobName == null) {
return;
}
liveJobName = null;
onItemEnd();
}
}
});
}
} else {
long start = item.getStart();
if (start < 0) {
start = 0;
}
sendVODInitCM(msgIn, (int) start);
startBroadcastVOD();
}
}
I would very very appreciate your help;)
Thanks in advance,
stf
----- Original Message -----
From: "Dan Rossi" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, May 03, 2007 5:29 PM
Subject: Re: [Red5] adding a live stream to the PlayList (on theserver-side)-
how??
>I think he is talking about the drop frames problems on live video, or
> the sendbuffer setting issue aswell for vod buffering, both were fixed
> just after the last rc release so are still in trunk :)
>
> Steven Gong wrote:
>> Ok, I will try this out later. I have tried this functionality before
>> 0.6 final release and didn't get any problem.
>>
>> On 5/3/07, *Stanislaw Fiedor* < [EMAIL PROTECTED] <mailto:[EMAIL
>> PROTECTED]>>
>> wrote:
>>
>> I mean the VOD in ServerStream
>>
>> ----- Original Message -----
>> *From:* Steven Gong <mailto:[EMAIL PROTECTED]>
>> *To:* [email protected] <mailto:[email protected]>
>> *Sent:* Thursday, May 03, 2007 4:58 PM
>> *Subject:* Re: [Red5] adding a live stream to the PlayList (on
>> theserver-side)- how??
>>
>>
>>
>> On 5/3/07, *Stanislaw Fiedor* <[EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]>> wrote:
>>
>> Hi Steven,
>> I already add the live stream to the playlist after the
>> live stream is published.. but it doesn't work (with 0.6rc2).
>>
>> With 0.6final while playing the VOD stream from the
>> playlist the audio is there but the video looks like some
>> snapshots :/ you can't even call it video, it looked MUCH
>> better with 0.6rc2.
>>
>>
>> You mean the VOD in ServerStream or VOD in a normal subscriber
>> stream?
>>
>> (adding the live stream to the playlist doesn't work on
>> 0.6final)
>>
>> There are also some problems when broadcastig from Flex -
>> the video is also crappy...
>>
>> Any idea why?
>>
>>
>>
>>
>> ----- Original Message -----
>> *From:* Steven Gong <mailto:[EMAIL PROTECTED]>
>> *To:* [email protected] <mailto:[email protected]>
>> *Sent:* Thursday, May 03, 2007 2:06 PM
>> *Subject:* Re: [Red5] adding a live stream to the
>> PlayList (on theserver-side) - how??
>>
>> stf,
>> I think you'd better add the live stream when it's
>> been published. To achieve that, you can put the
>> serverStream.addItem() call in streamPublishStart()
>> callback from IStreamAwareScopeHandler. This interface
>> can be implemented by your Application class.
>>
>> On 5/3/07, *Stanislaw Fiedor* <[EMAIL PROTECTED]
>> <mailto:[EMAIL PROTECTED]> > wrote:
>>
>> Hi!
>> I need to add a live stream (that is not being
>> recorded) to a playlist on
>> the server-side - but there is a problem with it..
>> When it comes to prerecorded streams there is no
>> problem when I do it like
>> that:
>>
>> serverStream =
>> StreamUtils.createServerStream(appScope, "live0");
>> SimplePlayItem item = new SimplePlayItem();
>> item.setStart(0);
>> item.setLength(10000);
>> item.setName("on2_flash8_w_audio");
>> serverStream.addItem(item);
>> .......
>> item = new SimplePlayItem();
>> item.setStart(20000);
>> item.setLength(10000);
>> item.setName("on2_flash8_w_audio");
>> serverStream.addItem(item);
>> serverStream.start();
>>
>> But if I try to add a live stream:
>>
>> item = new SimplePlayItem();
>> //item.setStart(20000);
>> //item.setLength(10000);
>>
>>
>> item.setName("the_name_of_the_live_stream_which_is_the_same_as_the_publish_name_of_the_stream");
>>
>> serverStream.addItem(item);
>>
>> Then red5 can't find the stream and doesn't add it
>> to the playlist.
>>
>> But if i publish the live stream and record it
>> then it works.
>>
>> Of course I would like to add the stream also when
>> it's not being recorded.
>>
>> So if you know how to manage it I would be very
>> thankful for your help.
>> (It is very urgent :/)
>>
>> Best Regards
>> stf
>>
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> [email protected] <mailto:[email protected]>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>>
>>
>> --
>> I cannot tell why this heart languishes in silence. It
>> is for small needs it never asks, or knows or
>> remembers. -- Tagore
>>
>> Best Regards
>> Steven Gong
>>
>> ------------------------------------------------------------------------
>> _______________________________________________
>> Red5 mailing list
>> [email protected] <mailto:[email protected]>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> [email protected] <mailto:[email protected]>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>>
>>
>> --
>> I cannot tell why this heart languishes in silence. It is for
>> small needs it never asks, or knows or remembers. -- Tagore
>>
>> Best Regards
>> Steven Gong
>>
>>
>> ------------------------------------------------------------------------
>> _______________________________________________
>> Red5 mailing list
>> [email protected] <mailto:[email protected]>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> [email protected] <mailto:[email protected]>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>>
>>
>> --
>> I cannot tell why this heart languishes in silence. It is for small
>> needs it never asks, or knows or remembers. -- Tagore
>>
>> Best Regards
>> Steven Gong
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Red5 mailing list
>> [email protected]
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
> _______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org