Professional Web Applications Themes

FMS/FLVPlayback - Macromedia Flash Flashcom

FMS is installed. I have my .flv file under my directory for the application. Trying to use the FLVPlayback in Flash 8 to call it using rtmp://myserver/myapp/_definst_/myvideo.flv. Publish and it just brings up a blank screen. never plays. I know the .flv file works ok. I can see it connecting to the FMS so I know that is working ok. My application does use UC/LC combination and i read something that says it might be a problem. Any help??? I have the main.asc file from the Flash8 components sample (although that does say it is for the old 1.5 server)....

  1. #1

    Default FMS/FLVPlayback

    FMS is installed. I have my .flv file under my directory for the application.
    Trying to use the FLVPlayback in Flash 8 to call it using
    rtmp://myserver/myapp/_definst_/myvideo.flv. Publish and it just brings up a
    blank screen. never plays. I know the .flv file works ok. I can see it
    connecting to the FMS so I know that is working ok. My application does use
    UC/LC combination and i read something that says it might be a problem. Any
    help??? I have the main.asc file from the Flash8 components sample (although
    that does say it is for the old 1.5 server).

    hml398 Guest

  2. #2

    Default Re: FMS/FLVPlayback

    hml398,
    Two things u need check for in the FLVPlayback component is the isLive setting
    (true fro streaming the FLV from FMS) and drop the flv extension in the
    contentPath param.

    Make sure your flv is stored under you streams/_definst_ direcotry for the
    conenction. Also, the FLVPlayback component expects a return from FMS called
    onBWdone, which is located in the sample main.asc file.

    Regards,
    Shack

    B_Shack Guest

  3. #3

    Default Re: FMS/FLVPlayback

    I have those things - is live is set to true and I have removed the flv
    extension. No dice. what does this mean??

    Also, the FLVPlayback component expects a return from FMS called onBWdone,
    which is located in the sample main.asc file.


    hml398 Guest

  4. #4

    Default Re: FMS/FLVPlayback

    The FLVPlayback component connects to FMS when you specify an rtmp path in the
    contentPath. The FLVPlayback component calls a remote procedure to check the
    bandwidth before it starts to stream the flv. If it does not get a onBWDone
    result, it does not play.

    put this in you onConnect method of your main.asc to ensure it receives the
    result.

    application.onConnect = function(p_client)
    {
    p_client.call("onBWDone");
    }



    B_Shack Guest

  5. #5

    Default Re: FMS/FLVPlayback

    that is in there as well. Sigh - any other ideas on why it just opens a blank screen>? I put another layer in the flash with some text and that shows up!
    hml398 Guest

  6. #6

    Default Re: FMS/FLVPlayback

    check you rtmp connection string in the contentPath...should look like

    rtmp://myFMS.com/myApp/myFlv

    replace myFMS with your fms connection info, myApp wiht your applicaiton name,
    and myFlv with your flv name

    also make sure that autoPlay is true to play when connected.

    B_Shack Guest

  7. #7

    Default Re: FMS/FLVPlayback

    All that and a bag of chips and the stupid thing still doesn't play!
    hml398 Guest

  8. #8

    Default Re: FMS/FLVPlayback

    Is your rtmp public or on your local host? If public, can u send me the connection string and I can test from here.
    B_Shack Guest

  9. #9

    Default Re: FMS/FLVPlayback

    Public:

    rtmp://media.horatioalger.com/horatiomembers/wolk
    hml398 Guest

  10. #10

    Default Re: FMS/FLVPlayback

    Just tried, but did not connect. Is the rtmp mapped to your FMS server and is port 1935 open? Can you log into the FMS admin panel and see if the app is rejecting the conection?
    B_Shack Guest

  11. #11

    Default Re: FMS/FLVPlayback

    I can see it connecting ok - port 1935 is open. That is what is so weird!
    hml398 Guest

  12. #12

    Default Re: FMS/FLVPlayback

    Is the flv a live stream or recorded FLV? If recorded, it must be in the horationmembers/streams/_definst_ folder and the flvplayback isLive set to false.
    B_Shack Guest

  13. #13

    Default Re: FMS/FLVPlayback

    It is a recorded FLV. I have tried it set to false and that doesn't work. I
    have tried it with the .flv extension and without. I have tried it with
    _definst_ in the string and without. The actual folder name of hte Application
    is HoratioMembers. Do you think the caps could be an issue?

    hml398 Guest

  14. #14

    Default Re: FMS/FLVPlayback

    Hey - just remembered that this is blocked by domain so you wouldn't be able to connect (it must have been me). I have changed it - try again.
    hml398 Guest

  15. #15

    Default Re: FMS/FLVPlayback

    RTMP connections are not case sensitive. If the FLV is in the
    HorationMembers/streams/_definst_/wolk, then it must be that the main.asc file
    is not sending the result to FLVPlayback.

    Do you have a main.asc file in HoratioMembers directory and does it contain
    the call("onBWdone") in the onConnect method?

    B_Shack Guest

  16. #16

    Default Re: FMS/FLVPlayback

    This is the main.asc file that we are using.

    /* Copyright 2004 Macromedia, Inc. All rights reserved.
    The following is Sample Code and is subject to all restrictions
    on such code as contained in the Macromedia Flash Communication
    Server MX 1.5 End User License Agreement .
    */

    application.onConnect = function(p_client, p_autoSenseBW)
    {
    //Add security here

    this.acceptConnection(p_client);

    if (p_autoSenseBW)
    this.calculateClientBw(p_client);
    else
    p_client.call("onBWDone");
    }

    Client.prototype.getStreamLength = function(p_streamName) {
    return Stream.length(p_streamName);
    }

    Client.prototype.checkBandwidth = function() {
    application.calculateClientBw(this);
    }


    application.calculateClientBw = function(p_client)
    {

    p_client.payload = new Array();
    for (var i=0; i<1200; i++){
    p_client.payload[i] = Math.random(); //16K approx
    }

    var res = new Object();
    res.latency = 0;
    res.Latency = 1;
    res.bwTime = 0;
    res.count = 0;
    res.sent = 0;
    res.client = p_client;
    var stats = p_client.getStats();
    var now = (new Date()).getTime()/1;
    res.pakSent = new Array();
    res.pakRecv = new Array();
    res.beginningValues = {b_down:stats.bytes_out, b_up:stats.bytes_in, time:now};
    res.onResult = function(p_val) {

    var now = (new Date()).getTime()/1;
    this.pakRecv[this.count] = now;
    //trace( "Packet interval = " + (this.pakRecv[this.count] -
    this.pakSent[this.count])*1 );
    this.count++;
    var timePassed = (now - this.beginningValues.time);

    if (this.count == 1) {
    this.latency = Math.min(timePassed, 800);
    this.latency = Math.max(this.latency, 10);
    }


    //trace("count = " + this.count + ", sent = " + this.sent + ", timePassed =
    " + timePassed);

    // If we have a hi-speed network with low latency send more to determine
    // better bandwidth numbers, send no more than 6 packets
    if ( this.count == 2 && (timePassed<2000))
    {
    this.pakSent[res.sent++] = now;
    this.Latency++;
    this.client.call("onBWCheck", res, this.client.payload);
    }
    else if ( this.sent == this.count )
    {
    // See if we need to normalize latency
    if ( this.latency >= 100 )
    { // make sure we detect sattelite and modem correctly
    if ( this.pakRecv[1] - this.pakRecv[0] > 1000 )
    {
    this.latency = 100;
    }
    }

    delete this.client.payload;
    // Got back responses for all the packets compute the bandwidth.
    var stats = this.client.getStats();
    var deltaDown = (stats.bytes_out - this.beginningValues.b_down)*8/1000;
    var deltaTime = ((now - this.beginningValues.time) - (this.latency *
    this.Latency) )/1000;
    if ( deltaTime <= 0 )
    deltaTime = (now - this.beginningValues.time)/1000;

    var kbitDown = Math.round(deltaDown/deltaTime);

    trace("onBWDone: kbitDown = " + kbitDown + ", deltaDown= " + deltaDown + ",
    deltaTime = " + deltaTime + ", latency = " + this.latency + "KBytes " +
    (stats.bytes_out - this.beginningValues.b_down)/1024) ;

    this.client.call("onBWDone", null, kbitDown, deltaDown, deltaTime,
    this.latency );
    }
    }
    res.pakSent[res.sent++] = now;
    p_client.call("onBWCheck", res, "");
    res.pakSent[res.sent++] = now;
    p_client.call("onBWCheck", res, p_client.payload);

    }


    hml398 Guest

  17. #17

    Default Re: FMS/FLVPlayback

    It is at the same level as the streams folder under the HoratioMembers directory under applications.
    hml398 Guest

  18. #18

    Default Re: FMS/FLVPlayback

    Everything looks ok in the asc file. If you don't need to check the bandwidth, dump calulateClientBw method and only send the onBWDone.


    B_Shack Guest

  19. #19

    Default Re: FMS/FLVPlayback

    any other ideas?? I really appreciate your help on this.
    hml398 Guest

  20. #20

    Default Re: FMS/FLVPlayback

    I found this on Adobe's site:

    Note: When you test the playback SWF files, if everything is working
    correctly, the video being streamed by Flash Media Encoder should appear almost
    immediately. If the video being streamed does not appear within 15 or 30
    seconds, double-check all the steps for creating the playback SWF file and the
    steps in the prior sections on Flash Media Server and Flash Media Encoder. If
    the video still does not appear, the layer behind it (if any) will show
    through. This is true if either Flash Media Server or Flash Media Encoder are
    not started. This is also true if there is any error in configuring the
    FLVPlayback component at author time.

    I can see a layer that I stuck behind the flash file so that isn't a good
    sign. But I can definitely see the connection on the media server and it isn't
    getting dropped. Are you using Flash 8 or CS3?

    hml398 Guest

Page 1 of 2 12 LastLast

Similar Threads

  1. FLVPlayback and MP3
    By pubgroup1 in forum Macromedia Flash Flashcom
    Replies: 5
    Last Post: September 29th, 11:07 AM
  2. flvplayback
    By coolpyx1 in forum Macromedia Flash Flashcom
    Replies: 3
    Last Post: December 12th, 03:42 PM
  3. flvplayback question
    By megcheck in forum Macromedia Flash Flashcom
    Replies: 3
    Last Post: March 5th, 09:54 AM
  4. Streaming FLVPlayback
    By takeover in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: February 8th, 08:55 PM
  5. FlvPlayback and XML
    By Stuttleif in forum Macromedia Flash Data Integration
    Replies: 1
    Last Post: December 12th, 03:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139