Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Date Date
Qty:
Subtotal
Promotions
Estimated Shipping
VAT
Calculated at checkout
Total
Checkout
Adobe Media Server Help / 

Custom metadata added to Live stream not sent | Flash Media Server

Adobe Community Help


Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

Issue

To add custom metadata to the beginning of a live webcam stream published from Flash Media Server, use the NetStream.send() to publish the metadata  in client-side ActionScript. However, if  Flash Media Server records the live stream, the custom metadata is not stored in the file. This issue has been filed as bug 2548763.

To the top

Solution

When you record a live video stream (F4V/FLV file or DVR applications), Flash Media Server requires that the metadata is available before it flushes the first segment. There are two ways you can ensure that the metadata is available before the first segment flush:

  1. Send the metadata immediately after publishing the stream.
  2. Control  the recording of the stream in server-side ActionScript.

Bad network conditions can still delay delivery of custom metadata. In cases of network inefficiencies, the server administrator can increase either the <MaxFlushTime> tag or the <MaxFlushSize> tag in server.xml.

The following code blocks provide examples of the recommended workarounds:

Send metadata from a Flash client

The typical flow for a publishing a stream from a client application:

  1. Create a NetConnection (nc) and attach an event handler;
  2. Listen for the "NetaConnection.Connect.Success" status, then create a NetStream (ns) and attach an event handler;
  3. Create camera (cam) and microphone (mic) objects;
  4. Attach the cam and mic to the NetStream;
  5. Publish the NetStream and invoke recording on the server: ns.publish("myLiveStream", "record");
  6. Listen for the "NetStream.Publish.Start" then send metadata: ns.send("@setDataFrame", "onMetaData", myMetadataObj);

To ensure that the metadata is sent before the server flushes the first segments to disk, send the metadata immediately after calling publish. Do not wait for the "NetStream.Publish.Start" to send the metadata. Modify the typical publishing flow with the following example code that runs inside an event handler for the NetConnection. 

private function onNetStatus(event:NetStatusEvent):void {
    switch(event.info.code) {
        case "NetConnection.Connect.Success":
            //nc is the existing NetConnection object
            ns = new NetStream(nc);
            nc.client = this;
 
           //Attach event handlers to the NetStream object
            ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
            ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);

            //Create camera and microphone objects
            cam = Camera.getCamera();
            mic = Microphone.getMicrophone();

            //Attach camera and microphone objects to the NetStream
            ns.attachCamera(cam);
            ns.attachAudio(mic);

            //Publish and record the stream on Flash Media Server
            ns.publish("myLiveStream", "record");

            //Immediately send metadata objects to the server
            ns.send("@setDataFrame", "onMetaData", myMetaDataObj);
            break;
        case "NetStream.Publish.Start":
            trace("Camera is publishing....");
            break;
    }
}

Use server-side actionscript to control recording

Configure the application on the server to start recording the stream after a configured delay. The delay allows the server to wait for the custom metadata before starting the recording. Modify the following example code to run on your server:

application.onPublish = function(clientObj, streamObj) {
    //Get the published stream name
    streamName = streamObj.name;

    if(streamName) {
        //Create a local stream object on the server    
        myStream = Stream.get(streamName);

        //Play the published stream locally for any subscribers
        myStream.play(streamName);

        //Create a delay to allow client to send metadata
        setInterval(function(){trace("Pausing for 1 second");}, 1000);

        //Initiate the recording of published stream with metadata
        myStream.record();
    }
}

Note: Flash Media Streaming Server is not capable of running custom application code.

Adjusting the server configuration to counter network latency

Modify the rate at which Flash Media Server flushes its recording buffer:

  1. Edit fms_root/conf/Server.xml
  2. Find the <MaxFlushTime> and <MaxFlushSize> tags in Root > Server > ResourceLimits > RecBuffer,
  3. Either increase the time value (in seconds)  for MaxFlushTime OR increase value (in kilobytes) of the MaxFlushSize.
  4. Save the Server.xml.
  5. Restart Flash Media Server.

 

 

 

Keywords: cpsid_85995

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement