Welcome, Guest
  • Author Topic: Working with two Flash Media Servers  (Read 5329 times)

    willie

    • Jr. Programmer
    • **
    • Posts: 61
      • View Profile
      • Email
    Working with two Flash Media Servers
    « on: 07/25/07, 12:24 »
    Hi,

    I am working with two FMS, one is used to record video and the other is to allow people to view the cameras live from outside the firewall. When the cameras are recording the infrormation is going to the local FMS to save on bandwidth . When someone wants to see the cameras in realtime they are connecting to the FMS I use from influxis (a FMS provider). This does not work. Whenever I have my local FMS running all rtmps are going to it even though the live feeds are clearly set to the influxis FMS. If I stop the local FMS then the live information goes out to influxis's FMS. Why is this and how do I work with one local and one non-local FMS?

    Thanks,

    waffe

    Andresss

    • Systems Administrator
    • *****
    • Posts: 738
    • check me out at www.asb-labs.com/blog
      • View Profile
      • asb-labs
      • Email
    Re: Working with two Flash Media Servers
    « Reply #1 on: 07/25/07, 14:02 »
    hey hi willie!!! well make sure you are using different ports, ports may affect the transmission, because only one service is allowed per port

    cheers!!!
    halemos de flash en español!....wondering about crazy flash experiments?

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Working with two Flash Media Servers
    « Reply #2 on: 07/25/07, 17:17 »
    Has the local server a public IP? How's the connection string from your movies. If they point to Influxis server, there's no way to reach the local server. Also Influxis server should act as a single client, then forward request to many clients ... if this server just forward the request to the local server, then you should modify your setup

    Jorge

    willie

    • Jr. Programmer
    • **
    • Posts: 61
      • View Profile
      • Email
    Re: Working with two Flash Media Servers
    « Reply #3 on: 07/26/07, 00:43 »
    Well I changed the ports on my local FMS and it does not seem to have solved the problem. This is how I connect to the FMS servers:

    Live / influxis connection:
    aNCLive = new NetConnection();
    aNCLive.connect("rtmp://influxis.rtmphost.com/servcam/securityCamLive"+i+"/_definst_");

    Local connection recording to local hard drive:
    aNcFMS = new NetConnection();
    aNcFMS.connect("rtmp://192.168.0.78:1934/servcam/cam"+i);

    I changed the port number of my local FMS to 1934 and added it to the rtmp connect but it does not seem to make a difference. When I look at the FMS consoles my live cams are connected to influxes and the recording streams are connecting to my local machine, but when I look at the bandwidth of the live FMS it shows there is none.

    I just noticed when I do an nmap on the linux box that has the FMS, it does not show there is a port 1934 or 1935 for that matter being used, even though it is streaming from this local machine. 

    ?

    waffe

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Working with two Flash Media Servers
    « Reply #4 on: 07/26/07, 01:22 »
    I guess the clients can't access the local network IP since is not public ... or your target audience are intranet users? If that the case, don't worry about bandwidth, usually 10/100 Ethernet connection do the job

    Jorge

    Andresss

    • Systems Administrator
    • *****
    • Posts: 738
    • check me out at www.asb-labs.com/blog
      • View Profile
      • asb-labs
      • Email
    Re: Working with two Flash Media Servers
    « Reply #5 on: 07/26/07, 21:51 »
    hey hi again willie!! i see you have an IP behind a proxy, Jorge is right clients won't access your local server unless you use a true internet IP, if you can see this page http://home you can change your IP from there if you can't then you should find a way to set your IP as public....

    cheers!!!
    halemos de flash en español!....wondering about crazy flash experiments?

    willie

    • Jr. Programmer
    • **
    • Posts: 61
      • View Profile
      • Email
    Re: Working with two Flash Media Servers
    « Reply #6 on: 07/27/07, 00:23 »
    Thanks to the both of you for your input! ;D

    I think there is a slight discrepancy in the way you two see what I am trying to do (because I am still figuring out what the problem is). The local FMS that holds the .flvs does not need to be accessed from the outside world. This FMS is there so people on the inside of the firewall (intranet) can view the recorded material. I like this method because there is no internet bandwidth I have to account for. The influxes FMS is there only to allow people to view the security cameras in real time.

    This is the part of my setup that does not work:
    If I have the cams set up to record locally and also stream to influxes, the live streams do not work - even though I see bandwidth being used from the influxes FMS console. Now, if I change the flash code so both the recording stream and the live stream point to influxes everything works. Also, if I point the recording stream and the live stream to my local FMS and forward port 1935 from my router that is connected to the internet, to my local FMS, everything works. It only stops streaming to the influxes servers when I am connecting to both FMS – local and influxes.

    Wow that was a mouth full – hope it makes a little more sense.

    waffe
    « Last Edit: 07/27/07, 00:27 by willie »

    willie

    • Jr. Programmer
    • **
    • Posts: 61
      • View Profile
      • Email
    Re: Working with two Flash Media Servers
    « Reply #7 on: 07/29/07, 02:18 »
    AH!!!!! Victory is mine :D ;D :D

    OK - that took alittle to long but I think it will be worth it.

    First, the rtmp port on the local machine must be changed - I used 1934.

    aNcFMS.connect("rtmp://192.168.0.78:1934/servcam/cam"+i);

    Next for the live connect

    aNcFMSLive.connect("rtmp://influxis.rtmphost.com/servcam/securityCamLive"+i+"/_definst_");

    I basically did this two days ago but it was other factors that made it so diffecult to work.

    I was having sandbox errors from an .xml file that was connecting via an IP address. The fix was using a domain name that resolved to the IP address of my machine verses the the IP address numbers. Also when loading the swfs in a browser verses flash I needed to use the domain name instead of the domain name numbers. Example - don't use 39.48.23.94 - use a name like bigcam.com that resolves to 39.48.23.94.

    And last, when running the camers I cannot publish and view them from the same machine. This is not a probelm because one machine is the security cam terminal and the others are just the cam views, realtime or stored.

    Hope it helps the next chap looking to set up web cams with two FMS - willie out!
    « Last Edit: 07/29/07, 02:23 by willie »

    Andresss

    • Systems Administrator
    • *****
    • Posts: 738
    • check me out at www.asb-labs.com/blog
      • View Profile
      • asb-labs
      • Email
    Re: Working with two Flash Media Servers
    « Reply #8 on: 07/29/07, 02:28 »
    congrats!!! i am not a working guy with FMS so i think this is so great achievement :)
    halemos de flash en español!....wondering about crazy flash experiments?