19 December, 2009
Adobe updates FMS

Today Adobe has released the third update of FMS 3.5 (3.5.3). This is not only a bug fix release but implements new features supported by Flash Player 10.1. I'm trying to play with these new features right now and they are very interesting, especially the possibility to control the buffer and seek inside it for slow motion, fast forward and fasr rewind effects.

For more info I suggest Kevin Towes's Blog.

Fabio Sonnati ::


4 December, 2009
Today launched La7.tv, the first Italian TV catch-up service

Today La7, the Italian TV broadcaster owned by Telecom Italia, launched La7.tv the first TV catch-up service entirely developed and delivered in Italy. In the last months I collaborated with ValueTeam at the development of the encoding pipeline and the streaming optimizations used by the Telecom Italia Group for the project.

The service offers in on-demand the tv programs of the last 7-days (a BBC-style catch-up), with the most succesful videos stored in a "cult" section.

The service is entirely Flash based (Video Player with Dynamic Streaming, Dynamic Buffering, Fast Protocol Negotiation and Auto-Recovery) and leverage a FMS 3.5 based CDN.

The custom encoding pipeline is integrated in the broadcaster's publishing work-flow and after only 15-20min after the end of the program in TV, the encoded files (up to 3 Hrs long) are available for QA, inspection and meta-tagging.

The source, an high quality SD 16:9 video, is encoded in two bitrates: 600 and 350Kbit/s. Despite the low bitrate, quality is very good and is optimized for full-screen playback (see screenshots below). Obviously, a low bitrate to produce a target quality means lower costs and higher reach (see also my latest Adobe MAX presentation).






Fabio Sonnati ::


13 October, 2009
H.264 best practices presentation - pdf and video recording

A lot of you asked me how to have the pdf of my Max presentation. The answer is simple: here you find the .pdf and here the entire session recorded during Max. Thank you all for the support and the appreciations received before, during and after the conference.
Many thanks to Kevin Towes, Desiree Motamedi and all the Adobe's staff for have made my presentation at Max possible.

Fabio Sonnati ::


9 October, 2009
MAX 2009 :: Accelerated Evolution

This last edition of MAX has satisfied all my expectations: very good sessions, exciting announcements and also my session has been ok (I have received an evaluation of 4.48 / 5 compared to an average 4.10 of all other sessions, I'm really satisfied ;-)).
I post only today about the novelties, so I'll be very short in my consideration because You can find more detailed info on other posts like for example Kevin's one, or Stefan's.

Accelerated Evolution of Flash Player's Ecosystem

I think Adobe is doing an awesome work in pushing the Flash Player's technology to the edge. Not only the Flash Player 10 update 1 (10.1) will have several very interesting features, but this great potentialities are extended to a wide number of mobile platforms and embeded chips.

In the last years there were often debate about the three screens convergence. With FP 10.1 this convergence will become true and your content will be visible from PC, Mobile (Windows Mobile, BlackBerry, WebOS, Android, and with some limitations iPhone) and TV sets. The power and the potentialities of this move are tremendous and capable to change the way we will live the web tomorrow.

The range of possible applications that an Adobe developer is able today to develop is rapidly increasing. The widening base of compatible devices and platforms, and the quality of new model of developing (Flex 4, Catalyst), are enpowering our work, our competencies and our value. Thank you Adobe.

Flash Player 10 update 1

This new update holds several new features. I focus only on the most importants from my point of view:

Strong p2p improvements
- plenty of new p2p features for designing the future of the web...
Watch this to now more http://tv.adobe.com/watch/max-2009-develop/p2p-on-the-flash-platform-with-rtmfp/

New smart buffering when streaming from FMS - no more wastes when seeking to parts already in the buffer. Finally.

Improved QoS, reconnection, faster switching - in the video arena Adobe is playing a very important game...

HTTP Streaming - exciting new way to stream video, I'll speak about it more in a future post.

Improved DRM - Flash Access 2.0, the evolution of Flash Media Rights Management.

GPU acceleration, H.264 hardware decoding - H.264 to the max on slow processor, mobile and set top boxes.

I think to speak more about some point in future posts, now leave me thinking again about the infinites possibilities that Adobe is opening us with this new FP...


Fabio Sonnati ::


1 October, 2009
MAX Keynotes live !

I feel that this edition of MAX will be memorable, a lot of announcements are on the way. If you are not able to attend the meeting, this year you can watch the Keynotes live. Register here and don't miss this opportunity : http://max.adobe.com/online/


Fabio Sonnati ::

21 September, 2009
H.264 Encoding and delivery Best Practices @ MAX 2009

Only two weeks and the 2009 edition of Adobe MAX will begin.
This year in my presentation ( Encoding Best Practices for H.264 Video Using Flash. 5 October 2:00 pm Room 506 ), I'll focus on changing the usual encoding perspectives proposing a dynamic approach in choosing the best resolution - bitrate mix.
Dynamic is always better than static, you know, and it's much better in video encoding: reach a wider audience and save money!
I'll also focus on playback best practices (full-screen acceleration, visual enhancements and so on).

Because a picture is worth a thousand words, today I want to show you the real potentialities of these approaches...


Me vs YouTube


In this test, I have downloaded from YouTube the video clip of Bjork "All is Full of Love". This clip is an High Definition video encoded by YouTube in 720p (1280x720) at around 2Mbit/s.

The same (already encoded) video has been then re-encoded at a much lower bitrate of 500Kbit/s with a specific set of encoding parameters and pre-processings. I think the result is very good, and strangely enough, somewhat better than the original.

How can 500Kbit/s be better than 2000Kbit/s ? How can the quality improve re-encoding a damaged video at a quarter of the original bitrate ? Well, you are all invited at MAX 2009, 4-7 October in Los Angeles to discuss this and other topics.

Below you find the two videos. To compare them stacked one over the other you need a 22'' or higher monitor. Otherwise use this smaller test page suitable for lower monitor resolutions like 1280x800. Here the instructions :

1. For YouTube video, press play then press HD and then pause.
2. For my video, press on video and then click pause.
3. Wait until both videos are fully downloaded.
4. Start both video players and disable YouTube audio.
5. Use the pause's buttons to eventually resync videos.


Note: decoding two HD video at the same time requires a fast computer. On my Core2Duo @ 2.2GHz laptop it works very well.
Remember also that IE is faster in Flash Video decoding than FF
.

But now let's take a look by yourself and don't forget to send me a feedback on your experience. What is the better looking video in your opinion, both in browser and at full-screen ?







Fabio Sonnati ::




05 September, 2009
Maximise FMS's VOD performance with SSDs

Finally I have started to play with my first SSD (Solid State Disk), an Intel X25-M. If you don't already know, in the last months the price of SSDs is fallen and the average performances improved.

The main advantage of this kind of storage is the access time which is around 100 times lower than a traditional mechanical drive. This performance mark is usually not so important in a desktop environment, but on a server that handles tens or hundreds of concurrent access to different parts of the disk, it becomes crucial.

Have you ever try to understand why the OS (especially Windows) takes so many seconds to load even on an high end machine ?
Well, the problem is the degraded performance of a mechanical drive when multiple reads of little files are performed.
A fast 1TB traditional HD with a sequential read of 100MB/s can slow down to a few MB/s in such situations.

Usually a well designed software can compensate the limited access time of the storage, but there is a limit.

On the other hand these new SSDs are very fast both in sequential and random access. For example my X25-M sports an outstanding 260MB/s of sequential read speed and an absolutely excellent 50MB/s at random read access (4K files).

Random concurrent access performance is tens time higher !

This excellent technology has only two problems today: price and capacity. X25-M costed me 450€ and is only 160GB wide.

But now let's talk about the performance increase that such tecnology can bring to Flash Media Server.

As you know, in live streaming a FMS installed on an high end server (now very affordable) can handle also thousands concurrent connections. This is because memory, cpu and especially disk usage are low for any new user. So the main limit is the connection card speed (but now the 10GbE standard is becoming affordable...).

What about VOD performance ? VOD is much different because the streamed data is specific, virtually, for every connected user (let's exclude the effect of caching which is very sensible to the statistical distribution of the requested segments of data). So, even with two 15.000 rpm 300GB SAS disks, probably you will be able to serve at most few hundreds streams.

SSDs can enhance this capability. I think (and in the next weeks I'm going to verify...) that a RAID 10 with four X25 would be able to provide 1 - 1.5 Gbit/s of VOD streams. At least a 2-3x factor over mechanical drives.

Obviously the storage cost will rise, but the benefits are very high because more concurrent users per server means less delivery cost (fewer servers, fewer FMS licenses, fewer maintainance costs).

If you like to know more about SSD I suggest this reading: http://www.anandtech.com/storage/showdoc.aspx?i=3631

Fabio Sonnati ::

22 July, 2009
News from the Adobe's Video Ecosystem

A couple interesting news:

Adobe has released the Open Source Media Framework, formerly "Strobe". The aim of this new open framework is to standardize the several functionalities required by a modern Flash based media player.

:: From the home site: "Open Source Media Framework enables developers to easily assemble pluggable components to create high-quality, full-featured playback experiences. The open aspect of the framework enables collaborative development for web video monetization, with lower costs and faster turnaround". The features covered by the framework are really exaustive, from playback to content monetization and reporting. A really must have for media specialists.

:: New information also on the future Flash Mobile. Kevin Lynch confirmed the availability of a beta for the end of the year and the support for accelerometers, gps and multitouch . Android based demos have been showed; what about iPhone ? time will tell...

Fabio Sonnati ::


13 July, 2009
Flash Player 10 to the masses

The official statistics collected by Adobe in the month of June report a Flash Player 10 penetration above 85% (87.2% in US/Canada and 85.8% in Europe) +10% in the last 3 months. This means that aproximately in september it will be very probable a penetration of more than 95%. Therefore Flash Player 10 is definitely becoming the new target for media content delivery on the web and so it's time for me to start using my favorite new features: dynamic streaming and pixel bender.

During 2008 I developed a FP9 based seamless bitrate switching solution for Value Team spa. Now it's time to port it under FP10 using the native bitrate switching. I also implemented an adaptive video enhancement filter that it's now time to port under Pixel Bender. I'll speak about this last topic during my session at Max 2009.

Fabio Sonnati ::

09 July, 2009
The future of Flash is on TV

A short post to suggest two interesting resources about the Future of Flash:

The first is an interview with Anup Murarka, director of technology, strategy and partner development for Adobe Systems where Anup shows the prototype of a FP10 based set top box for TV.

The second is a post of Serge Jespers who speaks about a Flash On The Beach session dedicated to developing for Multiple Screen.

Fabio Sonnati ::

08 July, 2009
Large Scale Deployment Guide for FMS

Today Adobe released a new deployment guide for large scale installations of Flash Media Interactive Server. The guide is very useful for everyone who want to deploy large scale live and/or on-demand FMS installation. I love this kind of informations and best practices from Adobe, this is the right way to support the FMS community.

More info on Kevin's blog.

Fabio Sonnati ::

07 July, 2009
Adobe and DIVX are becoming competitors

With the Open Screen Project Adobe is making FP10 the leading edge of a triple-play content delivery strategy. When FP10 will be available on high end phones and on TV sets, the power of Flash Technology will be really pervasive. This is a very strategic move from Adobe especially for the future of the web TV.

You know that traditional broadcasted TV is losing audience in almost all the most developed countries. Not only, the average age of audience is rising and young people are spending much more time on the Internet than watching TV. In the near future web TV will overtake classic TV (think about iPlayer, Hulu, EpixHD, YouTube), and in this scenario there are great opportunities for the Flash Player
on different devices than personal computers (obviously it's much more confortable to watch Hulu on a wide Tv set than on a laptop).

In this context, I think that Adobe's Flash Player will be a competitor for DivX. This is obvious: DivX distributed for years decoders for MPEG4 videos to DVD players suppliers. Recently, because of the great success of the international standard H.264, DivX has embraced H.264 (in a Mkv container) as the "DivX of the Future", but the scenario is changing...

Flash Player 9-10 is a very good decoder for H.264 too. It supports almost every features of this complex standard.
So, now that with the Open Screen Project strategy this decoder is, presumably, coming in the market previously dominated by DivX...how could DivX react to not lose market share ?

The problem (for Adobe) is that the supplier of the very good decoder implemented in FP9 (MainConcept) has been acquired by DivX !
Can be this a problem for optimizing H.264 decoding on devices ? I dont' know, but I fear a not optimized or features-lacking implementation. This is happened before, think about the lack of NellyMoser decoding in Flash Lite 3...this can seem a little lack but because of it, it is not possible to AV stream directly from a desktop to a Flash Lite device.

I'm curious, and a little anxious to know how this contrast will be handled.

Fabio Sonnati ::


03 July, 2009
Very excited about Adobe Flash Mobile 10

Adobe’s recent earnings report revealed that Flash Player 10 will be available this fall for phones running Windows Mobile, Palm Web OS, Symbian and Android. The lack of Mac OS in the list of supported platform is really a pity, but I'm optimist about a FP10 on iPhone in the near future, expecially today with the processing power of the new iPhone GS (2-3 times the processing power of iPhone "classic"). Even if the Flash Mobile 10 is aimed at high end phones with high processing power and capabilities, this is a very important step in the strategic Open Screen project.

Adobe is working hard to push the Flash Player Technology to every device, but obviously the most efforts are spent to make the Flash Player the de-facto standard for multimedia and internet driven apps in a triple-play scenario: Flash Player on mobile devices, on TV and of PC.

In this fall, probably during Max 2009 (Los Angeles, 4-7 October), a beta of FM10 will be shown. Probably in the 1Q of 2010 will appear on the market the first TV sets with FP10 support. The Flash Player invasion is going to start.


Fabio Sonnati ::


01 July, 2009
I'll speak at Max 2009 in Los Angeles

I'm very proud to join again the crew of Max speaking at Max Los Angeles 2009.
I'll speak about H.264 and encoding best practices. This is the abstract of my session (October 4):

Encoding Best Practices for H.264 Video Using Flash

"This expert-driven deep dive will demonstrate how to get the best quality from your H.264 encoding and publishing to the web on the Adobe Flash Platform. Topics will include encoding parameters, analysis, resolutions, dynamic streaming, filtering, and benefits of hardware acceleration. Wrap all this up into an encoding strategy that will bring you closer to HD video on the web."

If you like to know more about the H.264 video encoding, FMS and Flash Video Technology, join us at Max 2009 and register to my session. The session will cover the encoding technologies implemented in H.264, the best settings for optimizing the final video quality and best practices to get the maximum performance in the Flash Player.

Fabio Sonnati ::


16 June, 2009
Adobe publics RTMP specs

"The Real-Time Messaging Protocol (RTMP) was designed for high-performance transmission of audio, video, and data between Adobe Flash Platform technologies, including Adobe Flash Player and Adobe AIR. RTMP is now available as an open specification to create products and technology that enable delivery of video, audio, and data in the open AMF, SWF, FLV, and F4V formats compatible with Adobe Flash Player".

Finally Adobe has decided to public the official specification of the RTMP protocol.

This is a great new because, not only because we will be able to implement our own optimized live encoder with RTMP injection of streaming data to FMS, but also because we will be able to better understand how FMS works and improve our video platform.
Here you find the Kevin Towes's post on the topic.


Fabio Sonnati ::


6 June, 2009
Save money with an hybrid FMIS-FMSS cluster

I client of mine needed to setup a FMS based custom platform for live streaming. They needed to serve several thousands concurrent users with a clustered configuration in complete fail-over. Ok, I said, all that can be done using multiple FMIS installations, leveraging the origin-edge feature of FMIS. The problem was always the same, the budget ! They loved the idea of using FMS but considered too high the price for the six FMIS licenses needed for the specific project (2 origins, 4 edges).

Hardware is every day less expensive, and today the cost of a FMIS license can be almost the double of the dual socket server that will run it. Therefore I needed to squeeze the brain to find a low cost, reliable solution based on FMS, especially today that Microsoft is spreading the word of Silverlight ;-). So I chose to try the setup of an hybrid FMIS - FMSS cluster with an application based failover and load balancing strategy.

As you know, FMIS can re-publish a stream to a different FMS using server side code, while FMSS cannot execute server side code.
Leveraging this features, FMIS can be used as a splitting point to distribute every published stream toward a cluster of FMSS. In this schema, FMIS acts as an origin while several FMSS act as edges.

The final design is shown here:

Every stream is acquired and encoded by a couple of Flash Media Live Encoders (for fail-over on the encoding), when the stream is published on each FMIS, a specific application.onPublish handler split the stream toward the cluster of FMSS (in this case 4). In this design there is no single point of failure because the lost of a FMLE, FMIS or FMSS do not stop the overall live service. The last brick in the wall is the handling of the load-balancing and fail-over on the client side, using a server address in round-robin and a specific netConnection recovery code.

Here You find a simplified extract of the code that split in N every stream published on FMIS:

var nsa1 = {};
var nsa2 = {};
var nca1 = {};
var nca2 = {};
var edge1="rtmp://remote_server1/live";
var edge2="rtmp://remote_server2/live";

application.onPublish = function( client, myStream ) {

trace(myStream.name + " is re-publishing to #1" );

nca1[myStream.name] = new NetConnection();
nca1[myStream.name].onStatus = function (info) {
  trace("Connection Status:" + info.code);
  if (info.code == "NetConnection.Connect.Success") {
    trace("Connection established with #1" );
    nsa1[myStream.name] = new NetStream(nca1[myStream.name]);
    nsa1[myStream.name].onStatus = function(info) {
      trace("Stream Status: " + info.code)
      if (info.code == "NetStream.Publish.Start") {
        trace("The stream is now re-publishing");
      }
      if (info.code == "NetStream.Publish.BadName" || info.code == "NetStream.Failed" ){
        nsa1[myStream.name].publish(myStream.name, "live"); trace("retry to re-publish : " + myStream.name);
      }
    }
    nsa1[myStream.name].setBufferTime(1);
    nsa1[myStream.name].attach(myStream);
    nsa1[myStream.name].publish(myStream.name, "live");
  }
  // Auto-recovery
  if (info.code == "NetConnection.Connect.Closed" || info.code == "NetConnection.Connect.Failed") {
    trace("Retry Connecting to #1");
    nca1[myStream.name].connect(edge1 ) //***Reconnection
  }
}
nca1[myStream.name].connect( edge1 );

trace(myStream.name + " is re-publishing to #2" );

nca2[myStream.name] = new NetConnection();
nca2[myStream.name].onStatus = function (info) {
  trace("Connection Status:" + info.code);
  if (info.code == "NetConnection.Connect.Success") {
    trace("Connection established with #2" );
    nsa2[myStream.name] = new NetStream(nca2[myStream.name]);
    nsa2[myStream.name].onStatus = function(info) {
      trace("Stream Status: " + info.code)
      if (info.code == "NetStream.Publish.Start") {
        trace("The stream is now re-publishing");
      }
      if (info.code == "NetStream.Publish.BadName" || info.code == "NetStream.Failed" ){
        nsa2[myStream.name].publish(myStream.name, "live"); trace("retry to re-publish : " + myStream.name);
     }
  }
  nsa2[myStream.name].setBufferTime(1);
  nsa2[myStream.name].attach(myStream);
  nsa2[myStream.name].publish(myStream.name, "live");
}
// Auto-recovery
  if (info.code == "NetConnection.Connect.Closed" || info.code == "NetConnection.Connect.Failed") {
    trace("Retry Connecting to #2");
    nca2[myStream.name].connect(edge2 ) //***Reconnection
  }
}
nca2[myStream.name].connect(edge2 );
}

Note in the code the handling of the errors that can happen on the NetConnection or the NetStream. This part is very important because if you simply connect the FMIS to the FMSS, it is very probable that you will incur soon or later in a non-handled disconnection.

Concluding, the flexibility of the server side code and of FMIS allowed me to implement a basic low cost clustered FMS based platform for live streaming. This solution is far from the native, enterprise level, origin-edge feature of FMIS, but is sufficient for the requirements of the project. The total cost of licenses is 13.000$ vs 27.000$ of the "standard" configuration, a save of 14.000$, not bad, especially these days...and you certainly know what I mean.


Fabio Sonnati ::


29 May, 2009
HD live encoding with FMLE ? perhaps with a bit of Black Magic...

Performing a live streaming in HD is not a simple task. It is required a lot of processing power to encode in realtime a 720p video in H.264 or Vp6. It is also necessary to have an high upload bandwidth in the encoder site. Not less than 1.5-2Mbit/s which is difficult to have especially in "mobility".

But there is a one more difficulty: find a way to acquire realtime an HD stream from an HD cam or apparatus.
Infact, if you are using Flash Media Live Encoder you can't simply use an HDV or AVCHD connection to the firewire port of your encoding box. This is because FMLE want an uncompressed video input while HDV uses a compressed stream (in MPEG2 or H.264. To be exact, also the standard DV is encoded, but this kind of encoding is very simple and well accepted by FMLE).

So, How can we grab an HD stream with a simple, reliable and affordable solution ? The answer may requires a little bit of Black Magic.

Black Magic Design is company that produce affordable digital acquiring card. With a few 100s of dollars it is possible to buy cards capable to acquire the HDMI output of a FullHD camera, or the more professional HD-SDI signal (a serial uncompressed digital stream standard used in broadcasting). For example, Intensity Pro, for a mere 199$ acquires uncompressed HDMI.

I don't know if these cards are "certified" for FMLE (they were in the iter for certification some months ago), but I have received positive feeds from users who are happily grabbing HD HDMI output and encoding it with FMLE.

Concluding this is one of the few solutions around for streaming HD and the cheaper for sure. If someone has had a good or bad experience with these card, please let me know because this is becoming an hot topic as everyone is asking for every day higher quality video.



Fabio Sonnati
::



20 May, 2009
p2p streaming with Flash Player 10 (Proof of concept)

I have thought more deeply about the idea of creating a native FP10 p2p streaming network. I believe is really possible to exploit the new RTMFP protocol to create such a platform. But let's start with a short intro about p2p networks.

peer-2-peer

I don't want to bore you with technicalities (if you like them, take a look at this article on Wikipedia), here I want only to summing up the pro and cons of this technique for delivery data over the Internet.

The main pro of p2p delivery is, as you know, that data flow from client to client reducing the load of servers (which usually are still necessary as backup). The data-flows are distributed geografically, differently from the traditional client-server paradigm where the data-flows concentrate to a server and so to a specific region.

You know that this startegy is very good and cost effective for the distribution of generic content (who have never downloaded "something" in p2p with satisfaction ?), but what about AV streaming ?
The (bad) experience of well financed projects like Joost and Babelgum who attempted to create video streaming delivery platforms using p2p, teaches us that p2p has two worst enemies: the need of a specific plug-in/desktop app. and the too much low upload bandwidth available at consumer users.

The difficulties arise when you have not to simply deliver content to the user, but to stream it with a good QoS (Quality of Service), that is assuring a consistent experience, low latencies, a fast channel switch time and so on. It's easier to stream live content istead of video on demand but also for live, with an average upload bandwidth in the range 200-400Kbit/s it is still not possible to trigger the "avalance effect" peculiar of the p2p paradigma for streaming contents which requires more than 500 Kbit/s.

Someone can say: "can we use multicast to reduce the load in AV streaming ?". We could, but only a very limited portion of Internet infrastructures support efficiently this protocol; usually only private networks are really able to use multicast.

So p2p remain a very promising technology, probably the future for streaming, but today it is really difficult to make it usefull and profitable for AV streaming, similarly it's difficult to use multicast.

Audio only streaming & p2p

But what about audio only streaming ? Audio only streaming is a completely different thing especially live stream (Internet Radio). Let's suppose to handle traditional 128Kbit/s MP3 streams. A user can easly receive the stream and re-distribute the same packets to at last 2 different users using an upload speed of 256Kbit/s (indeed very common). This is sufficient to trigger the "avalance effect", so a server can feed 100 users, they can redirect the stream to 100x2 users, these 200 users again can redirect and feed 200x2 users and so on. With only 100 concurrent connection to a central server, your p2p service serves 1000s users saving a lot of bandwidth and therefore a lot of money.

p2p with Flash Player 10

Streaming audio, a p2p network can leverage the avalance effect, so it remain only the second limit of p2p, the need of a new plug-in or desktop application. The idea is therefore to implement a p2p network using the new RTMFP protocol supported by Flash Player 10. If the p2p system could be implemented in simple AS3 code, without external plug-in, it would be the Columbus's Egg for Internet Radio and suddenly, an immense number of nodes would be added to the biggest p2p network for audio streaming.

I continue to speak about audio streaming and not other data sharing, because of the security limitation of FP10, where you are not able to load or save data locally without the user intervention. Therefore is quite difficult to implement the behaviour of a standard file sharing application. So let's start from the simpliest p2p network.

The rule of RTMFP

RTMFP (read the previous post for detailed info) permits a FP10 swf to connect to another FP10 swf using a client to client UDP connection. You need a support service (Stratus) to initiate the connection, but the communicaton is then hold on between the two connected clients using the traditional NetStream API. As you know, NetStream has a "send" method which can be used to trigger a call-back on the subscribers. A send can also be used to transport a packet of data, as it supports all the AMF3 data types, in particular bytesArray.

Proof of Concept

So in short the idea is this:

1. INPUT BLOCK. An swf client receives an MP3 packet stream from a source. There are several possible sources. It is possible to read an MP3 locally, receive it from an HTTP binary request or from a RTMFP (an MP3 can be splitted in small chunck and sent using send method, read more over, point 4) or also receive it from a socket connection. It is not possible to access mp3 packets from a RTMP connection today but we can suppose eventually to implement a simplified RTMP client in AS3 + socket to circumvent this limitation.
In any case this block manages the input connection and every time interval produces a BityArray in output containing a number of MP3 packets.

2. MUX/DEMUX BLOCK. This block of code receives data packets from the INPUT BLOCK and mux or demux them in the necessary container format. For example, the PLAYOUT BLOCK needs a complete MP3 file with headers and the like, so this block of code must compose a buffer of MP3 data (a few seconds), rebuild on the fly the header for that portion of audio and send it to the PLAYOUT. Data packets are sent to OUTPUT BLOCK in demuxed format (raw packets), so in this case the block works as a buffer.

3. PLAYOUT BLOCK. This block receives a complete MP3 file (a few seconds long) from the MUX/DEMO BLOCK. Then it uses the new "extract" method of sound object to decode the MP3 audio data to raw wav data and inserts it in the sound card ring buffer (read Tinic Uro's Blog to know more about this new FP10 possibility).

4. OUTPUT BLOCK. At the end, this block fetches the MP3 packets from a buffer and sends them to 2 or more p2p connected clients. The packets can be aggregated in a byteArray and sent using the send method of the RTMFP netConnections.

5. CONTROL BLOCK. This block holds the network intelligence. A specific protocol is used to discover the nearest client nodes and to establish several RTMFP connections. It can be usefull to establish backup connections both in input and in output to compensate for temporary or permanent unavailability of a node.

That's all, what do you think about it ? Someone is interested in trying to implement a such schema ? Mail me with suggestion.
In the meanwhile, I'm starting to code...

Fabio Sonnati ::



2 May, 2009
Very good article on RTMFP

As you know, FP10 can handle netConnection communication in a new p2p protocol called Real-Time Media Flow Protocol. Today you can leverage that feature using the Adobe's Stratus service. Brian Lesser has written a very detailed post about RTMFP on O'Reilly Blogs: http://broadcast.oreilly.com/2009/04/adobes-real-time-media-flow-pr.html

Reading the article I have had an idea: Today the protocol lacks the possibility to re-publish A/V contents from client to client, but probably it would not be too much difficult to use the ns.send method and the power of byteArrays to create a simplified p2p delivery platform for audio streams.

This is only a proof of concept but think about a client that read an mp3 as a binary file. He can segment the file in chuncks and send them as byteArray objects using the send method and the AMF3 encoding. On the other side a client receives the sequence of byteArrays and it has to dynamically concatenate the chunks to recreate the original mp3 and play it. This last point is obviously the must difficult step., but today with Flash Player 10 it is possible to decode mp3 content to raw format and insert it dynamically in a ring buffer for playback.

I think to write down something more detailed about this idea in the next post.


Fabio Sonnati ::


20 April, 2009
Adobe announced the Flash Platform for Digital Home

Today Adobe announced the extension of the Adobe Flash Platform to digital home devices like hd-tv set, set-top-box, blu-ray players and the like.
It will be possible to access interactive on-line services and HD video directly from these devices without a browser.

This is a really good new. Finally Flash Player lands on the main stream media market and this is only the beginning of the Open Screen Project. Probably this is the first, effective, step to define a brand new generation of interactive HD TV service.

It is not clear if the platform is H.264 ready because the press release mention a generic FLV support. Obviously I hope it is, and in this case, DivX will have a new and tough competitor.

Adobe will show the technology during NAB this week.


Fabio Sonnati ::


20 April, 2009
Adobe announced the Flash Platform for Digital Home

Today Adobe announced the extension of the Adobe Flash Platform to digital home devices like hd-tv set, set-top-box, blu-ray players and the like.
It will be possible to access interactive on-line services and HD video directly from these devices without a browser.

This is a really good new. Finally Flash Player lands on the main stream media market and this is only the beginning of the Open Screen Project. Probably this is the first, effective, step to define a brand new generation of interactive HD TV service.

It is not clear if the platform is H.264 ready because the press release mention a generic FLV support. Obviously I hope it is, and in this case, DivX will have a new and tough competitor.

Adobe will show the technology during NAB this week.


Fabio Sonnati ::


13 January, 2009
How to properly handle SD video's aspect ratio in Flash

Who work with SD videos knows that a PAL SD video has a resolution of 720x576 pixel.
Now, if you encode such a video at the original resolution and playback it in Flash using 720 by 576 pixels, You will notice that the picture is slightly streched vertically (compressed horizontally).

It is also known that Aspect Ratio of SD video is usually 4:3, which means that the ratio between horizantal and vertical "display" measures of video is 4:3=1,33.

But if you divide 720 by 576 you get 1,25...There is something wrong, but what ?

DAR & PAR

Let me introduce you DAR and PAR. The DAR of a video is the aforementioned Display Aspect Ratio of a video which in the case of SD is 4:3. The second parameter is instead the Pixel Aspect Ratio, which is the ratio between horizontal and vertical sizes of the single pixel in the display device.

Now, you have to know that computer monitors and LCD television devices have a PAR of exactly 1, but the good old CRT televisions have a PAR of 1.066 which means that pixels on a CRT tv are not squares but slighlty wider rectangles.

Now, the correct formula to calculate the exact "display" size of a video is:

   height = width * PAR / DAR

or

   width = height * DAR / PAR

So, if you leave the vertial resolution to 576 pixels, you have a correct horizzontal display resolution of 768 pixels. Now, 768 : 576 = 4 : 3 and the proprotions of display video are right.


Fabio Sonnati ::

13 January, 2009
FMS 3.5 and FMLE 3 released

Adobe has released the new Flash Media Interactive Server 3.5 and Flash Media Streaming Server 3.5. The main innovations of this release are:

- the support of a native multi-bitrate switching (requires Flash Player 10)
- the support of DVR-like features in streaming live
- an integrated HTTP web server

You can now download the FREE Development server from http://www.adobe.com/go/fms/. The third released of Flash Media Encoder, now called Flash Media Live Encoder, has also been released. It supports multi-bitrate encoding and DVR functionality. You can download FMLE3 for FREE.

For more info take a look at Kevin's blog.

Fabio Sonnati ::



OLDER ARTICLES:

:: 2009
:: 2008
:: 2007
:: 2006
:: 2005

My name is Fabio Sonnati. I'm a freelance ICT consultant graduated in Electronic Engineering. I'm Lead Developer and co-founder of Progetto Sinergia, a Team of ICT consultants specialized in Internet, Video, and Multimedia applications.
This is the blog where I want to share my knowledge and tools about Flash Media Server and Flash Video. Read this to know more about Flash Video Factory, our Flash Video based streaming platform. There You'll find my Italian Blog, too.

WHITE PAPERS:

:: FLASH VIDEO TECHNOLOGY
White Paper


TOOLS:

:: FLV D-Killer
:: 
(read more here)

ARTICLES FOR ADOBE:

:: New buffering strategies in Flash Player 9 and FMS3

:: Implementing a dual threshold buffering strategy in FMS2

ARTICLES ON THE BLOG:

:: 2010
:: 2009
:: 2008
:: 2007
:: 2006
:: 2005


RSS Feed :



s


MX Developer's Journal Blogger :


Sponsored by :

;

FlashVideo Blog - Optimizations and Tools
F:V:F - Flash Video Factory
Copyright 2005 - Progetto Sinergia