Groups | Blog | Home
all groups > macromedia flash flashcom > may 2005 >

macromedia flash flashcom : using FlashCom as a FLV Streaming Server


eric.johnson
5/5/2005 12:00:00 AM
Is it reasonable to use FlashCom as an FLV Streaming server? i'm using the
Progressive Download thats standard from the web server usage with Flash 7. Our
usage looks like it is really going to grow. Just curious if there is a simple
example of this. I've only installed the trial server so far...

Hope to get some good responses on this


Alexander B. Bokovikov
5/5/2005 12:00:00 AM
On Thu, 5 May 2005 03:57:16 +0000 (UTC), "eric.johnson"
[quoted text, click to view]

Streaming of media of any type always has at least two advatages:

a) smart navigation (viewer don't need to download the whole file in
order to see its middle/final part -- he/she just navigates the stream
upto the piece of interest. Just a small time is required for
buffering -- usually few seconds of media file playback).

b) security (streaming media is not saved anywhere at client side --
it is buffered (see above) and is displayed immediately. Screen
capture is the only way for piracy here. And watermarks are enough
good protection against it).
choad_man
5/10/2005 12:00:00 AM
//HERE WOULD BE THE CLIENT SIDE CODE:

//CREATE A VIDEO OBJECT / DROP ONTO STAGE AND NAME IT my_video
this.connection_nc = new NetConnection();
this.connection_nc.connect("[path to comm server(ex.rtmp://stream.my_site.com
or point to localhost)]/[application (ex. my_video_app)]",null);
this.instream_ns = new NetStream(this.connection_nc);
my_video.attachVideo(this.instream_ns);this.instream_ns.play("my_flv");//the
name of your flv - no extension
//use the netStream.seek(integer) to move back and forth between the file


//SERVER SIDE CODE IN YOUR MAIN.ASC
load("components.asc");
application.onConnect = function(newClient){//connect to the application
application.acceptConnection(newClient);
}

//NOTE -- WITHIN THE COMMSERVER/applications directory you will need to create
the my_video_app folder and place the main.asc file above - Also within the
my_video_app folder you will need to create a streams folder. Within the
streams folder you will need to create a _definst_ folder. It is here where
you will drop the flv.

//example paths -
// 1) applications/my_video_app/main.asc
// 2) applications/my_video_app/streams/_definst_/my_flv.flv

Hope this helps
eric.johnson
5/10/2005 12:00:00 AM
Thanks!

I appreciate the example and the information provided by this forum

de:jay
5/10/2005 12:00:00 AM
Hey choad_man,

I used the info you provided and i only get the first frame. Any ideas why it won't stream the rest of FLV? I can play it locally and it works but not from the FCS.

choad_man
5/10/2005 12:00:00 AM
No you don't need to target the main.asc but you should make sure that you have
connected to it. You can do this by putting a trace between the onConnect and
then viewing the trace in your live_log window of the appIspector (Window -
other panels - comm app inspector). From this you can also measure and detect
what streams are coming in and out. This should also tell you if you have
properly connected to the comserver and the proper version of the .flv.

EX.
load("components.asc");
application.onConnect = function(newClient){//connect to the application
trace("I CONNECTED");
application.acceptConnection(newClient);
}

Mess around a little bit with the this.ins_stream.seek(40);
See if you can advance frames.
You can also try this.in_stream.pause();// pauses and plays the video

If you do not see your application instance in the appInspector then you are
doing something wrong.
If you do not see your video as a stream then you are doing something wrong.

If this still doesn't help,
Let me know,

AddThis Social Bookmark Button