{"id":1476,"date":"2013-07-05T10:51:08","date_gmt":"2013-07-05T08:51:08","guid":{"rendered":"http:\/\/www.alkannoide.com\/?p=1476"},"modified":"2013-07-05T10:51:08","modified_gmt":"2013-07-05T08:51:08","slug":"how-to-create-and-architecture-an-open-source-andor-free-video-platform","status":"publish","type":"post","link":"https:\/\/www.alkannoide.com\/2013\/07\/05\/how-to-create-and-architecture-an-open-source-andor-free-video-platform\/","title":{"rendered":"How to create and architecture an open-source and\/or free video platform ?"},"content":{"rendered":"
This post is the result of a sort of challenge. The objective is to create an architecture to generate, manage and deliver HTTP streaming videos using free and\/or open-source tools and\/or applications.\u00a0It need to answer to many questions : tools must be open source or free; reliability of the platform and the ability to scale up quickly. The architecture can be split in two parts : the content preparation and the delivery. I will expose an overview for each part of the architecture. Then I will list differents tools you can use. To finish, I will give you in details the architecture I will choose to deploy. But to realize this, few or some developments can be required, the language you will use, will be your choice. The operating system will be on Linux.<\/p>\n
Here is the part to prepare the content. It will be separate in 3 differents items, I call them services :<\/p>\n
All of these is exposed in this figure :<\/p>\n
The generated assets are transfered in the delivery zone storage.<\/p>\n
Here is the intelligence of the system. You have two choice :<\/p>\n
I\u00a0recommend\u00a0to associate your code to a database.\u00a0The database will save the metadata of your video assets and some configurations datas.<\/p>\n
The service bus will use the concept of\u00a0Message queue<\/a>. That is very interesting because it helps to manage more easily the communication between each application : you send the message and the library or the system make the rest. There are many tools in the open source world :<\/p>\n For each message queue solutions, you will find connectors for separates languages (C, C++, PHP, Python, Perl, …). Depends on the message queue solution you choose, you need to make more or less developments.<\/p>\n Workers services are here to make specific tasks :<\/p>\n All of this services can be in the same physical server. If you have more assets to manage and generate, it is possible very easily to scale up. Workers can be deploy on dedicated server and the bus service is here to manage the network. You can add another service manager to add\u00a0redundance. Thoses updates will have a impact on the reliability of the platform.<\/p>\n Here is one solution which include the most part of those precepts : Transcodem<\/a>. You can fork this project on GitHub too.<\/p>\n Ok, now your assets are ready to deliver and are in the delivery storage. In our architecture, we want to stream content based on HTTP protocol (HDS, HLS, Smooth Streaming). You can start with one physical server, but all tools and the architecture I expose can scale up easily to many physicals servers. We have many tools to help us :<\/p>\n And if your platform will support a high load, you can use proxy cache solution like Varnish<\/a>. I gave in a previous post a solution to deliver content with Varnish and MistServer<\/a>.<\/p>\n\n
Service : Worker<\/h3>\n
\n
\n
Delivery<\/h2>\n
\n