Macromedia Flash Server - Cant play recorded FLV file

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > April 2005 > Cant play recorded FLV file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Cant play recorded FLV file
Michael Kønig

2005-04-27, 5:45 pm

I have a very simple pice of code that records an flv and saves it on my
server. The file is saved in a folder called
myIP/recordVideo/streams/myVideo/ which is decided fromnetConnection.

I just cant play it afterwards!!

Below are the two pices of code, can anyone tell me why it wont play. Does
it have something to do with the parameter in the netConnection call??

///////////////
//Record FLV
///////////////

_global.connString = "rtmp://myIP/recordVideo/myVideo";
doConnect = function () {
client_nc = new NetConnection();
client_nc.onStatus = ncStatus;
client_nc._tl = this;
nc_infoObj.connString = connString;
client_nc.connect(connString);
};
ncStatus = function (nsObj) {
if (nsObj.code == "NetConnection.Connect.Success") {
this._tl.startCam();
}
};
startCam=function(){
var active_cam:Camera = Camera.get();
client_cam = active_cam;
client_cam.onStatus = nsStatus;
live_send.attachVideo(client_cam);
//
output = new NetStream(client_nc);
output.attachVideo(client_cam);
output.publish("myRecordedFile", "record");
}
doConnect();

/////////////////
//PLAY FLV
/////////////////

_global.connString = "rtmp://myIP/recordVideo/myVideo";
doConnect = function () {
client_nc = new NetConnection();
client_nc._tl = this;
nc_infoObj.connString = connString;
client_nc.connect(connString);
};
ncStatus = function (nsObj) {
if (nsObj.code == "NetConnection.Connect.Success") {
this._tl.startCam();
}
};
startCam = function () {
var my_ns:NetStream = new NetStream(my_nc);
live_send.attachVideo(my_ns);
my_ns.play("myRecordedFile", 0, -1, false);
}

________________________________________
_________________________
Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Stefan Richter

2005-04-27, 5:45 pm

You shouldn't use 2 nc's, 1 is enough.

Apart from that you are using startCam twice (2 functions with identical
name). Rename the second function and try again.

Stefan



> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org=20
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of=20
> Michael K=F8nig
> Sent: 27 April 2005 15:54
> To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> Subject: [FlashComm] Cant play recorded FLV file
>=20
> I have a very simple pice of code that records an flv and=20
> saves it on my server. The file is saved in a folder called=20
> myIP/recordVideo/streams/myVideo/ which is decided fromnetConnection.
>=20
> I just cant play it afterwards!!
>=20
> Below are the two pices of code, can anyone tell me why it=20
> wont play. Does it have something to do with the parameter in=20
> the netConnection call??
>=20
> ///////////////
> //Record FLV
> ///////////////
>=20
> _global.connString =3D "rtmp://myIP/recordVideo/myVideo";
> doConnect =3D function () {
> client_nc =3D new NetConnection();
> client_nc.onStatus =3D ncStatus;
> client_nc._tl =3D this;
> nc_infoObj.connString =3D connString;
> client_nc.connect(connString);
> };
> ncStatus =3D function (nsObj) {
> if (nsObj.code =3D=3D "NetConnection.Connect.Success") {
> this._tl.startCam();
> }
> };
> startCam=3Dfunction(){
> var active_cam:Camera =3D Camera.get();
> client_cam =3D active_cam;
> client_cam.onStatus =3D nsStatus;
> live_send.attachVideo(client_cam);
> //
> output =3D new NetStream(client_nc);
> output.attachVideo(client_cam);
> output.publish("myRecordedFile", "record"); } doConnect();
>=20
> /////////////////
> //PLAY FLV
> /////////////////
>=20
> _global.connString =3D "rtmp://myIP/recordVideo/myVideo";
> doConnect =3D function () {
> client_nc =3D new NetConnection();
> client_nc._tl =3D this;
> nc_infoObj.connString =3D connString;
> client_nc.connect(connString);
> };
> ncStatus =3D function (nsObj) {
> if (nsObj.code =3D=3D "NetConnection.Connect.Success") {
> this._tl.startCam();
> }
> };
> startCam =3D function () {
> var my_ns:NetStream =3D new NetStream(my_nc);
> live_send.attachVideo(my_ns);
> my_ns.play("myRecordedFile", 0, -1, false); }
>=20
> ________________________________________
_________________________
> F=E5 alle de nye og sjove ikoner med MSN Messenger=20
> http://messenger.msn.dk/
>=20
>=20
> =3D-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D-----------------------------------------------------------
>=20
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20



=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Michael Kønig

2005-04-27, 5:45 pm

sorry - its two different fla files with each their script....

>From: "Stefan Richter" <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org>
>Reply-To: FlashComm Mailing List <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
>To: "'FlashComm Mailing List'" <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
>Subject: RE: [FlashComm] Cant play recorded FLV file
>Date: Wed, 27 Apr 2005 16:01:55 +0100
>
>You shouldn't use 2 nc's, 1 is enough.
>
>Apart from that you are using startCam twice (2 functions with identical
>name). Rename the second function and try again.
>
>Stefan
>
>
>
>
>
>=-----------------------------------------------------------
>Supported by Fig Leaf Software - http://www.figleaf.com
>=-----------------------------------------------------------
>
>To change your subscription options or search the archive:
>http://chattyfig.figleaf.com/mailman/listinfo/flashcomm


________________________________________
_________________________
Log på MSN Messenger direkte fra nettet http://webmessenger.msn.com/


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Stefan Richter

2005-04-27, 5:45 pm

In the second one you are using my_nc to create the NS=20
var my_ns:NetStream =3D new NetStream(my_nc);

but your NC is actually called client_nc=20
client_nc =3D new NetConnection();

Stefan



[vbcol=seagreen]
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org=20
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of=20
> Michael K=F8nig
> Sent: 27 April 2005 16:10
> To: flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> Subject: RE: [FlashComm] Cant play recorded FLV file
>=20
> sorry - its two different fla files with each their script....
>=20
> saves it=20
> fromnetConnection.


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Michael Kønig

2005-04-27, 5:45 pm

Thats right, piced some differnet code together.
However i changed it and it still doesnt work...

Are my paths correct in my netconnection?
Is there a way to get some kind of error readings?


>From: "Stefan Richter" <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org>
>Reply-To: FlashComm Mailing List <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
>To: "'FlashComm Mailing List'" <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
>Subject: RE: [FlashComm] Cant play recorded FLV file
>Date: Wed, 27 Apr 2005 16:21:19 +0100
>
>In the second one you are using my_nc to create the NS
>var my_ns:NetStream = new NetStream(my_nc);
>
>but your NC is actually called client_nc
>client_nc = new NetConnection();
>
>Stefan
>
>
>
>
>
>
>=-----------------------------------------------------------
>Supported by Fig Leaf Software - http://www.figleaf.com
>=-----------------------------------------------------------
>
>To change your subscription options or search the archive:
>http://chattyfig.figleaf.com/mailman/listinfo/flashcomm


________________________________________
_________________________
Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com