Skip to main content
Known Participant
August 6, 2010
Question

Archiving live stream at FMS and injecting metadata: VP6 good h264 not

  • August 6, 2010
  • 1 reply
  • 3214 views

When I record a live stream at FMS, one in which I've injected  metadata in my main.asc file, the archived file plays back fine.  The  metadata plays back too.  I'm able to retreive it just fine - if I  encode VP6.

If I encode h.264 the file plays back but  the metadata does not.  The fact that the archived file is created and  plays back tells me things are wired correctly.  The only thing I  changed is the format.

According to FMS docs (http://help.adobe.com/en_US/FlashMediaServer/3.5_SS_ASD/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7e42.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7f35)

..."The recording format is determined by the filename you pass to the Stream.get()

method."

So my record code looks like the following:

application.onPublish = function(client, stream) {
     trace("onPublish");
     s = Stream.get("mp4:streamname.f4v");
     if(s){
         s.record();
     }
    
     this.doRepublish(this.nc, stream);
}

My code that injects the data in to the stream looks like this:

Client.prototype.sendDataEvent = function(data) {
     trace("Call to sendDataEvent...");
     this.newStream = Stream.get("mp4:streamname.f4v");
     this.newStream.send("onTextData",data);
}

All must be wired  correctly because the metadata comes through during the live stream.  On  play back of the archive though, the metadata doesn't appear to be  there.

Any thoughts?

Thanks

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    August 7, 2010

    The problem here might be that when file is recorded, server expects metadata to be present in the first segment of the file before it gets flushed to the disk , if it does not receive any metadata from publisher within that time it puts its own metadata and publisher metadata is ignored. You can try increasing recording flush time i.e. change <MaxFlushTime> to higher value in Server.xml

    Also i did not get you server-side code correctly , so if possible can you post entire code so that we can see what's going wrong. (if above suggestion does not solve the problem)

    Known Participant
    August 9, 2010

    Thanks much for your response.

    Tried doubling <MaxFlushTime> in Server.xml from 5 to 10 seconds.  No dice.

    Not sure I'm getting its potential impact on this.  Are you saying there is, indeed, some difference between H.264 and VP6 in they way they handle metadata - that metadata is present in the first segment of the VP6 file, but not the H.264 file?  I would have thought that metadata for each codec would be handled similarly.

    Recall again that VP6 works as intended.  If 5 minutes into a live stream I send a command to advance a slide, then the archived VP6 file does the same on playback.  Using the exact same client and server side code, H.264 does not produce the same result.

    On posting the entire server-side code, I'd like to, but unfortunately some of it is proprietary so I'm not at liberty to do so   Were there other specific functions you wished to see?  I believe those are the two pertinent functions.  Again, it's code taken directly from the live docs Stream.record() section at http://help.adobe.com/en_US/FlashMediaServer/3.5_SS_ASD/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7e42.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7f35.  And this code is indeed working for VP6.  Not sure what I could do in the code to cause one codec to work but the other to fail.  I think it has to be, as you suggest, some difference in how metadata is handled between the two codecs.

    The curious thing is that, although H.264 fails to archive the commands, they do indeed play live.  If I advance slides in my presentation, those slide advance commands are properly baked into the live stream and do play correctly on all connected clients.  Only live though - not in the archive playback.

    Has anyone been able to get commands baked into an H.264 file and to properly play back?

    Participating Frequently
    August 10, 2010

    I am just curious looking at your code on how the recorded file is getting created, because Stream object (s) on which you are recording, there is no play associated with it - until unless its some code which you have not shared.

    Also i want to be clear , when you say things work fine for VP6 - do you mean it works fine for FLV or does it work fine for VP6 encoded content in MP4/F4V.