
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>From inspiration to realization &#187; Flash media server</title>
	<atom:link href="http://www.kensodev.com/category/flash-media-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kensodev.com</link>
	<description>Professional web/RIA development blog</description>
	<lastBuildDate>Sun, 05 Sep 2010 05:44:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>flash media server security&#160;hardening</title>
		<link>http://www.kensodev.com/2010/07/25/flash-media-server-security-hardening/</link>
		<comments>http://www.kensodev.com/2010/07/25/flash-media-server-security-hardening/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 12:51:43 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Flash media server]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash player]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=524</guid>
		<description><![CDATA[today, while browsing my feed in google reader, I found something very interesting. this link is a hardening guide for flash media server. for quite some time now I have been developing and consulting on flash media server advanced topics, I have been teaching students and consulting companies on issues regarding this great peace of [...]]]></description>
			<content:encoded><![CDATA[<p>today, while browsing my feed in google reader, I found something very interesting.<br />
this <a href="http://www.adobe.com/devnet/flashmediaserver/articles/hardening_guide.html">link</a> is a hardening guide for flash media server.</p>
<p>for quite some time now I have been developing and consulting on flash media server advanced topics, I have been teaching students and consulting companies on issues regarding this great peace of software.</p>
<p>Adobe seemed vert silent about this product for some time, not publishing any new materials what so ever, so it was very nice to see this link, I read it and it has some good observations and very well written instructions on how to harden your server.</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="flash media server security hardening - From inspiration to realization" data-url="http://www.kensodev.com/2010/07/25/flash-media-server-security-hardening/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/07/25/flash-media-server-security-hardening/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic streaming (Adaptive bitrate) using Flash media&#160;Server</title>
		<link>http://www.kensodev.com/2010/04/15/dynamic-streamin-adaptive-bitrate-using-flash-media-server/</link>
		<comments>http://www.kensodev.com/2010/04/15/dynamic-streamin-adaptive-bitrate-using-flash-media-server/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 18:56:09 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Flash media server]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash player]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=417</guid>
		<description><![CDATA[Video and the web are long time friends already, you see lots of websites with some sot of player for video content, you also see media companies and television channels serving video over the wire to the end users. Video can be downloaded (progressive download) to the client like YouTube or can be streamed to [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-418" href="http://www.kensodev.com/wp-content/uploads/2010/04/fms.png"><img class="alignleft size-thumbnail wp-image-418" title="Flash Media Server" src="http://www.kensodev.com/wp-content/uploads/2010/04/fms-150x150.png" alt="" width="150" height="150" /></a>Video and the web are long time friends already, you see lots of websites with some sot of player for video content, you also see media companies and television channels serving video over the wire to the end users.</p>
<p>Video can be downloaded (progressive download) to the client like YouTube or can be streamed to him.</p>
<p>I won&#8217;t discuss the pro&#8217;s &amp; con&#8217;s of streaming and progressive, we will only be discussing streaming in this post.</p>
<p>So, What is the post worthy problem we have when streaming video to the client?</p>
<p>Continue reading and find out.<br />
<span id="more-417"></span>When streaming video, you usually encode your video in a certain bitrate, this bitrate will work well in certain computers and won&#8217;t work well in others.</p>
<p>Why is that?</p>
<p>That&#8217;s because each of your users has a different connection thus being capable to receive a limited amount of bytes streamed to him.</p>
<p>So, you always have to find the &#8220;sweet spot&#8221; where you deliver a video that looks good and also light enough to fit a wider range of network connection speeds.</p>
<p>That is of course a problem becuase sometimes you want to stream hiQuality video and audio (HD) and you can&#8217;t because some of your users won&#8217;t be able to watch it smoothly.</p>
<p>Well, this is a problem we will solve here in this post.</p>
<p>Flash media server introduced a new way of streaming video to the client, it is called dynamic streaming and it is very dynamic (name implies just that).</p>
<p>That way, you can create several encodes to the same source movie and supply a movie best fit to the user cosuming it.</p>
<p>Another obvious advantage of this approach is the way it skips on top of the movie, when you skip to a further point in the movie, you are actually being supplied a different movie from the lowest quality to the highest.</p>
<p>So, how is it done, first, let&#8217;s create a flash file (I&#8217;m using flash CS4).</p>
<p style="text-align: center;"><a rel="facebox" href="http://www.kensodev.com/wp-content/uploads/2010/04/Screen-shot-2010-04-15-at-9.37.06-PM.png"><img class="aligncenter size-medium wp-image-419" title="New flash file (Adaptive bitrate) dynamic streaming" src="http://www.kensodev.com/wp-content/uploads/2010/04/Screen-shot-2010-04-15-at-9.37.06-PM-300x171.png" alt="" width="300" height="171" /></a></p>
<p>Now, we will create (by dragging and dropping from the components panel) an FLVPlayback control.</p>
<p>We will give it the same dimensions as the movie itself so it will fill the entire surface.</p>
<p>Now, we will give the player an instance name of &#8220;flvPlayer&#8221;</p>
<p>so, we have a movie, we have an FLVPlayback control, we called it &#8220;flvPlayer&#8221;.</p>
<p>We will create another layer, called &#8220;action script&#8221; and we will create this code inside.</p>
<pre class="brush: as3;">
import fl.video.*;
VideoPlayer.iNCManagerClass = NCManagerDynamicStream;
flvPlayer.source = &quot;dynamicStream.smil&quot;;
</pre>
<p>OK, so as we can see we created a pointer to a file called &#8220;dynamicStream.smil&#8221;, this is a special file (XML format).</p>
<p>This file details the following</p>
<ul>
<li>FMS Url</li>
<li>files you have encoded and a network speed in correlation</li>
</ul>
<p>The file looks like this:</p>
<pre class="brush: xml;">
&lt;smil&gt;
    &lt;head&gt;
        &lt;meta base=&quot;rtmp://your_fms_location/vod/&quot; /&gt;
    &lt;/head&gt;
    &lt;body&gt;
	&lt;switch&gt;
		&lt;video src=&quot;mp4:erets7_03_vod1_300.mp4&quot; system-bitrate=&quot;300000&quot;/&gt;
		&lt;video src=&quot;mp4:erets7_03_vod1_500.mp4&quot; system-bitrate=&quot;500000&quot;/&gt;
		&lt;video src=&quot;mp4:erets7_03_vod1_800.mp4&quot; system-bitrate=&quot;800000&quot;/&gt;
        &lt;/switch&gt;
    &lt;/body&gt;
&lt;/smil&gt;
</pre>
<p>Now, when we put this file on our web-server, the user will get the file it can receive and play, not slower, not faster, just the perfect file for him.</p>
<p>NO buffering, NO waiting, NO frustration, smooth, cool and fast user experience.</p>
<p>Good luck.</p>
<p>You can download the complete solution from here:<br />
<a class="downloadlink" href="http://www.kensodev.com/wp-content/plugins/download-monitor/download.php?id=dynamic_streaming.zip" title=" downloaded 112 times" >Source - Dynamic streaming (flash media server) (112)</a></p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Dynamic streaming (Adaptive bitrate) using Flash media Server - From inspiration to realization" data-url="http://www.kensodev.com/2010/04/15/dynamic-streamin-adaptive-bitrate-using-flash-media-server/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/04/15/dynamic-streamin-adaptive-bitrate-using-flash-media-server/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Flash media server statistics using&#160;sawMill</title>
		<link>http://www.kensodev.com/2010/03/14/flash-media-server-statistics-using-sawmill/</link>
		<comments>http://www.kensodev.com/2010/03/14/flash-media-server-statistics-using-sawmill/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 06:40:50 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Flash media server]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash player]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=370</guid>
		<description><![CDATA[I have been using Flash Media Server for a while now, at least 3 years, I implemented solutions on top of this amazing products for clients in wide ranges like Start-Up companies, E-Learning systems and more. Flash media server has some disadvantages, one of those is definitely the lack of normal statistics. The terminal will [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-371" href="http://www.kensodev.com/wp-content/uploads/2010/03/graphics-statistics-graph-preview3-by-dragonart.png"><img class="alignleft size-thumbnail wp-image-371" title="Stats" src="http://www.kensodev.com/wp-content/uploads/2010/03/graphics-statistics-graph-preview3-by-dragonart-150x150.png" alt="" width="150" height="150" /></a>I have been using Flash Media Server for a while now, at least 3 years, I implemented solutions on top of this amazing products for clients in wide ranges like Start-Up companies, E-Learning systems and more.</p>
<p>Flash media server has some disadvantages, one of those is definitely the lack of normal statistics. The terminal will give you the real time data but if you want to drill down into last month and 3 month ago or more, you won&#8217;t be able to get any data in a comfortable and nice view.<br />
<span id="more-370"></span><br />
I found a product called <a href="http://www.sawmill.net/" target="_blank">SawMill</a>, this product is unobtrusive on your flash media server, you don&#8217;t even have to install it on your server.</p>
<p>So, how can you get Stats you ask?</p>
<p>Well, you simply install the product, you give it a path to your log files and it will do the rest, it has a built in support for the Flash Media Server log format so you don&#8217;t have to &#8220;teach&#8221; it how to read the logs or do any kind of configuration.</p>
<p>You have stats like:</p>
<ul>
<li>Client Ip&#8217;s</li>
<li>Media files played</li>
<li>amount of data streamed</li>
<li>time of use</li>
<li>pressure hours</li>
</ul>
<p>and many more of course, the real treat is that you can drill down from year to month to day to hourly stats.</p>
<p>Those can come in handy if you want to learn more about your website and the usage.</p>
<p>Example of what a stat sheet looks like:</p>
<p><a rel="attachment wp-att-372" href="http://www.kensodev.com/wp-content/uploads/2010/03/Screen-shot-2010-03-14-at-8.35.22-AM.png"><img class="aligncenter size-medium wp-image-372" title="SawMill Stats" src="http://www.kensodev.com/wp-content/uploads/2010/03/Screen-shot-2010-03-14-at-8.35.22-AM-300x121.png" alt="SawMill stats" width="300" height="121" /></a></p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Flash media server statistics using sawMill - From inspiration to realization" data-url="http://www.kensodev.com/2010/03/14/flash-media-server-statistics-using-sawmill/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/03/14/flash-media-server-statistics-using-sawmill/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RTMP being blocked by firewalls &#8211; Flash media&#160;server</title>
		<link>http://www.kensodev.com/2010/02/19/rtmp-being-blocked-by-firewalls-flash-media-server/</link>
		<comments>http://www.kensodev.com/2010/02/19/rtmp-being-blocked-by-firewalls-flash-media-server/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 17:34:27 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Flash media server]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash player]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=359</guid>
		<description><![CDATA[If you ever worked with Flash media server or any other media server for that matter you probably know they are not working with the regular Internet protocol which is HTTP, all of the media servers (almost all at least) are working on top of a protocol called RTMP. Now, if you have users working [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-360" href="http://www.kensodev.com/wp-content/uploads/2010/02/FMS.logo_.jpg"><img class="alignleft size-thumbnail wp-image-360" title="Flash media server logo" src="http://www.kensodev.com/wp-content/uploads/2010/02/FMS.logo_-150x150.jpg" alt="" width="150" height="150" /></a>If you ever worked with <a href="http://www.adobe.com/products/flashmediaserver/" target="_blank">Flash media server</a> or any other media server for that matter you probably know they are not working with the regular Internet protocol which is HTTP, all of the media servers (almost all at least) are working on top of a protocol called <a href="http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol" target="_blank">RTMP</a>.</p>
<p>Now, if you have users working behind a firewall, they probably can&#8217;t get passed it&#8217;s restrictions and they will (in most cases) be blocked and unable to see your application / video.</p>
<p>If you are working on a server like WebOrb (I&#8217;m working with it) then the data will also be blocked, and that is a bug issue</p>
<p>Here&#8217;s a way to solve this<br />
<span id="more-359"></span></p>
<p>Well, let&#8217;s first talk a bit more about RTMP, before ditching it and moving on.</p>
<p>With flash media server you can use RTMP over a few ports (1935, 80), 1935 will probably always be blocked because it is not a known port and even simple routers often block it.</p>
<p>port 80 makes things a bit more complicated, you have to make FMS listen to a specific IP or your web-server (if on the same server) will not work.</p>
<p>So, first rule is always use port 80, this is one way to make more users be able to connect to your application, watch your videos and interact with your service.</p>
<p>The connection is being made like so:</p>
<p>rtmp://your_ip_address:80/app_name</p>
<p>DO NOT use any type of arrays of ports, simply use port 80, if the client can&#8217;t connect to RTMP on port 80, he will no be able to connect on RTMP no matter the port you are using.</p>
<p><strong>So, What am I actually saying over here&#8230;?</strong></p>
<p>I&#8217;m saying you should only make 1 connection attemp, this attempt is on port 80 using RTMP, this should be your first choice, if the connection is unsuccesful, you should move the connection to use RTMPT which is RTMP encapsulated over HTTP, firewalls will not block this connection becuase it makes RTMP &#8220;hide&#8221; behind HTTP traffic on port 80.</p>
<p>The connection is made practically the same way</p>
<p>rtmpt://your_ip_address:80/app_name</p>
<p><strong>Why not use RTMPT at all times?</strong></p>
<p>You should not use RTMPT at all times because there&#8217;s a performance issue, there is an overhead on top of each packet sent.</p>
<p><strong>Why not go through all the possible ports with RTMP first, Why only 80?</strong></p>
<p>In most cases, firewalls will block every port (but 80), the timeouts the user will have to go through will be very long before he will finally be redirected to RTMPT.</p>
<p>I will post some code on how to fallback more efficiently later on this week, this post was actually inspired from a client&#8217;s solution I did this week during a consulting session.</p>
<p>Good luck</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="RTMP being blocked by firewalls - Flash media server - From inspiration to realization" data-url="http://www.kensodev.com/2010/02/19/rtmp-being-blocked-by-firewalls-flash-media-server/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/02/19/rtmp-being-blocked-by-firewalls-flash-media-server/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
