Flash Media Server to Adobe Connect

08_19_2015 Update

I made a few changes to this custom pod. You can register to download at the bottom of this article. The new file will be called fp10VideoPlayer.zip. Some of the changes were simple bug fixes for instance there was a problem accessing a stream with an mp4 extension and prefix, that is now fixed. That means that you should be able to use this with a CDN such as Akamai. Another highly requested feature was the ability to resize the video, that should now be possible. I have not done a lot of testing so use at your own risk.

In this article I will describe how to use a recently created custom pod for Adobe Connect. This custom pod is provided free of change and is provided as is with no additional support or warranty (how is that for some lawyer speak). Briefly, this custom pod allows you to stream high frame rate video from the Adobe Flash Media Server to an Adobe Connect meeting room. I used the collaboration sdk to create a shared experience. In other words if you are a host in a meeting room you can load and setup a connection to both live and ondemand video that you control for the meeting participants. As the host you make the connection and choose the video and when you hit play all participants will see that the video has started to play. This is very different than a typical video player where each individual has their own experience and could be watching different sections of a the same or different videos. This custom pod understands the different Adobe Connect meeting roles (i.e. host, presenter, participant). Only the host has interface elements (buttons, progressbar, etc…). Admittedly  the user interface could use some work and I do intend to improve it so do not beat me up too bad but also do not hesitate to give me advice on improvements.

The following is a simple diagram of the workflow.

Live Video Workflow for Custom Pod
A) Flash Media Encoder B) Flash Media Server C) Custom Pod in Connect Meeting

There are many considerations when ever you consider streaming high quality video. First of all the camera is an important part of the equation. I did a number of tests with web cameras and found that two of the three web cameras that I tested could not consistently produce 30 frames per second of video. Do not skimp on a quality camera. The second, third and fourth and and and considerations are all BANDWIDTH. You cannot stream a 500 kbps stream over a connection that only has 300 kbps available. There are many people that are confused about bandwidth but it is fairly simple. If you look at the diagram above you will notice that you have to send the encoded stream from the camera / laptop to the Flash Media Server and then on to Adobe Connect. You need the appropriate amount of bandwidth at each step. It is not enough to have a great connection from FMS (Flash Media Server) to Adobe Connect you also need an appropriate connection from the source (camera / laptop) to FMS. Often someone assumes that because their wireless card mentioned 54 Mbps that they are covered for streaming video. The key consideration is “usable bandwidth”. I have included the ability to test bandwidth in this application as well as a status indicator that will give you an idea if your connection is appropriate for the video you are attempting to stream.  It is also important to note that available bandwidth changes continuously.  You might find that you do a bandwidth test and have plenty and thirty seconds later you have half as much. It is best not to use a wireless connection as their is more variability and more unknowns with a wireless connection versus a wired connection.

Custom Pod UI:

Lets walk through some of the functionality of the custom pod.  After it is uploaded to a share pod inside of Adobe Connect it should look like the following:

Adobe Connect Custom Video Pod
Adobe Connect Custom Video Pod

The first thing you should understand is that this is the interface that the host will see when they upload the custom pod. The dark green in the progress bar shows the progress of the playing video. The dark blue shows the size of the current buffer. If you do not see any dark blue then there is no buffer and you are probably not having a great play back experience. You will not see a progress bar for live video as there is not enough buffer to show. Notice the green status indicator in the upper left hand corner of the screen.  This indicator will be seen by both hosts presenters and participants. This indicator shows only the local connection status. In other words if you are looking at this indicator it shows your status not a combined or status of other individuals in the meeting. The following table gives a brief highlight of the states and meanings.

  This indicates no connection. Each time you connect the indicator will turn green initially and each time you disconnect it will turn black.
  This indicates the initial connection as well as a video that has enough bandwidth to play and keep up with the video that is being sent from the Flash Media Server.
  This indicates that there are or have been issues with the video playback. Often times this is represents a temporary condition so do not panic the first time you see the indicator turn orange or red.
  This indicates that the issues are getting worse but as stated before this can be temporary so give it at least a few seconds and see if the condition improves.

If someone in the meeting mentions that the video playback is not smooth or the quality is not great you could ask them what the color of the indicator is to get an idea if the problem is bandwidth related. This indicator does not indicate a change in frames per second. It is possible to retrieve fps data from the metadata of the stream but it seems that this does not indicate that actual fps on the passed on from the encoder (e.g. Flash Media Live Encoder).

Adobe Connect Meeting Host:

You will notice that each role in an Adobe Connect meeting has a slightly different view of this custom pod. The host has complete control. As a mater of fact the first host to upload the custom pod retains complete control and all other hosts will see the controls but will only be controlling their local experience. With that said I think that it is a good practice to have only a single host in most if not all meetings. More than one presenter is not an issue but more that one host can create issues regardless if you are using this custom pod or not.  The following is the host view of the custom pod:

Custom Pod with Settings Visible
Custom Pod with Settings Visible

Workflow for live video:

The first step to playing live video is to have a live video source. Keep in mind that if you intend to use a simple web camera your quality will probably not be that much better than what you would get out of the default camera support in Adobe Connect. If on the other hand you have a higher quality camera or would like a higher frame rate follow these steps.

1) setup a computer with enough horse power to encode the video and with enough bandwidth to send that video to the Flash Media Server. Download and install the free Flash Media Live Encoder.

2) setup or use an existing Flash Media Server. There are a great number of resources for getting started with the Flash Media Server.

3) upload the custom pod. The custom pod is in a zip archive. In a share pod in Adobe Connect simply locate the custom pod zip archive on your computer and upload the entire zip.

4) enter the server url and stream name for the video that you are publishing from the Flash Media Live Encoder. It is a simple matter to find the connection stream for the server. You will notice by the example above the entry field that it starts with rtmp. This is the realtime message protocol used by FMS. The next element in the connection stream is the server ip address or dns name. After the slash following the server name or ip address is the application name. This may seem a little strange but this represents a folder name inside the application folder inside the installation folder of the Flash Media Server. Once you have the Flash Media Server installed find the installation folder and open it and inside you will find the application folder. Inside of the application folder you will find a vod and live directory. These are the default applications. If we analyze the following connection url, rtmp is the protocol, the ip address is the address of the Flash Media Server and vod represents the default directory for ondemand streams (i.e. files) inside the application directory.

rtmp://192.168.0.2/vod

The stream name is what ever the file name is for ondemand or what ever name you entered into the Flash Media Live Encoder.

Flash Media Encoder Output Panel
Flash Media Encoder Output Panel

After the all the elements of the workflow are in place it is time to turn on the camera and stream the video from Flash Media Live Encoder to FMS. This is a pretty straight forward task, simply hit the start button in Flash Media Live Encoder.

Once the live video is streaming to Flash Media Server it is time to connect to and play the live stream into the custom pod inside of Adobe Connect.

Custom Pod Settings Panel
Custom Pod Settings Panel

This is the settings panel for the Custom Pod that you will use in the Adobe Connect Meeting room. It allows you to setup and make a connection to the Flash Media Server. It also allows you to choose between ondemand and live streams and test your bandwidth. Notice that the stream name is the same as the the stream field in the Flash Media Live Encoder. If these do not match you will not see video in the custom pod. Also notice that if you want to view live video you must select the Live Stream check box.

Well I think that about covers it. I will post the link to down load the custom pod later today along with a few other links that might be helpful. Please drop me a comment to let me know if it is working or not and any improvements that you would like to see.

I put together a short overview presentation of the custom pod functionality and setup. If you would like to jump right to the link that allows you to register for download it is on slide eight. Please let me know what you think. Note: If you are having trouble with the registration page clear the cache on your browser and reload the page.

Sound Quality

Some of you may know that I have tried my hand at encoding video. I have come up with settings that I have found work fairly well in Adobe Connect. With that said I have always turned down the quality of the audio but wondered if people actually noticed. I found an article with audio samples that tells me that they may not. Give it a try and let me know how you did on the tests.

High End Cameras and Adobe Connect

For some time I have been looking at ways to expand the use of high end video cameras with Adobe Connect. There are many reasons to consider higher end cameras not the least of which are optics, sensor size and quality, features, etc… If you need convincing the following should help.

Megapixel vs Sensor Size

Camera sensor size: Why does it matter and exactly how big are they?

I was recently given an opportunity to test the Matrox MX02 Mini and jumped at the chance.

box_800

 

What better way to test it than with my Canon 5D Mark III.  I have really enjoyed using this camera for both stills as well as video.

matrox with blur_HDR3_400

The Matrox MX02 mini gave me the opportunity to see how the Canon camera and Adobe Connect would  work together.  The initial setup was fairly easy. I requested the model that came with a ExpressCard/34 adapter so that I could use my laptop.  On a slightly humorous note my laptop only has a full size ExpressCard slot so a little adjustment was required.

cardboard_adaptor_400

It turns out that cardboard like duct tape has many uses. This was obviously not a short coming of the MX02 Mini but none the less easily overcome.  I decided to use the HDMI input for the test.  The Canon 5D Mark III requires a mini HDMI connector.  I thought I had every adapter made but it turns out a mini HDMI was not one of them, a quick trip to Fry’s fixed that problem.

Matrox AppsThere is software to install for this setup to work.  The installation was easy and included a number of applications. With that said in the end the only software I used was the Matrox USB Webcam Emulator utility.  As you might expect this utility allows the MX02 Mini to appear to the PC as if it were a webcam, making it easy to use with Adobe Connect.   There are five popup boxes in the USB Webcam Emulator: Video Input Format, Video Input Source, Audio Input Source, Video Frame Size and Video Frame Rate. The first three, as expected, have to do with the video device you have connected to the MX02 Mini and the last two have to do with the video output from the MX02 Mini.

Matrox Prefs

I set the output on the Canon camera to 1920 @30 fps (frames per second) IPB. In the Matrox USB Webcam Emulator I set the Video Input Format to 1080@29.97 fps. Since I used HDMI I set the Video Input Source to HDMI and the Audio Input Source to HDMI Channel 1-2. I did not test the RCA left and right for audio input source.

Adobe Connect supports six input resolutions, three for a 4:3 aspect ratio and three for 16:9 aspect ratio. The 4:3 resolutions are: 160×120, 320×240 and 640×480. The 16:9 resolutions are: 214×120, 427×240 and 854×480. Choose the Video Frame Size (video output resolution) that is closest to one of the supported Connect resolutions. For instance the MX02 Mini does not have 427×240 but it does have 424×240. The same is true for 854×480 but it does support 852×480. If you need to change the input or output parameters you may have to restart the Connect meeting/seminar room in order for the settings to take effect. Luckily this is a simple matter with Adobe Connect, simply refresh the browser tab that was used to launch the meeting/seminar room.

Make sure that you have the correct settings in Adobe Connect to match your settings in the Matrox USB Webcam Emulator. As stated previously Adobe Connect supports the following video input resolutions:

4:3 aspect ratio: 160×120, 320×240, 640×480
16:9 aspect ratio: 214×120, 427×240, 854×480

Notice that in the Connect video preference settings of your meeting room there is a slider with four steps (settings).

Video_Quality_Slider

Each of the slider steps corresponds to a particular resolution, frame rate and compression amount.  At this point we are only concerned about resolution.  The following shows the resolution for both the 4:3 and 16:9 aspect ratio for each setting on the slider from right to left (highest being on the far right of the slider).

 Quality  Resolution (4:3 )  Resolution (16:9 )
 High  640×480  854×480
 Standard  320×240  427×240
 Medium  320×240  427×240
 Low  160×120  214×120

As an example, if your output (Video Frame Size) on the Matrox USB Webcam Emulator was set to 852×480 you would want to use the following settings for the video preferences in the Adobe Connect meeting/seminar room.

ConnectVideoPreferences_664

 

I found the Matrox MX02 Mini, Canon 5D Mark III and Adobe Connect to be a great combination.

Camera Test

On several occasions I have had discussions with individuals regarding camera quality. There are two elements regarding quality, subjective and objective quality.  Obviously each individual can look at the image produced and make up there own mind. In some cases it is helpful to have some objective data to help elucidate the individuals assumptions. To that end I posted a simple test.

Simply choose a typical resolution and click the test button. The video that you see show up in the application is not to scale, it is 1/3 scale. The key element is the frame per second metric and the capture size. Not all cameras will support all of these resolutions so you may notice that the capture size is not the same as the resolution that you selected. You should use a browser other than Chrome. In other words Firefox, IE, etc… The reason I say this is that Google decided to write their own Flash player that does not act the same as the Adobe Flash player. As an example if you run this test in Chrome and select a resolution that is not supported by your webcam you will not see the resolution change but if you run this using the Adobe Flash player and choose a resolution that is not supported by your webcam you will see the resolution that is supported. This is a pretty cool ability because you can see what resolutions are supported by your webcam.

 

Capture

FLV Checker

Some of you maybe familiar with the FLVCheck tool that allows you to check to see if a Flash video is properly formatted. If you are you would also know that it is a command prompt application (i.e. there is no user interface). To get familiar with the ability to use native process support in Adobe AIR I wrapped the FLVCheck tool in a simple Flex application. This is a simple UI that allows you to drag and drop and flv file onto the application so that it can check the format and fix simple issues. This application does not add any functionality to that application all it does is add a user interface. The application is free but I do ask that you register in order to download. You will also find the Adobe Connect custom video pod at the same location after you are registered. If the registration form does not load, clear your browser cache and try again.

Flash Media Server 4 brings Multicast to Flash Video

In case you missed it Adobe announced Flash Media Server 4 . This is a significant release for a number of reasons. The first reason is that many corporate customers have been interested in Flash video but were not able to take advantage of it with out support for IP Multicast as this technology was a mandate from their IT organization. In other words this update for the Flash Media Server to version four gets you a 64bit architecture, Absolute timecode, faster seeking, trick mode playback (fast motion, slow motion, and frame stepping), intelligent reconnect, faster switching for RTMP Dynamic Streaming and IP Multicast Support.

Using version 4  of the interactive edition of the Flash Media Server gets you the ability to choose between Unicast (with or with out Origin / Edge), IP Multicast and even Live HTTP Dynamic Streaming. It is even possible to failover from IP Multicast to a Unicast stream if necessary. When you consider all of the possibilities they include:

  • Interactive applications that support video, audio and data for one to many and many to many for both live and video on demand
  • Large scale broadcasts using IP Multicast
  • Origin / Edge solutions that can be used to intelligently reduce bandwidth requirements for vod
  • Failover for complex environments with different network requirements (e.g. remote sites, vpn)

That is a short summary of the possibilities that you get with the interactive edition of the Flash Media Server but that was not the only announcement. Adobe also announced Adobe® Flash® Media Enterprise Server 4. If you are not familiar with RTMFP that would be a good place to start. This peer protocol will allow you to take advantage of users / viewers upstream bandwidth to broadcast video, audio and data in your application and now the Flash® Media Enterprise Server 4 can participate in those groups. So consider the limitations of a peer broadcast. First you will only have access to the one video codec that can encode that is part of the Flash Player and that is Sorenson Spark. If you are familiar with Sorenson Spark you know that the quality leaves something to be desired. When you consider that the Flash® Media Enterprise Server 4 can act as a peer using RTMFP you now have access to all of the varied video formats that can be broadcast using the server (On2, H.264,…). It is also important to note that you are not limited to just video when you are using Peer Assisted Multicast (RTMFP) you can include data as well. These applications can include interactivity unlike IP Multicast. Of course there are considerations that include additional latency based on the number and location of peers in a group but the possibilities are amazing. Just consider an internet based application that includes video and interactivity with 10k concurrent users. With out a peer solution you would have to invest in a significant number of servers as well as a significant amount of bandwidth. With the Flash® Media Enterprise Server 4 you could address both server and bandwidth requirements with a small fraction of what it would take with a Unicast solution. The cost savings will be significant.

Test Media Player

After numerous calls to help people confirm that the server was working correctly I decided to write a media player that would help test and confirm the ability to stream video from the Flash Media Server. This player is provided as is with no warranty or support but I hope you will find it useful. This is an AIR based player.  I created it for AIR for a number of reasons not the least of which that it was easy to install and run locally with out the need for an http server. I have already thought of a few additions so let me know if you find it useful. It is simple to use, just enter the url to some media on an FMS server in the following form:

URL Syntax: rtmp://[servername]/[application]/[streamname+extension]

1)     [servername]: this is the IP Address, or the domain name of your server. (i.e. localhost)
2)     [application]: use “vod” unless you have created a new directory in the application folder of the Flash Media Server installation directory. There are two built in applications vod and live.
4)   [streamname]: use the name of your video file (including the extension). The extension can be flv, f4v or mp4. You do not need to prefix the file name with the content type (e.g. mp4:).

The application reports Current Bitrate, Dropped Frames as well as Max Bytes Per Second and other useful messages. When you stop the video you will be presented with a graph and grid of the captured data.

AIR Test Media Player
AIR Test Media Player

You can download the application here.