This thread is for questions for the tutorial "Switching between two live streams on the client side".
Page: 1
Created on: 10/27/09 10:59 PM
Replies: 8
Graeme
Joined: 10/18/07
Posts: 1107
Robert
Joined: 08/16/09
Posts: 24
RE: Switching between two live streams on the client side
03/29/10 11:11 AM
Hey, great tutorial. Very clear.
I'm interested in that trick where you play files from the server. Where were your files stored? I don't seem to be able to get mine to play and I'm thinking maybe they have to go somewhere specific.
I have them in the following location:
applications/application_root/streams/_definst_
I then attempt to play them with the following server side code inside my onAppStart function:
this.stream1 = Stream.get("stream1");
this.stream2 = Stream.get("stream2");
this.stream1.play("1.flv");
this.stream2.play("2.flv");
I get connected to the app OK but ns.play("stream1"); produces no playback. Produces no errors client side or server side either. Do I have something wrong here?
Robert
Joined: 08/16/09
Posts: 24
alfonsofonso
Joined: 09/28/09
Posts: 3
RE: Switching between two live streams on the client side
04/27/10 3:04 AM
hi, thanks for this great tutorial,it's being very useful because here I'm trying to create a mixer switching live streams (4 or 5). I have two problems:
The green funky staff, it happens when I switch the stream.
and the second one:
Does the client recieve the five streams in his computer all the time or is he only recieving the one he is watching?, because if he is recieving all the streams, it'll be impossible because of the bandwidth. So I thougth, how can I switch the streams in the server side? ..so the client could see the mixing with a good quality...
thanx
alfonso
Graeme
Joined: 10/18/07
Posts: 1107
alfonsofonso
Joined: 09/28/09
Posts: 3
RE: Switching between two live streams on the client side
05/12/10 2:11 AM
hi Graeme, thanx&sorry, I'll try to explain myself better..
The problem is that the client needs more bandwidth when I stream 5 streams from fms instead of one. (I've been testing the processes of wireless conections).
I guess, it's because I switch the streams in the client part this way:
if (sharedObject.data.stream==1) {
myScreen.attachNetStream(line1.ns);
} else if (sharedObject.data.stream==2){
...
//where line1 is a connection class I've created
how could I reduce this bandwidth comsuption? how could I switch the streams in the server side?
thanx a lot
alfonsofonso
p.s.-with green funky staff I mean that when I switch from one stream to other in the video object, for one, two or five seconds (depending on the fps of the fmle) I see like green or pink pixeling at the video object, just like it happens to you at your tutorial (just for a sec). I should try what you said clearing the video object and then attaching the new stream but I almost like this effect, and I already didn't tryed it... :)
Graeme
Joined: 10/18/07
Posts: 1107
RE: Switching between two live streams on the client side
05/13/10 1:04 AM
Well, theoretically the client should only be receiving one stream, so I don't know how you'd reduce the bandwidth from that. To switch streams on the server side, just get the server to play a particular stream and have the clients just play that server side stream. They'll see whatever the server side stream is playing.
alfonsofonso
Joined: 09/28/09
Posts: 3
RE: Switching between two live streams on the client side
05/19/10 2:19 AM
hi Graeme,
I need the 5 live videos streaming in the server because there is a Control app that recieves them.
Then one person decides which one to be broadcasted to the client in each moment, changing the camera like in a TV show.
So how can I switch the streams in the server side? is it with the publish method?
thanx again.
alfonsofonso
Graeme
Joined: 10/18/07
Posts: 1107
RE: Switching between two live streams on the client side
05/20/10 11:27 AM
I thought I had a tutorial about this.. but I don't! That's a good candidate.
Anyways, essentially just use the play method of the stream object on the server side. Have the clients play the default stream that you create on the server side and tell the server side to play whatever file/live video stream you want. That will filter right through to the client because they will be playing the stream that is playing the choice video stream.
Does that make sense?
New Post
Please login to post a response.