Media Solutions
The latest version of Flash Player (v.11.0) includes some exciting new features, including performance upgrades such as native 64-bit support, and asynchronous bitmap decoding. Perhaps most newsworthy though, is Flash Player’s new capability to encode live video streams to the H.264/AVC standard. This new feature will allow developers to create real-time, high-quality, live video streaming applications for chat, conferencing, and live event broadcasting.
The following article demonstrates how to take advantage of Flash Player 11.0′s new H.264 encoding capabilities within a video streaming application built using Flash Builder 4.5. The application does the following:
- Captures live video from a webcam
- Establishes a connection to Flash Media Server 4.5 using the NetConnection class
- Publishes video stream from application to FMS using an instance of the NetStream class
- Displays outgoing video stream from camera (prior to being encoded) in a Video component within the application
- Sends encoding parameters to Flash Player 11.0 to encode the raw webcam video to H.264
- Displays encoded video’s metadata, demonstrating that encoding worked
- Streams live, encoded video from FMS to the application using another instance of the NetStream class
- Displays newly encoded, streamed live video in another Video component within the application
Example Application showing live stream from webcam (left) and stream encoded to H.264 in Flash Player 11.0 (right).
To follow along with the example, please be sure to have the following:
- Flash Player 11.0 installed download Flash Player 11.0 here
- The Flash Player 11.0 Player Global .swc download playerglobal.swc here
- If using the Flex framework, Flex 4.5 SDK download Flex 4.5.0.20967 SDK here
- A video camera attached to your computer
Getting Started - Configuring Compiler Settings
To develop applications that target the new features available in Flash Player 11.0, it is necessary to configure the compiler to target player-version “11.0″, and SWF-version “13″, as well as the playerglobal.swc for Flash Player 11.0. To make these changes:
- Download the new playerglobal.swc for Flash Player 11.0, and rename this file from “playerglobal11_0.swc” to “playerglobal.swc“.
- Create a folder named “11.0” in the directory “frameworks\libs\player” that is inside your Flex SDK installation folder. (Fig. 1.0)
- Put the playerglobal.swc inside the new folder (“11.0”).
- Locate the file “flex-config.xml“, that is located in the “frameworks” folder within your Flex SDK installation directory.
- Within “flex-config.xml“, locate the “target-player” tag, which specifies the minimum player version that will run the compiled SWF.
- Set “target-player” value to “11.0“. (Fig.1.1)
- Also within “flex-config.xml“, locate the “swf-version” tag, which specifies the version of the compiled SWF.
- Set “swf-version” value to “13“. (Fig. 1.1)
- Save “flex-config.xml“.
Figure 1.0. Create a folder for the playerglobal.swc named “11.0″.
Figure 1.1. Edit values of “target-player” and “swf-version” tags within the flex-config.xml file.
Setting Up the Project in Flash Builder 4.5
The example application is a simple ActionScript 3.0 project (not a Flex or AIR project). To create a similar project in Flash Builder:
- Choose File -> New -> ActionScript project.
- Name the project “H264_Encoder”, and click “Finish”.
- In Flash Builder, with the H264_Encoder project selected, choose Project -> Properties.
- Verify that the compiler is targeting Flash Player 11.0. (Fig. 1.2) If it isn’t, select the “Use a specific version” radio button, and type “11.0.0″ for the value.
Figure 1.2. Make sure that the compiler is targeting Flash Player 11.0 by inspecting the project’s properties.
At this point, the application should look similar to the following:
package
{
public class H264_Encoder extends Sprite
{
public function H264_Encoder()
{
}
}
}
Next up, you’ll be modifying the application so that it can communicate with your webcam. In addition, you’ll add the code necessary for establishing a NetConnection to connect the application to Flash Media Server, as well two NetStream instances; one responsible for getting the video from the application into Flash Media Server, and one for bringing it back from the server into the application.
Coding the Application – Connecting a Camera, Establishing a NetConnection and NetStreams
- Directly under the opening class definition statement, but before the constructor method, create a private variable named “nc”, and data typed as a NetConnection. Use code hinting to have Flash Builder generate the necessary import statements for you by starting to type “NetC..”, then hit CTRL-SPACE to receive code hinting. Select “NetConnection” from the list, and notice that Flash Builder has imported the NetConnection class from within the flash.net package. If for some reason the import fails, go ahead and import it manually. Your code should appear as follows:
package
{
import flash.net.NetConnection;
public class H264_Encoder extends Sprite
{
private var nc:NetConnection;
public function H264_Encoder()
{
}
}
}
- Create two private variables to represent the NetStreams data typed as NetStream. Create one for the stream going from the application to the server (ns_out), and another for the stream coming back into the application from the server (ns_in), and remember to use code hinting to have Flash Builder import the necessary classes.
package
{
import flash.net.NetConnection;
import flash.net.NetStream;
public class H264_Encoder extends Sprite
{
private var nc:NetConnection;
private var ns_out:NetStream;
private var ns_in:NetStream;
public function H264_Encoder()
{
}
}
}
- Next, create a private variable named “cam” of type “Camera”, and set its value = “Camera.getCamera()”. The Camera class is a little different than other classes, in that you don’t call a constructor to instantiate an object of type Camera. Instead, you call the getCamera() method of the Camera class. This method will return an instance of a Camera object unless there isn’t a camera attached to the computer, or if the camera is in use by another application.
private var cam:Camera = Camera.getCamera();
Make sure the Camera class was imported:
import flash.media.Camera;
- It is now time to add code that will allow the application to connect to Flash Media Server using an instance of the NetConnection class. Under the import statements, the local variables, and the closing brace of the constructor function, create a private function named initConnection() that takes no arguments and returns void:
private function initConnection():void
{
}
- As the first line of the function body, create a new NetConnection by instantiating the nc:NetConnection variable, which you declared in step 1:
nc = new NetConnection();
- It’s always a good practice to verify that the NetConnection was successful. Next, add an event listener to listen for an event named “onNetStatus()”. You will create the onNetStatus() event in the next section:
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
Be sure to either use code hinting, or import manually, the NetStatusEvent class, which is in the flash.events package:
import flash.events.NetStatusEvent;
- Next, and still within the initConnection() function body, tell the NetConnection where to connect to by calling the connect() method of the NetConnection class. As an argument to this method, add the URL for the location of the “live” folder within the installation Flash Media Server you want to connect to. The URL included in the example uses the RTMP protocol, and connects to the “live” folder within a copy of Flash Media Server installed on one of our servers. You can also stream to a local version of Flash Media Server, if you have one installed, by setting the URL to: “rtmp://localhost/live”.
nc.connect("rtmp://office.realeyes.com/live");
- Finally, tell the NetConnection where Flash Media Server should invoke callback methods by setting the value for the NetConnection’s “client” property to “this”. Callback methods are special handler functions invoked by Flash Media Server when a client application establishes a NetConnection. Later on in this example you will work with the “onMetaData()” and “onBWDone()” callback methods. You will include these callback methods within the main application class, which is in fact the same object that will establish the NetConnection, and therefore the value of the NetConnection instance’s (nc) client property should be set to “this”.
nc.client = this;
The completed initConnection() function should appear as follows:
private function initConnection():void
{
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nc.connect("rtmp://office.realeyes.com/live");
nc.client = this;
}
Coding the Application – Verifying a Successful NetConnection
- As mentioned, it’s always a good practice to verify the success of a NetConnection attempt. To do this, create a protected function named onNetStatus() that takes an event, named “event”, of type “NetStatusEvent” as its only argument, and returns void:
protected function onNetStatus(event:NetStatusEvent):void
{
}
- Within the onNetStatus() event body, create a Trace statement that outputs the value of event.info.code to the console during debugging. The code property of the info object in the NetStatus event will contain String data that indicates the status of the attempted NetConnection, such as “NetGroup.Connect.Success”, or “NetGroup.Connect.Failed”. Tracing the value of this property allows you to confirm the status of the NetConnection easily by simply running the application in debug mode.
protected function onNetStatus(event:NetStatusEvent):void
{
trace(event.info.code);
}
- Next, within the function body, and beneath the existing Trace statement, create a conditional statement that checks the value of event.info.code and compares it to the value “NetConnection.Connect.Success”. If event.info.code == “NetConnection.Connect.Success”, call three functions that you will create in the next section; one that publishes an outgoing video stream, one that displays the incoming video from the webcam, and one that displays the video stream being sent back to the application from the server. The completed onNetStatus() function should appear as follows:
protected function onNetStatus(event:NetStatusEvent):void
{
trace(event.info.code); if(event.info.code == "NetConnection.Connect.Success")
{
publishCamera();
displayPublishingVideo();
displayPlaybackVideo();
}
}
- This example attempts to connect to the server and start playing/publishing video automatically when launched. To achieve this, call initConnection() from within the main class’ constructor method:
public function H264_Encoder()
{
initConnection();
}
At this point, you have included the code necessary to establish a NetConnection, and verify the success or failure of that connection with a Trace statement. In addition, you’ve included calls to functions that, when written, will handle the publishing and playback of the video from the webcam, as well as the video coming back from the server.
If you save the application now you’ll notice some errors. The calls to publishCamera(), displayPublishingVideo(), and displayPlaybackVideo() generate errors because we haven’t written them yet. You can comment out the calls to these functions and run the application in debug mode. If everything is set up correctly, you should see the Trace output “NetConnection.Connect.Success”.
However, you should also see this error in the console: “ReferenceError: Error #1069: Property onBWDone not found on flash.net.NetConnection and there is no default value.”. This is because Flash Media Server is attempting a callback function on the application that hasn’t been written yet. In the next section you will include those callback functions.
Coding the Application – Including the Callback Functions, and Creating a TextField to Display Metadata
The sample application contains two callback functions – onBWDone(), and onMetaData(). The onBWDone() callback checks for available bandwith, which can be useful in applications that need to dynamically switch video assets according to the bandwith that’s currently available. Although it’s necessary to include this function in the client code (omitting it will generate an error when the server tries to make the function call) it’s not necessary to actually do anything with it. This application isn’t concerned with monitoring bandwith, so it can be left as an empty function.
The onMetaData() callback function is useful for accessing a video stream’s metadata, and you will be adding code to this callback to do just that. The onMetaData() callback returns an Array of generic objects that represent the video stream’s metadata. In the next section, you will create those objects to represent various metadata, and access their values in order to display the information within the UI. For now, you will simply add the two callback functions, and add some code to onMetaData() to access that metadata. In addition, you will create a TextField that you will eventually use to display the metadata in the UI.
- Create a new private instance variable named “metaText”, and type it as an instance of the TextField class. Set its initial value to “new TextField()”
private var metaText:TextField = new TextField();
*Note – At this point you are simply creating the metaText object in memory. You won’t actually add it to the display list until further on in the example.
Be sure to import the necessary TextField class:
import flash.text.TextField;
- Include the required onMetaData() callback function. Create a new public function named “onMetaData()” that accepts an Object named “o” as its only parameter, and returns void.
public function onMetaData( o:Object ):void
{
}
- To access the video stream’s metadata, you will loop through the objects returned by the onMetaData() callback function. Again, you will create those objects in the next section, but for now, within the onMetaData() function create a “for…in” loop to loop through the objects. Within the loop’s initializer, declare a local variable named “settings” data typed as a String within the Object “o”.
public function onMetaData( o:Object ):void
{
for (var settings:String in o)
{
}
}
- Next, within the loop body, include a Trace statement that will output the name of each “settings” object returned by onMetaData(), concatenated with “=”, and the object’s value.
trace(settings + " = " + o[settings]);
- Finally, inside the for…in loop body, assign a text value to the metaText variable equal to each returned object’s name, concatenated with “=”, and the object’s value. Create a new line for each iteration, and adjust the spacing between the double quotes, (and add an extra “\n” if you want to double-space the text) to properly layout the text in the UI.
metaText.text += "\n" + " " + settings.toUpperCase() + " = " + o[settings] + "\n";
*Note* The layout and styling in this example are not intended to be examples of UI programming best practices. UI programming is outside the scope of this article.
The completed onMetaData() callback function should be similar to the this:
public function onMetaData( o:Object ):void
{
for (var settings:String in o)
{
trace(settings + " = " + o[settings]);
metaText.text += "\n" + " " + settings.toUpperCase() + " = " + o[settings] + "\n";
}
}
- Next, add the onBWDone() callback function. Create a new public function named “onBWDone()” that takes no arguments, and returns void.
public function onBWDone():void
{
}
Remember that the onBWDone() callback function is what Flash Media Server uses to check available bandwith, and this application doesn’t require that information. It still must be included, however, since the server will be calling it on the application object. To avoid a runtime error, simply include an empty onBWDone() callback.
public function onBWDone():void
{
}
Now that the application has the necessary callback functions, and it loops through the objects returned by onMetaData() to populate a TextField with that data, it’s time to add code that enables the application to read webcam data, encode that webcam data to the H.264 standard, and to then stream the encoded video.
Coding the Application – Setting Up H.264 Encoding, and Publishing to the NetStream
In this next section, you will attach your webcam to an instance of the Camera class. You will then encode the webcam input to H.264 using properties of the Camera class, and new H264VideoStreamSettings class. Certain encoding parameters can’t be set (yet, although support for this is hopefully coming soon) with the new H264VideoStreamSettings class, so you’ll be setting those values from properties in the Camera class.
Next, you will attach the encoded video to a live video stream, and stream it to Flash Media Server’s “live” directory. (You will bring a new stream back into the application from Flash Media Server in the next section)
Finally, in order to read the metadata of the newly encoded video stream, you will call the send() method of the NetStream class (available only when using Flash Media Server). As arguments to the send() method, you will include @setDataFrame, a special handler method within Flash Media Server, the onMetaData() callback method you added earlier to listen for the metadata client-side, and finally, the name of a local variable (“metaData”), data typed as an Object, used to represent the desired metadata items. First:
- Create a protected function named “publishCamera()” that takes no arguments and returns void:
protected function publishCamera():void
{
}
- In the first line of this new function, instantiate the ns_out NetStream object by calling its constructor. Pass the constructor the NetConnection instance “nc”:
ns_out = new NetStream(nc);
- On the next line, attach the Camera instance “cam” to the outgoing NetStream by calling the attachCamera() method of the NetStream class. Pass this method the cam instance:
ns_out.attachCamera(cam);
- Next, create a new local variable named “h264Settings”, data typed as H264Settings and set its initial value equal to “new H264Settings()”:
var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
Be sure to import the H264VideoStreamSettings class:
import flash.media.H264VideoStreamSettings;
- Call the setProfileLevel() method of the H264Settings class on the h264Settings object to encode the video using the “BASELINE” profile, and a level of “3.1″:
h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3_1);
Be sure to import both the H264Profile class, and the H264Level class:
import flash.media.H264Level;
import flash.media.H264Profile;
- Next, use the setQuality() method of the Camera class to encode the video stream at 90000 bps (900Kbps), and with a quality setting of “90″:
cam.setQuality(90000, 90);
- Use the setMode() method of the Camera class to set the video’s width, height, and frames per second, and to determine if it should maintain its capture size when if camera has no default behavior for this parameter:
cam.setMode(320, 240, 30, true);
- Next, using the setKeyFrameInterval() method of the Camera class, set the video’s keyframe interval to 15 (once every two seconds):
cam.setKeyFrameInterval(15);
- To set the outgoing video’s compression settings, assign the values of the h264VideoStreamSettings variable to the videoStreamSettings property of the outbound stream, “ns_out”
ns_out.videoStreamSettings = h264Settings; - Call the publish() method of the NetStream class on the outgoing NetStream, and pass it parameters to provide a name for the stream (“mp4:webCam.f4v”), as well as a destination folder in Flash Media Server (“live”):
ns_out.publish("mp4:webCam.f4v", "live");- Now it’s time to create the objects that will hold the metadata values of the encoded video you will access at runtime. Create a new local variable named “metaData”, data typed as an Object, and set its initial value equal to “new Object()”:
var metaData:Object = new Object();- These metaData objects are generic, meaning you can assign any name/value pairs you like. For example, there’s no encoding setting that comes from the Camera, VideoStreamSettings, or H264VideoStreamSettings classes that would allow you to display a copyright, but you can add one easily enough like this:
metaData.copyright = "Realeyes Media, 2011";Of course, you can also create objects with values that do come from settings within the aforementioned classes, such as:
metaData.codec = ns_out.videoStreamSettings.codec;
metaData.profile = h264Settings.profile;- Create the following metaData objects and add them to the publishCamera() function:
metaData.codec = ns_out.videoStreamSettings.codec;
metaData.profile = h264Settings.profile;
metaData.level = h264Settings.level;
metaData.fps = cam.fps;
metaData.bandwith = cam.bandwidth;
metaData.height = cam.height;
metaData.width = cam.width;
metaData.keyFrameInterval = cam.keyFrameInterval;
metaData.copyright = "Realeyes Media, 2011";- Call the send() method of the NetStream class on the ns_out object and pass it the name of the handler method “@setDataFrame”, and the callback method “onMetaData”, as well as the local variable metaData:
ns_out.send("@setDataFrame", "onMetaData", metaData);The completed publishCamera() function should resemble the following, with the exception of the commented-out code:
protected function publishCamera():void
{
ns_out = new NetStream(nc);
ns_out.attachCamera(cam);
var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3_1);// ALTHOUGH FUTURE VERSIONS OF FLASH PLAYER SHOULD SUPPORT SETTING
// ENCODING PARAMETERS ON h264Settings BY
// USING THE setQuality() and setMode() METHODS,
// FOR NOW YOU MUST SET THE PARAMETERS ON THE CAMERA FOR:
// BANDWITH, QUALITY, HEIGHT, WIDTH, AND FRAMES PER SECOND.
// h264Settings.setQuality(30000, 90);
// h264Settings.setMode(320, 240, 30);cam.setQuality(90000, 90);
cam.setMode(320, 240, 30, true);
cam.setKeyFrameInterval(15);
ns_out.videoStreamSettings = h264Settings;
trace(ns_out.videoStreamSettings.codec + “, ” + h264Settings.profile + “, ” + h264Settings.level);
ns_out.publish(“mp4:webCam.f4v”, “live”);var metaData:Object = new Object();
metaData.codec = ns_out.videoStreamSettings.codec;
metaData.profile = h264Settings.profile;
metaData.level = h264Settings.level;
metaData.fps = cam.fps;
metaData.bandwith = cam.bandwidth;
metaData.height = cam.height;
metaData.width = cam.width;
metaData.keyFrameInterval = cam.keyFrameInterval;
metaData.copyright = “Realeyes Media, 2011″;
ns_out.send(“@setDataFrame”, “onMetaData”, metaData);
}
Coding the Application – Displaying and Encoding the Video From the Webcam, and Displaying Video Streamed Back From the Server
The application needs to display both the raw, un-encoded incoming video from the webcam, as well as the inbound streaming video after it has been encoded to H.264 in the Flash Player, sent to Flash Media Server, and then back to the application. In addition, the metadata that you defined in the previous section needs to be displayed in the UI to reveal the encoding settings defined in publishCamera().
In this next section, you will create two functions, displayPublishingVideo(), and displayPlaybackVideo() to play the streams and display the metadata on screen.
- Create a new private instance variable named vid_out, and set its data type to Video:
private var vid_out:Video;
Be sure to import the Video class:
import flash.media.Video;
This new instance of the Video class will be used to playback the not-yet-encoded video coming in from the webcam.
- Next, create a protected function named displayPublishingVideo() that takes no arguments and returns void:
protected function displayPublishingVideo():void
{
}
- In the first line of the function body, instantiate the vid_out variable by calling the constructor method of the Video class:
vid_out = new Video();
- To place the new Video component on screen correctly, assign x and y values to vid_out so x = 300, and y = 10
vid_out.x = 300;
vid_out.y = 10;
- Next, use the height and width values from the webcam to set the height and width of the video display:
vid_out.width = cam.width;
vid_out.height = cam.height;
- To allow the vid_out component to display video coming from the webcam, call the attachCamera() method of the Video class, and pass that method the instance of the Camera class that represents the webcam:
vid_out.attachCamera(cam);
- Finally, add vid_out to the display list by calling the addChild() method of the DisplayObjectContainer class:
addChild(vid_out);
At this point, the displayPublishingVideo() function should look similar to:
protected function displayPublishingVideo():void
{
vid_out = new Video();
vid_out.x = 300;
vid_out.y = 10;
vid_out.width = cam.width;
vid_out.height = cam.height;
vid_out.attachCamera(cam);
addChild(vid_out);
}
If you run the application at this point, provided you have a webcam attached to your computer (and you un-commented the calls to the functions publishCamera(), and displayPublishingVideo() within onNetStatus()), you should see the Flash Player dialog that asks permission to access your camera. Grant Flash Player permission, and you should now see a live video feed coming from your webcam.
Next, you’ll add code to the displayPublishingVideo() function that will display the metadata objects you created earlier. The metadata text won’t show up until the code is in place to handle the incoming stream, however. This is because metaText’s text property is set within the onMetaData() function, and onMetaData() is run only when Flash Media Server sends the stream back to the application. You’ll start by adding the metaText TextField object to displayPublishingVideo() and assigning values for its properties:
- In the displayPublishingVideo() function, directly under the existing addChild() method call, set metaText’s “x” value to “0″, its “y” value to “55″, its width to “300″, and its height to “385″
metaText.x = 0;
metaText.y = 55;
metaText.width = 300;
metaText.height = 385;
- Assign color values for the backgroundColor, textColor, and borderColor of metaText. In order to display backgroundColor and borderColor, you must assign both the background and border properties to “true”.
metaText.background = true;
metaText.backgroundColor = 0x1F1F1F;
metaText.textColor = 0xD9D9D9;
metaText.border = true;
metaText.borderColor = 0xDD7500;
- Add the metaText TextField object to the display list by calling the addChild() method, and passing it the metaText object.
addChild(metaText);
Next, you’ll create a function that will bring the video stream back in from Flash Media Server, and display it in another Video object.
- Create a new instance variable named vid_in and data type it as a Video.
private var vid_in:Video;
- Next, create a new protected function called “displayPlaybackVideo()” that takes no arguments and returns void.
protected function displayPlaybackVideo():void
{
} - In the first line of the function body, instantiate a copy of ns_in, the NetStream variable you declared earlier, and set its initial value equal to new NetStream(nc) with the “nc” NetConnection passed as an argument.
ns_in = new NetStream(nc);- Instead of calling the attachCamera() method, as you did for the previous NetStream, set the client property of the new NetStream to “this”.
ns_in.client = this;- Next, call the play() method of the NetStream class, and pass it the String value for the name of the stream. This should be the name of the outgoing stream as well.
ns_in.play("mp4:webCam.f4v");- Instantiate the vid_in variable by calling its constructor.
vid_in = new Video();- Next, set some sizing and layout properties for the new Video object so that it sits properly on the stage.
vid_in.x = vid_out.x + vid_out.width;
vid_in.y = vid_out.y;
vid_in.width = cam.width;
vid_in.height = vid_out.height;- Attach the incoming NetStream to the Video object to have it playback the video.
vid_in.attachNetStream(ns_in);- Finally, add vid_in to the display list by calling the addChild() method and passing vid_in as its only argument.
addChild(vid_in);Make sure to un-comment the call to displayPlaybackVideo() in the onNetStatus() function, and then save and run the application. You should see a dark rectangle appear that displays the video’s encoding settings, and two video streams, side-by-side. The video on the left is the raw video footage coming from the webcam, and the one on the right is the stream coming back from Flash Media Server.
Coding the Application – Adding Some Finishing Touches
The application is almost done! It could stand a little visual clean up however.
- First, add Metadata above the class declaration to set the height and width of the application to something more reasonable.
[SWF( width="940", height="880" )]
Next, you’ll create three more TextFields that will display a simple label for the encoding settings list, as well as information about each of the separate video streams. You’ll also work with some simple text formatting to size the text something different than the default.
- Create three new TextField variables, one named “vid_outDescription”, one named “vid_inDescription”, and one named “metaTextTitle”. Data type each of them as TextField, and call the constructor for each.
private var vid_outDescription:TextField = new TextField();
private var vid_inDescription:TextField = new TextField();
private var metaTextTitle:TextField = new TextField();
- Within the displayPublishingVideo() function, directly below the call to add metaText to the display list, add a line that sets the text property for metaTextTitle. Play with spacing between the double quotes and add a “\n” to get the positioning the way you’d like it.
metaTextTitle.text = "\n - Encoding Settings -";
- Next, create a local variable named “stylr”, that is an instance of the TextFormat class. Instantiate this variable by calling its constructor.
var stylr:TextFormat = new TextFormat();
Ensure that the TextFormat class has been imported.
import flash.text.TextFormat;
- Set the size property of the new TextFormat class to “18″.
stylr.size = 18;
- Apply the style defined with the stylr variable to the metaTextTitle TextField by calling the setTextFormat method of the TextField class and passing that method the name of the TextFormat object “stylr” as an argument.
metaTextTitle.setTextFormat(stylr);
- Add more styling and layout property values to metaTextTitle the same way you added them to metaText earlier:
metaTextTitle.textColor = 0xDD7500;
metaTextTitle.width = 300;
metaTextTitle.y = 10;
metaTextTitle.height = 50;
metaTextTitle.background = true;
metaTextTitle.backgroundColor = 0x1F1F1F;
metaTextTitle.border = true;
metaTextTitle.borderColor = 0xDD7500;
- Create descriptive text to be displayed for the outbound video stream. Set the text property for the vid_outDescription TextField to display this descriptive text. Again, play with the spacing and new lines to get it positioned correctly
vid_outDescription.text = "\n\n\n\n Live video from webcam \n\n" +
" Encoded to H.264 in Flash Player 11 on output";
- Add both the metaTextTitle TextField, and the vid_outDescription TextField to the display.
addChild(vid_outDescription);
addChild(metaTextTitle);
- Add descriptive text for the incoming video stream in the same manner. Set values for properties on vid_inDescription, and add the TextField to the display.
vid_inDescription.text = "\n\n\n\n H.264-encoded video \n\n" +
" Streaming from Flash Media Server";
vid_inDescription.background = true;
vid_inDescription.backgroundColor =0x1F1F1F;
vid_inDescription.textColor = 0xD9D9D9;
vid_inDescription.x = vid_in.x;
vid_inDescription.y = cam.height;
vid_inDescription.width = cam.width;
vid_inDescription.height = 200;
vid_inDescription.border = true;
vid_inDescription.borderColor = 0xDD7500;
addChild(vid_inDescription);
There you have it! The application should now automatically attach a webcam, display the webcam video, encode that video to H.264, and then stream it to and from Flash Media Server, displaying the end result in another video. The source files can be downloaded here. The completed code should appear as follows:
package
{
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.media.Camera;
import flash.media.H264Level;
import flash.media.H264Profile;
import flash.media.H264VideoStreamSettings;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.text.TextField;
import flash.text.TextFormat;
[SWF( width="940", height="880" )]
public class H264_Encoder extends Sprite
{
private var nc:NetConnection;
private var ns_out:NetStream;
private var ns_in:NetStream;
private var cam:Camera = Camera.getCamera();
private var vid_out:Video;
private var vid_in:Video;
private var metaText:TextField = new TextField();
private var vid_outDescription:TextField = new TextField();
private var vid_inDescription:TextField = new TextField();
private var metaTextTitle:TextField = new TextField();
public function H264_Encoder()
{
initConnection();
}
private function initConnection():void
{
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nc.connect(“rtmp://office.realeyes.com/live”);
nc.client = this;
}
protected function onNetStatus(event:NetStatusEvent):void
{
trace(event.info.code);
if(event.info.code == “NetConnection.Connect.Success”)
{
publishCamera();
displayPublishingVideo();
displayPlaybackVideo();
}
}
protected function publishCamera():void
{
ns_out = new NetStream(nc);
ns_out.attachCamera(cam);
var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3_1);
// ALTHOUGH FUTURE VERSIONS OF FLASH PLAYER SHOULD SUPPORT SETTING ENCODING PARAMETERS
// ON h264Settings BY USING THE setQuality() and setMode() METHODS, FOR NOW YOU MUST SET
// SET THE PARAMETERS ON THE CAMERA FOR: BANDWITH, QUALITY, HEIGHT, WIDTH, AND FRAMES PER SECOND.
// h264Settings.setQuality(30000, 90);
// h264Settings.setMode(320, 240, 30);
cam.setQuality(90000, 90);
cam.setMode(320, 240, 30, true);
cam.setKeyFrameInterval(15);
ns_out.videoStreamSettings = h264Settings;
// trace(ns_out.videoStreamSettings.codec + “, ” + h264Settings.profile + “, ” + h264Settings.level);
ns_out.publish(“mp4:webCam.f4v”, “live”);
var metaData:Object = new Object();
metaData.codec = ns_out.videoStreamSettings.codec;
metaData.profile = h264Settings.profile;
metaData.level = h264Settings.level;
metaData.fps = cam.fps;
metaData.bandwith = cam.bandwidth;
metaData.height = cam.height;
metaData.width = cam.width;
metaData.keyFrameInterval = cam.keyFrameInterval;
metaData.copyright = “Realeyes Media, 2011″;
ns_out.send(“@setDataFrame”, “onMetaData”, metaData);
}
protected function displayPublishingVideo():void
{
vid_out = new Video();
vid_out.x = 300;
vid_out.y = 10;
vid_out.width = cam.width;
vid_out.height = cam.height;
vid_out.attachCamera(cam);
addChild(vid_out);
metaText.x = 0;
metaText.y = 55;
metaText.width = 300;
metaText.height = 385;
metaText.background = true;
metaText.backgroundColor = 0x1F1F1F;
metaText.textColor = 0xD9D9D9;
metaText.border = true;
metaText.borderColor = 0xDD7500;
addChild(metaText);
metaTextTitle.text = “\n – Encoding Settings -”;
var stylr:TextFormat = new TextFormat();
stylr.size = 18;
metaTextTitle.setTextFormat(stylr);
metaTextTitle.textColor = 0xDD7500;
metaTextTitle.width = 300;
metaTextTitle.y = 10;
metaTextTitle.height = 50;
metaTextTitle.background = true;
metaTextTitle.backgroundColor = 0x1F1F1F;
metaTextTitle.border = true;
metaTextTitle.borderColor = 0xDD7500;
vid_outDescription.text = “\n\n\n\n Live video from webcam \n\n” +
” Encoded to H.264 in Flash Player 11 on output”;
vid_outDescription.background = true;
vid_outDescription.backgroundColor = 0x1F1F1F;
vid_outDescription.textColor = 0xD9D9D9;
vid_outDescription.x = 300;
vid_outDescription.y = cam.height;
vid_outDescription.width = cam.width;
vid_outDescription.height = 200;
vid_outDescription.border = true;
vid_outDescription.borderColor = 0xDD7500;
addChild(vid_outDescription);
addChild(metaTextTitle);
}
protected function displayPlaybackVideo():void
{
ns_in = new NetStream(nc);
ns_in.client = this;
ns_in.play(“mp4:webCam.f4v”);
vid_in = new Video();
vid_in.x = vid_out.x + vid_out.width;
vid_in.y = vid_out.y;
vid_in.width = cam.width;
vid_in.height = vid_out.height;
vid_in.attachNetStream(ns_in);
addChild(vid_in);
vid_inDescription.text = “\n\n\n\n H.264-encoded video \n\n” +
” Streaming from Flash Media Server”;
vid_inDescription.background = true;
vid_inDescription.backgroundColor =0x1F1F1F;
vid_inDescription.textColor = 0xD9D9D9;
vid_inDescription.x = vid_in.x;
vid_inDescription.y = cam.height;
vid_inDescription.width = cam.width;
vid_inDescription.height = 200;
vid_inDescription.border = true;
vid_inDescription.borderColor = 0xDD7500;
addChild(vid_inDescription);
}
public function onBWDone():void
{
}
public function onMetaData( o:Object ):void
{
for (var settings:String in o)
{
trace(settings + ” = ” + o[settings]);
metaText.text += “\n” + ” ” + settings.toUpperCase() + ” = ” + o[settings] + “\n”;
}
}
}
}
Download Source Here
Back in early June, we reported on the pre-release of Adobe’s OSMF 1.6, and its support for late-binding audio. Adobe has been working hard to improve upon the upgrades they gave us with the OSMF 1.6, Sprint 5 release, and to add even more new features for mobile as well. Today Realeyes Media is pleased to announce that OSMF 1.6, and Strobe Media Playback 1.6 have been granted their final release status.
A brief overview of the updates available in OSMF and Strobe Media Playback 1.6:
OSMF 1.6
- In regards to late-binding audio, as promised, today’s release supports live playback as well as video on demand (VOD).
- Also in regards to late-binding audio, fixes to seek issues resolved.
- For mobile – offers Stage Video support for hardware-accelerated video presentation(requires Flash Player 10.2+).
- DVR rolling window support, which allows you specify how far back from the live point viewers can rewind (requires the newly released FMS 4.5).
Strobe Media Playback 1.6
- For Mobile – Smartphone and tablet optimized chrome for Flash-enabled devices
- For Mobile – HTML5 video player for non-Flash devices
- For Mobile – JavaScript device detection library for selecting the appropriate player and chrome
Core Framework
- Improvements to HTTP Dynamic Streaming as well as the ability to better manage bitrate profiles with multi-level manifests.
Documentation
- The OSMF team has produced a completely revamped wiki for OSMF and Strobe Media Playback.
http://sourceforge.net/apps/mediawiki/osmf.adobe
This is exciting news for those of us using OSMF and/or the Strobe Media Playback. Thank you to Cathi Kwon and the rest of the OSMF team for giving us these new and powerful feature updates!
- OSMF SVN
- OSMF Downloads
- Strobe Media Playback SVN
- Strobe Media Playback Downloads
- OSMF and Strobe Media Playback Wiki

For information on how Realeyes Media can help you integrate OSMF into your media solutions, please feel free to contact us today.
Scott Sheridan writes about, and messes around with, the latest technologies in digital motion media at Realeyes. He also does triathlons. Really big triathlons.
Feel free to reach out with any questions-we’re glad to help!
scott@realeyesmedia dot com
Jun Heider gave a really nice presentation this morning on how to leverage the Adobe Flash platform P2P API to create applications for sharing video, audio, and data among application peers. In his talk, Jun demonstrates P2P technologies working across multiple devices and taking advantage of the flexible RTMFP protocol, an Adobe technology that allows for maximum scalability coupled with a dramatic reduction in server infrastructure and bandwidth costs.
View the presentation:
Presentation slides (PDF)
You can also check out a recent screencast from Jun’s blog demonstrating a multiscreen P2P call center application
The following are demonstrations of some of the ways in which this technology can be implemented:
Basic Demos (right-click demos to view source)
Adobe AIR – File Sharing
Part 1 of this series discussed HTTP Dynamic Streaming (HDS) at a fairly high level. The next few editions in the series will explore some of the more powerful features that make using this protocol advantageous. Multi-bitrate stream switching and file encryption are two important features that we’ll cover in the very near future, as they’re very big reasons to stream over any protocol. However, in this article I’d like to discuss a brand new feature of the Open Source Media Framework (OSMF) known as “late-binding audio”.
Late Binding Audio Defined
Late-binding audio refers to the ability to stream videos with multiple associated audio tracks. This makes it possible to play an alternative audio track on the client-side using the same video file. There’s no need to encode, store, and deliver separate video + audio assets for each version you would like to provide. Say for example that you would like to provide video content with audio translated into multiple languages. Instead of creating separate video + audio files for each language, you instead encode the video only once, and include the alternate audio-only tracks along with the it. This represents a huge savings in time, storage, and bandwith that anyone making the switch to HTTP Dynamic Streaming can take advantage of.
Updates to OSMF that came in version 1.6, Sprint 5 make streaming late-binding audio files over HTTP possible. Specifically, the MediaPlayer class now contains the read-only public property hasAlternativeAudio : Boolean. By using the LateBindingAudio example application included in the latest OSMF release, I’ll demonstrate step-by-step how to get this new feature to work.
Many of the steps we’ll be taking are the same steps we took when packaging our files for simple streaming over HTTP, so if you’d like to review, please check out HTTP Dynamic Streaming – Part 1: An Introduction to Streaming Media.
Late-Binding Audio, Step-by-Step
1. Gather your media assets
In this example, we’ll be working with a video that has one alternate audio track. (President Barack Obama’s speech from July 25th, and an alternate audio track of the transcription translated into Spanish) You can include as many alternate audio tracks as you’d like, however there are some recommendations from the OSMF team in regards to how you prepare your media. One suggestion is that you should use audio tracks that are at least as long as the main video + audio track to ensure smooth stream switching. Other guidelines relate to encoding best practices for streaming over HTTP in general. You can read the white paper on encoding standards here. A list of known issues with OSMF 1.6 Sprint 5 can be found in the release notes.
The creation of the media assets prior to packaging them for HTTP streaming is beyond the scope of this article, but for your information:
- I used Adobe Premiere Pro 5.5 to edit the original video file down to something shorter (~2 min).
- I used Adobe Audition CS 5.5 to edit the audio, and to create the alternate audio track.
- I encoded the video and audio files to .f4v using Adobe Media Encoder (see part 1 of the series for file type requirements).
- I happily found a transcription of the speech online.
- Google Translate helped me with the translation (it’s been awhile since I’ve spoken Spanish).
- At&t Natural Voices text-to-speech demo provided me with the .wav files of the Spanish audio.
- The original video + audio file encoded into an .flv or Mp4-compatible format
- The audio track from the original video + audio encoded the same as above
- An alternate audio track, hopefully of the same duration as the original audio, encoded the same as above
2. Package your media using the f4fpackager tool
This step is the same as it is for packaging files for simple streaming over HTTP, covered in part 1.
At this point, if you’d like to send additional arguments to the packager, you can enter them here and they’ll show up in the XML of the .f4m file, otherwise use the minimum arguments. We’ll be editing the XML of the main video’s .f4m file in the next step. After you’ve packaged all of the files, it’s time to create a “master” .f4m file. I’m using 3 source files, so I have 3 sets of 3 packaged files:
- Obama.f4m
- ObamaSeg1.f4x
- ObamaSeg1.f4f
- Obama_Audio.f4m
- Obama_AudioSeg1.f4x
- Obama_AudioSeg1.f4f
- Obama_altAudio.f4m
- Obama_altAudioSeg1.f4x
- Obama_altAudioSeg1.f4f
3. Create master .f4m file
Next, we’ll be adding some information from the two audio tracks’ .f4m files (the separated audio from the original video, and our alternate Spanish track) to the .f4m of the packaged main video file. Copy the “bootstrapInfo” and “media” tags from inside the .f4m files of the two audio tracks, and paste them into the main video’s .f4m file.
4. Add attributes to media tags in master .f4m
In order for late-binding audio to work, we’ll need to add a few attributes to the media tags inside the main .f4m file. In the media tag of your alternate audio, add:
- alternate=”true”
- type=”audio”
- lang=”Spanish”
- bitrate=”"
5. Place all packaged files into vod folder in the webroot of your Apache server
When done, it should look something like this: (“readme.htm” and “sample2_1000kbps.f4v” are files that come with Flash Media Server, and can be ignored)
Setting Up Flash Builder
6. Make sure you’re using the latest versions of Flash Builder, Flash Player, and OSMF
In order for this example to work, you’ll need to ensure that you’re using Flash Builder 4.5.1 and the latest OSMF .swc. You’ll need to replace the OSMF .swc that comes with the latest Flex SDK with the one from OSMF 1.6 Sprint 5, and deploy your project to the latest version of the Flash Player. (At least 10.2)
As mentioned earlier, this example uses the LateBindingAudioSample application that comes bundled with the latest OSMF release. It can be found in OSMF/apps/samples/framework/LateBindingAudioSample. Modify this application to point to your main video’s .f4m file on the server.
That’s it! Ensure that your Apache web server is running, and if you’re using the same example application, run the application in debug mode to get valuable information about the stream in the Console. Select your video asset from the dropdown menu up top, and hit “Play”. Choose the alternate audio stream at any time from the dropdown in the lower left of the application.
Where to go from here
For a more in-depth look into HDS, including discussions on file encryption, and live streaming, please refer to John Crosby’s series on HTTP Dynamic Streaming
For an informative look into the world of OSMF, including deep-dives into such things as building custom media players and plugin integration and development, please see David Hassoun and John Crosby’s article series “Mastering OSMF“on the Adobe Developer Connection site .

For information on how Realeyes Media can help you make the switch to HTTP Dynamic Streaming, please feel free to contact us today.
Documentation
Adobe HTTP Dynamic Streaming documentation
Downloads
Flash Media Development Server (free)
Scott Sheridan writes about, and messes around with, the latest technologies in digital motion media at Realeyes. He also does triathlons. Really big triathlons.
Feel free to reach out with any questions-we’re glad to help!
scott AT realeyes DOT com
As technologies related to the production and delivery of digital motion media continue to advance, so do consumer demands for an increasingly varied and rich media viewing experience. High-definition video is now being delivered to more users, on a wider variety of devices, and through more complex networks than ever before. For content providers, this of course means more available avenues for media distribution and monetization.
Then
Traditionally, video has been delivered to the client in one of two ways: either by progressive download using the widely-supported HTTP protocol, or by streaming, using protocols such as RTP, RTMP, UDP, or TCP, in conjunction with specialized server-side software to handle the stream (e.g., Flash Media Server or Windows Media Services). These two delivery methods had both advantages and disadvantages. Streaming media protocols offered the viewer a better experience by allowing the video to play back right away, without having to first wait for it to completely download. They also made possible such features as adaptive bitrate streaming to compensate for fluctuations in user bandwith, live viewing, content encryption, and smart scrubbing. These features often came at a significant cost, however, and as such weren’t a viable option for many content providers. Delivery over HTTP on the other hand, required a complete file download before viewing could start. In addition, content transferred in this way was stored on the end user’s hard drive, and was therefore often not the best solution for displaying copyright-protected content. However, support for the HTTP protocol was, and remains to be, very widespread. Specialized server technology isn’t required to deliver content over HTTP-a simple (and free) web server will do. Being supported by existing and widespread server hardware and caching infrastructures continues to be one of the major advantages of using the HTTP protocol.
Now
In the past, content providers often faced a difficult dilemma. Should they make the relatively large financial investment in order to provide the best streaming video experiences to their end-users? Or would their ROI be better served by delivering a less-robust viewing experience, albeit to a potentially larger audience, over HTTP? Companies such as Move Networks, Microsoft, Adobe, and Apple have come up with their own unique solutions to this problem-the problem of dynamically streaming media over the HTTP protocol. Each solution involves breaking up the encoded media files into smaller chunks, which are then re-assembled by the media player on the client end.
A few adaptive bitrate streaming solutions:
- HTTP Dynamic Streaming – Adobe
- HTTP Live Streaming – Apple
- Smooth Streaming – Microsoft
- Adaptive Bitrate – Octoshape
HTTP Dynamic Streaming – Adobe
Since the release of Adobe Flash Player 10.1, and the Open Source Media Framework 1.0 (OSMF), content delivery providers, creators, and publishers have had the option of leveraging HTTP Dynamic Streaming to vastly increase their reach when it comes to delivering quality video experiences to the client. HTTP Dynamic Streaming (HDS) is a true streaming technology, but not dependent on specialized streaming servers or proprietary transfer protocols. In addition, the tools required to make your media files streamable over HTTP are provided free from Adobe.
To prepare your media for HDS, you do the following:
Package your FLV, F4V, or other MP4-compatible files using the free f4fpackager tool.
Download f4fpackager The f4fpackager is a command line tool available for Windows and Linux that you use to convert your source media files into the necessarily-fragmented files required for streaming. You can get the packager for free on its own, or use the version that ships within Flash Media Server 4.0 and up. The process is fairly simple and quick-much faster than encoding the source files to begin with! To run the packager in Windows, at the command line, “cd” into your Flash Media Server or Apache web server installation’s “tools\f4fpackager” folder. From here, easily run the packager by simply typing “f4″ (then Tab), and let the command window auto-complete your prompt to launch f4fpackager.exe. Give the packager at least the following arguments:
--input-file=<em>theFullPathToYour/Media
--output-path=theFullPathToTheOutputLocationOfYourChoice
Alternatively, you can omit the output argument, and the packager will place the packaged files into the source directory. More packager arguments for doing things like declaring a file’s bitrate, encrypting, etc. can be found here.
If everything goes well, you should have 3 new files for every source file you sent to the packager:
- .F4M (manifest) file
- .F4F (fragment) file
- .F4x (index) file
The manifest file (.F4M) is an XML file that contains pertinent information about your media that the media player parses in order to play back the file appropriately. To learn more about the .F4M, and .F4F file types, please check out John Crosby’s series on HTTP Dynamic Streaming.
Ensure that you have the HTTP Origin Module ready to go.
Install and configure the HTTP Origin Module into an existing Apache web server installation. The HTTP Origin Module is an extension to the Apache web server that is necessary for streaming media via HTTP to the Flash Player. You can download the module here. Alternatively, both the HTTP Origin Module and the Apache web server come bundled and configured with Flash Media Server versions 4.0 and up. *Note* Make sure your Apache server is running. On Windows, by default, the Apache web service start configuration within Flash Media Server 4 is set to “manual”. You may want to switch this to “automatic”.
Place your packaged media files into the vod folder of your Apache web server. (webroot/vod/).
Once you have your files properly packaged, and you’ve installed and configured your Apache web server, as well as the HTTP Origin Module (as a standalone or bundled within Flash Media Server), all you need to do on the server side is place the 3 packaged files into the vod folder within your Apache server, and grab the URL(s) of the media file(s) you wish to stream. *note* Apache is set to listen to port 80 by default, and to switch over to port 8134 if port 80 is in use. However, you may configure your Apache server to listen to any available port.
Configure your media player to point to the URL of the media within your vod directory.
You’re welcome to build your own custom player to stream via HTTP, however, the fine people at Adobe and Realeyes Media have already done a lot of the work for you. Give any or all of the following example players a try:
REOPS Player A powerful, OSMF-based media player from Realeyes Media The Realeyes OSMF Player Sample (REOPS) offers an excellent base for creating a robust video player utilizing the Open Source Media Framework (OSMF) from Adobe. REOPS is meant to be a building block for developers as well as a visual representation to illustrate the capabilities and how to of the OSMF framework. The REOPS project includes a very extensible and robust control bar skinning solution and templates to help customize the control bar, as well as Full-screen support, Closed Captioning from an external file, and OSMF dynamic plugin support. The REOPS project can be used to deploy easily customized video players that support progressive video playback, video on demand streaming, live streaming and dynamic streaming. What is more, all of these features are configurable from an external XML file.
Flash Media Playback A free, standard media player for the Adobe Flash Platform Flash Media Playback can be used by any website with only a few lines of HTML, enabling playback of video and other media in minutes. Its extensible plug-in architecture enables easy integration with content delivery networks (CDNs) and advertising platforms, as well as support for analytics and additional third-party services. With support for the latest delivery methods, Flash Media Playback enables web developers of all levels to fully utilize the powerful video features of the Flash Platform.
Strobe Media Playback A free, OSMF-based media player from Adobe Strobe Media Playback is an Open Source Media Framework (OSMF) based media player that you can quickly and easily integrate into your website. The compiled SWF and its source code are available for free download here.
…Or Build Your Own With These Tutorials! Mastering OSMF-Adobe Developer Connection Series John Crosby and David Hassoun of Realeyes Media have written an excellent series of articles and walkthrough tutorials for teaching us how to work with OSMF. They start with building a simple media player, and then dive deeper into more complex topics such as separating control, incorporating media overlays, as well as integrating and developing custom plugins.
Whether you decide to build your own, or use a media player that’s been provided, you’ll need to point your application to the .F4M file within your Apache server’s vod directory. Again, this is the media manifest file, an XML file that the media player uses to parse important information about the media, such as bitrate, duration, etc..
*Note*
HTTP Dynamic Streaming requires Flash Player 10.1 and above. Any version of OSMF, starting with 1.0, will be capable of HDS.
Streaming Demo
Below is an example of the embedded Flash Media Playback media player delivering a video over HTTP. If you’d like, you can configure your own player here. If you would like to use the same packaged files playing in the demo, you can download them here. Of course, this demonstration is merely showing a video stream via HTTP-it’s not an example of the more powerful features available with HDS, such as variable bitrate switching, encryption, or late-binding audio. Stay tuned for coverage of those topics and more.
Where to go from here
For a more in-depth look into HDS, including discussions on file encryption, and live streaming, please refer to John Crosby’s series on HTTP Dynamic Streaming
For an informative look into the world of OSMF, including deep-dives into such things as building custom media players and plugin integration and development, please see David Hassoun and John Crosby’s article series “Mastering OSMF“on the Adobe Developer Connection site .

For information on how Realeyes Media can help you make the switch to HTTP Dynamic Streaming, please feel free to contact us today.
Documentation
Adobe HTTP Dynamic Streaming documentation
Downloads
Flash Media Development Server (free)
Scott Sheridan writes about, and messes around with, the latest technologies in digital motion media at Realeyes. He also does triathlons. Really big triathlons.
Feel free to reach out with any questions-we’re glad to help!
scott AT realeyes DOT com
Working as a Solutions Engineer, Trainer, Sales Rep, etc. is a task in and of itself. However, it also provides a skill set that not too many people possess, and I value having the ability to, “wear many hats”. Even though I have a little head, I love it!
With that all being said, I’ve been able to devise what compels businesses, EDU institutions, Government Agencies, etc. to look to a solution like Adobe Connect in the first place.
Ready? Good.
1.) Budget – Ok folks, let’s face it. The recession in our economy has impacted everyone to some extent, but it’s imperative in the face of adversity to stand strong and continue onward and upward, right? Adobe Connect offers many features that are an appealing lot to those with budget restraints now versus what they faced before, and Connect facilitates that. Having the ability to utilize Internet connectivity as a means to bring everyone into the same place at the same time for a collaboration session can be worth its weight in gold in some instances. Bringing a whole bunch of people in for a meeting, training, conference, etc. can cost a serious chunk of change. Here’s a neat little app that exemplifies how much Connect can potentially save you.
2.) eLearning/Training – I guess when I was back in school I never really appreciated the value of consistency in education. I can recall when my teachers seemed less excited about class than the day before. I can also recall when some teachers would cut corners on the curriculum. It’s a natural habit, it’s not a crime. But it really drives home the point that monotony can really get to people. The same thing… day in and day out… for x-amount of time… But over the last few years, I’ve really come to realize that consistency in training is paramount. I say this because as I mentioned previously, I never appreciated it like I do now. As an Adobe Certified Instructor, I can tell you firsthand that with face-to-face trainings, it can be difficult to hold a captive audience, and I think that can also be said by hundreds of thousands of other trainers in their respective fields, as well. Utilizing Adobe Connect in conjunction with content authoring tools such as Adobe Presenter and Adobe Captivate gives you piece of mind in knowing that your trainings are being conveyed consistently across an entire network, to every enrollee, every time. As a strong advocate in education and a true belief that, “knowledge is power”, I can truly appreciate consistency in education.
3.) Reach – Getting your message out to the masses can be tedious sometimes. In the workplace, I know from past experience that being the proverbial, “fly on the wall” can be engaging for only so long to some people – me included, especially when you want to interact. Connect offers various interaction functions, not only in the Meeting Room itself but also on-demand. With Adobe Connect, it’s simplified and streamlined to reach out to several or hundreds of people, regardless of their geographical locations and get them all in the same place, and all at the same time. The reach that Connect provides on a global scale is second to none. In all honesty, Connect is best used in the ways that weren’t intended initially. I have an EDU client that allows its students and/or user base to reach out to their families that live in varying geographical locales. This, to me, is a great example of a use case, and it humbles me to know that I may have played a small role in allowing for a family to maintain contact in such a robust manner. Worldwide, Connect isn’t limited to where, and who it can reach. It just… does.
4.) Simplicity – I know, I know. There’s that old adage, “technology complicates simplicity”. In some cases, this can be very true and I don’t dispute that. But I’m also reminded of times when web conferencing tools were really beginning to emerge, and I remember saying to myself, “well, that seems simple enough. Pretty logical, too.” All that said, it never occurred to me until I began my role here how simplistic the concept of web conferencing is in general, but how complicated some tools can be at the same time. Realistically, it’d be ideal if the tools to execute a successful webinar, collaboration session, and etc. all ran how they’re supposed to at all times, but that’s not the case. I believe it’s known as Murphy’s Law. Adobe Connect is powerful, yet simplistic at the same time. Really, all that’s needed is an Internet connection and Flash. Simple enough, right? A lot of the clients that I work with appreciate the simplicity of Connect for a number of reasons, and while I’m not going to name them all, I can safely say that they appreciated the simplicity of Connect then, and even more so now since they’ve had a chance to dive into the product as a whole.
5.) Integration – Now, it’s time to get a little technical. Adobe Connect offers some of the deepest integration out of any web conferencing and eLearning platforms available. Thanks to the available API’s (Application Protocol Interface) that Connect utilizes, it can also be an integral part of the systems that are already utilized. Day in and day out, both instructors and students rely heavily on their institution’s centralized computer system. More now than ever, online classes have become much more popular (I see commercials for websites that claim to “match” you with the best online program) because of the convenience it offers, it’s easier to work your schedule around. In Higher Education institutions, LMS’s (Learning Management System) are very prominent, and Connect integrates with the majority of them that are publicly and/or commercially available. Due to the popularity and growing interest in taking classes online, LMS integration is an imperative. While Adobe Connect is also considered a lightweight LMS in its own right, integration with your native LMS offers a better learning experience overall for the students. SSO (Single Sign On)? Yep, it does that. Lightweight Directory Access Protocol (LDAP)? Indeed it does. AD (Active Directory)? Affirmative.
I could go on and on about what Adobe Connect does, but the key is to check it out for yourself to see how it can work for you.
Thanks for reading, and please don’t hesitate to contact me with any questions.
Jeff Dicker
jeff AT realeyesconnect DOT com
Today Adobe announced the release of the latest sprint for OSMF 1.6, and it includes some exciting new features in terms of how it can handle audio. The biggest new feature is support for multiple audio tracks for HTTP Dynamic Streaming. Known as “late-binding audio”, this methodology allows producers to present multiple audio-only tracks attached to a particular video to the end user. Consider, for example, the need to deliver videos in more than one language. Late-binding audio allows producers to include seperate audio tracks for each language, and then have the viewer choose the appropriate one based on their needs. The benefits to having multiple audio tracks associated with a single video file are savings in encoding time, as well as reduced storage requirements-much more efficient than having to encode and store several different versions of each video. OSMF also supports the ability to switch between audio tracks during playback, which allows even more flexibility in terms of what kind of user experiences are possible.
Currently late-binding audio is available for video-on-demand only, but Adobe promises live/linear support in their next drop.
Check out the original announcement here.

On April 29 of this year, the world, (well, a little less than a third of the world, ~2 Billion people) witnessed the marriage of Catherine and William live as the Royal Wedding was broadcast to the masses from the U.K. A significant number of these viewers (over 3 Million concurrent viewers) successfully viewed the event live by streaming video from live content providers such as Akamai, UStream, YouTube Live, and Yahoo that utilize Flash Media Server and the RTMP protocol. Akamai reported a peak of 2.9 Million concurrent streams, a number which is nearly double that of its previous record-1.6 Million streams for the 2010 FIFA World Cup. UStream also had impressive numbers to report, with 330,000 concurrent streams coming through their system for the event. Yahoo also reported record traffic, with over 50,000 requests made per second, 27 Million video streams, and 2.6 Million live streams that day.

Image taken from gigaom.com
Despite fears that an event of this magnitude would strain the delivery capabilities of the internet to the point of failure, there were no reported issues related to content streamed with Flash Media Server. This successful display of streaming prowess is even more impressive when you take into account that the Royal Wedding’s demands on live streaming caused a 100% increase in RTMP usage, and represented 4% of all internet activity for that day. It was also reported that non-live Flash video streaming utilizing other protocols grew only marginally.
This is, of course great news for consumers of streaming media, considering the 99% penetration of the Adobe Flash Player on computers worldwide. The last Five years have shown remarkable improvements in what consumers can expect from the quality of streaming media experiences, regardless of the amount of concurrent users accessing the media. Indeed, considering that only Five years ago, there were virtually no live streams being served by Flash, it is safe to say that Adobe is on an upward trajectory, and will no doubt be able to handle the large-scale, streaming media events yet to come.
Digital-Tutors is a recognized leader in on-demand training for the motion graphics industry, partnering with leading design studios, software manufacturers, and educational institutions. To extend their platform of web and mobile video applications, Digital-Tutors worked with RealEyes Media to create a new version of their online training library that would allow users to download lessons and courses for offline viewing, while continuing to advance the features in their training platform: Digital-Tutors Vault.
Today, Digital-Tutors is releasing the second major release of Vault, coupled with a new Web application that brings Vault’s advanced user interface and much of its functionality to the browser. Curious about what all the fuss is about? Vault 1.6 includes enhanced group functionality and updates to Digital-Tutors’ streaming technology.
Digital-Tutors Vault provides digital visual artists at all experience levels the opportunity to stream training content while online and use a credits system to download and lease DRM protected content for offline viewing. All users are welcomed to the application with an HTML experience that is seamlessly integrated into the application. Through an API, the HTML pages can execute actions in the parent AIR application, allowing Digital-Tutors to highlight important content easily. To keep content fresh, Vault has an integrated asset and data update system that ensures users have the most up-to-date local catalog assets. In fact, the AIR application is bundled with catalog assets (local database, images, HTML, and JavaScript) so users experience a robust application right from the start – even when offline.
With the ability to move category tabs such as Browse and Playlists as well as create and organize custom tags, notes and video clips, Vault provides an extremely customizable digital learning environment. The Vault application also automatically syncs custom user data across Digital-Tutors suite of applications, including web and iPhone, so that items like view progress and clips are consistent across all of a user’s devices.
Want to experience Vault for yourself: http://www.digitaltutors.com/09/vault.php
RealEyes is pleased to announce the launch of a new series dedicated to making sense of the vast world of digital audio. This series will consist of an ever-expanding collection of posts that aim to provide information about digital audio principles in the form of articles and tutorial-walkthroughs. Topics to be covered include:
- Acoustic-to-Analog-to-Digital conversion
- Soundwaves
- Db
- Nyquist Theorem
- Sample rate/bit depth
- Recording best-practices
- Editing
- Audio effects
- DAW’s (digital audio workstations)
- Exporting to different filetypes
- MIDI
- Audio for the web
- Audio and Actionscript
- Much more!
…Stay tuned!















