RU2759595C1 - System for fault-tolerant transcoding and output of direct streams in hls format - Google Patents

System for fault-tolerant transcoding and output of direct streams in hls format Download PDF

Info

Publication number
RU2759595C1
RU2759595C1 RU2020131840A RU2020131840A RU2759595C1 RU 2759595 C1 RU2759595 C1 RU 2759595C1 RU 2020131840 A RU2020131840 A RU 2020131840A RU 2020131840 A RU2020131840 A RU 2020131840A RU 2759595 C1 RU2759595 C1 RU 2759595C1
Authority
RU
Russia
Prior art keywords
video
transcoding
servers
chunks
chunklists
Prior art date
Application number
RU2020131840A
Other languages
Russian (ru)
Inventor
Григорий Петрович Дмитренко
Original Assignee
Общество С Ограниченной Ответственностью "Джи-Кор Рус"
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Общество С Ограниченной Ответственностью "Джи-Кор Рус" filed Critical Общество С Ограниченной Ответственностью "Джи-Кор Рус"
Priority to RU2020131840A priority Critical patent/RU2759595C1/en
Application granted granted Critical
Publication of RU2759595C1 publication Critical patent/RU2759595C1/en
Priority to PCT/RU2021/050397 priority patent/WO2022066066A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]

Abstract

FIELD: computer technology.
SUBSTANCE: invention relates to computer technology. The fault-tolerant transcoding system and the issuance of direct streams in the HLS format contains a geographically distributed network infrastructure (CDN) for the issuance of chunklists and chunks of video produced by transcoding servers, and when requesting chunklists and chunks of video from the CDN, the CDN, due to a predefined configuration, performs an alternate search for chunklists and chunks of video on each of the cluster servers; load balancer for generating and sending commands to transcoding servers; a cluster of video transcoding servers under the unified control of the load balancer and made with the ability to: create chunklists and chunks of video; synchronization of chunks with each other through a distributed file system, moreover: video chunks are not synchronized between servers, but are located only on the server on which they are created, while by means of intermediate servers between the CDN and the transcoding cluster, all new chunks from the chunklist are forcibly and preemptively cached, and by means of the transcoder, when the transcoding server is changed, the existing file, the chunklist is read.
EFFECT: increasing the fault tolerance of video transcoding.
1 cl, 2 dwg

Description

ОБЛАСТЬ ТЕХНИКИFIELD OF TECHNOLOGY

Настоящее техническое решение относится к области вычислительной техники, в частности к системам отказоустойчивого транскодирования и выдачи прямых потоков в формате HLS. This technical solution relates to the field of computer technology, in particular to systems of fault-tolerant transcoding and delivery of direct streams in the HLS format.

УРОВЕНЬ ТЕХНИКИLEVEL OF TECHNOLOGY

Из уровня техники известно решение, выбранное в качестве наиболее близкого аналога, US 2012254456 A1, 04.10.2012. Данное решение относится к области вычислительной техники, а именно к способу и устройству для создания универсальных потоков с адаптивной скоростью передачи битов с использованием универсального формата контейнера для хранения аудио, видео и дополнительных данных, которые обеспечивают транскодинг из одного адаптивного потокового формата в другой.From the prior art, a solution is known that is selected as the closest analogue, US 2012254456 A1, 04.10.2012. This solution relates to the field of computing, namely to a method and apparatus for creating universal streams with adaptive bit rate using a universal container format for storing audio, video and additional data that provide transcoding from one adaptive streaming format to another.

Однако стоит отметить, что в известном уровне техники, не раскрыта информация об обеспечении высокой отказоустойчивости транскодирования.However, it should be noted that the prior art does not disclose information on ensuring high resiliency of transcoding.

Предлагаемое техническое решение направлено на устранение недостатков современного уровня техники и отличается от известных решений тем, что предложенная система не содержит централизованное хранилище транскодированного видео, тем самым значительно снижая нагрузку на сеть, ускоряя доставку, упрощая взаимосвязи и исключая дополнительную точку отказа в виде хранилища.The proposed technical solution is aimed at eliminating the shortcomings of the state of the art and differs from the known solutions in that the proposed system does not contain a centralized storage of transcoded video, thereby significantly reducing the load on the network, speeding up delivery, simplifying interconnections and eliminating an additional point of failure in the form of storage.

СУЩНОСТЬ ИЗОБРЕТЕНИЯSUMMARY OF THE INVENTION

Технической проблемой, на решение которой направлено заявленное решение, является создание системы отказоустойчивого транскодирования и выдачи прямых потоков в формате HLS.The technical problem to be solved by the claimed solution is the creation of a fault-tolerant transcoding system and the issuance of direct streams in the HLS format.

Технический результат заключается в повышении отказоустойчивости транскодирования видео. The technical result consists in increasing the fault tolerance of video transcoding.

Заявленный результат достигается за счет осуществления системы отказоустойчивого транскодирования и выдачи прямых потоков в формате HLS, которая содержит:The stated result is achieved by implementing a fault-tolerant transcoding system and issuing direct streams in the HLS format, which contains:

географически распределённую сетевую инфраструктуру (CDN), выполненную с возможностью выдачи чанклистов и чанки видео, производимых серверами транскодирования, причем при запросе чанклистов и чанки видео с CDN, CDN за счет заранее заданной конфигурации осуществляет поочередный поиск чанклистов и чанки видео на каждом из серверов кластера;geographically distributed network infrastructure (CDN), capable of issuing chunklists and video chunks produced by transcoding servers, and when requesting chunklists and video chunks from a CDN, the CDN, due to a predetermined configuration, alternately searches for chunklists and video chunks on each of the cluster servers;

балансировщик нагрузки, который выполнен с возможностью формирования и отправки команд серверам транскодирования;a load balancer that is configured to generate and send commands to transcoding servers;

кластер серверов транскодирования видео, находящийся под единым управлением балансировщика нагрузки и выполненный с возможностью:a cluster of video transcoding servers, under the unified control of the load balancer and made with the ability to:

создания чанклистов и чанки видео;creating chunklists and video chunks;

синхронизации чанклистов друг с другом через сетевую файловую систему, причем:synchronization of chunklists with each other via the network file system, moreover:

чанки видео не синхронизируются между серверами, а находятся только на том сервере, на котором создаются;video chunks are not synchronized between servers, but are located only on the server on which they are created;

чанки видео имеют уникальную нумерацию;video chunks are uniquely numbered;

при воспроизведении видео чанклист скачивается с любого сервера, а для получения чанка видео осуществляется его поиск на одном из серверов.when playing a video, the chunklist is downloaded from any server, and to receive a video chunk, it is searched for on one of the servers.

ОПИСАНИЕ ЧЕРТЕЖЕЙDESCRIPTION OF DRAWINGS

Реализация изобретения будет описана в дальнейшем в соответствии с прилагаемыми чертежами, которые представлены для пояснения сути изобретения и никоим образом не ограничивают область изобретения. К заявке прилагаются следующие чертежи:The implementation of the invention will be described in the following in accordance with the accompanying drawings, which are presented to explain the essence of the invention and in no way limit the scope of the invention. The following drawings are attached to the application:

Фиг. 1, иллюстрирует общую схему работы системы.FIG. 1 illustrates the general scheme of the system operation.

Фиг.2, иллюстрирует схему вычислительного устройства.2 illustrates a diagram of a computing device.

ДЕТАЛЬНОЕ ОПИСАНИЕ ИЗОБРЕТЕНИЯDETAILED DESCRIPTION OF THE INVENTION

В приведенном ниже подробном описании реализации изобретения приведены многочисленные детали реализации, призванные обеспечить отчетливое понимание настоящего изобретения. Однако, квалифицированному в предметной области специалисту, будет очевидно каким образом можно использовать настоящее изобретение, как с данными деталями реализации, так и без них. В других случаях хорошо известные методы, процедуры и компоненты не были описаны подробно, чтобы не затруднять излишне понимание особенностей настоящего изобретения.In the following detailed description of an implementation of the invention, numerous implementation details are set forth in order to provide a thorough understanding of the present invention. However, it will be obvious to those skilled in the art how the present invention can be used, with or without these implementation details. In other instances, well-known techniques, procedures, and components have not been described in detail so as not to obscure the details of the present invention.

Кроме того, из приведенного изложения будет ясно, что изобретение не ограничивается приведенной реализацией. Многочисленные возможные модификации, изменения, вариации и замены, сохраняющие суть и форму настоящего изобретения, будут очевидными для квалифицированных в предметной области специалистов.In addition, it will be clear from the above description that the invention is not limited to the above implementation. Numerous possible modifications, changes, variations and substitutions, while retaining the spirit and form of the present invention, will be apparent to those skilled in the art.

Ключевые термины.Key terms.

HTTP (англ. HyperText Transfer Protocol — «протокол передачи гипертекста») — протокол прикладного уровня передачи данных изначально — в виде гипертекстовых документов в формате «HTML», в настоящий момент используется для передачи произвольных данных. Основой HTTP является технология «клиент-сервер», то есть предполагается существование:HTTP (English HyperText Transfer Protocol - "Hypertext Transfer Protocol") - the protocol of the application layer of data transfer initially - in the form of hypertext documents in the "HTML" format, currently used to transfer arbitrary data. HTTP is based on the "client-server" technology, that is, it is assumed that:

• Потребителей (клиентов), которые инициируют соединение и посылают запрос;• Consumers (clients) who initiate the connection and send the request;

• Поставщиков (серверов), которые ожидают соединения для получения запроса, производят необходимые действия и возвращают обратно сообщение с результатом.• Providers (servers) that are waiting for a connection to receive a request, take the necessary actions and return a message with the result.

HLS (HTTP Live Streaming) — коммуникационный протокол для потоковой передачи медиа на основе HTTP, разработанный компанией Apple как часть программного обеспечения QuickTime, Safari, OS X и iOS. В основе работы лежит принцип разделения цельного потока на небольшие фрагменты, последовательно скачиваемые по HTTP. Поток непрерывен и теоретически может быть бесконечным. В начале сессии скачивается плей-лист в формате M3U, содержащий метаданные об имеющихся вложенных потоках.HLS (HTTP Live Streaming) is an HTTP-based media streaming communication protocol developed by Apple as part of QuickTime, Safari, OS X and iOS software. The work is based on the principle of dividing a whole stream into small fragments that are sequentially downloaded via HTTP. The stream is continuous and theoretically could be infinite. At the beginning of the session, a playlist in M3U format is downloaded, containing metadata about the available sub-streams.

MPEG-DASH (от MPEG и англ. Dynamic Adaptive Streaming over HTTP) — технология адаптивной потоковой передачи данных, предоставляющая возможность доставки потокового мультимедиа-контента через Интернет по протоколу HTTP. Является первым решением по потоковой передаче данных с адаптивным битрейтом, получившим статус международного стандарта.MPEG-DASH (from MPEG and English Dynamic Adaptive Streaming over HTTP) is an adaptive streaming technology that provides the ability to deliver streaming multimedia content over the Internet using the HTTP protocol. It is the first adaptive bitrate streaming solution to achieve international standard status.

Чанклист - постоянно обновляемый список имен генерируемых чанков.Chunklist - a constantly updated list of generated chunk names.

Чанкивидео — кусочки видео длиной от 2 до 5 секунд.Chunkivideo - pieces of video from 2 to 5 seconds long.

CDN - сеть доставки (и дистрибуции) содержимого (англ. Content Delivery Network или Content Distribution Network, CDN) — географически распределённая сетевая инфраструктура, позволяющая оптимизировать доставку и дистрибуцию содержимого конечным пользователям в сети Интернет. Использование контент-провайдерами CDN способствует увеличению скорости загрузки интернет-пользователями аудио-, видео-, программного, игрового и других видов цифрового содержимого в точках присутствия сети CDN.CDN - Content Delivery Network or Content Distribution Network (CDN) is a geographically distributed network infrastructure that optimizes the delivery and distribution of content to end users on the Internet. The use of CDN by content providers contributes to an increase in the download speed of audio, video, software, game and other types of digital content by Internet users at the points of presence of the CDN network.

Транскодирование – преобразование файла из одного метода кодирования (т.е. формата файла) в другой.Transcoding - converting a file from one encoding method (i.e. file format) to another.

Шилдинг – ситуация, когда между серверами CDN и «оригинальным» сервером находится дополнительный сервер, через который проходит трафик. Таким образом, запросы на «оригинальный» сервер идут только с одного сервера, а не с множества серверов, что легче в управлении для клиента и сильно снижает нагрузку на его сервера.Shielding is a situation when an additional server is located between the CDN servers and the "original" server, through which traffic passes. Thus, requests for the "original" server come from only one server, and not from multiple servers, which is easier for the client to manage and greatly reduces the load on his servers.

Предлагаемое техническое решение осуществляет свою работу автономно, без необходимости организовывать централизованное хранилище для видео. Обычно системы транскодирования загружают созданное видео на какой-либо сервер, который уже отвечает за отказоустойчивость. В предлагаемой системе все сервера могут как транскодировать видео, так и могут являться источниками транскодированного видео.The proposed technical solution carries out its work autonomously, without the need to organize a centralized storage for video. Usually, transcoding systems upload the created video to some server, which is already responsible for fault tolerance. In the proposed system, all servers can both transcode video and can be sources of transcoded video.

Система представляет собой кластер серверов транскодирования видео под единым управлением балансировщика нагрузки. На входе система получает исходный видеопоток, а на выходе предоставляет транскодированный адаптивный поток, доступный по HTTP (HLS, также возможна выдача в MPEG-DASH).The system is a cluster of video transcoding servers under a single load balancer control. At the input, the system receives the original video stream, and at the output it provides a transcoded adaptive stream available over HTTP (HLS, it is also possible to output in MPEG-DASH).

Главной проблемой, которая появляется при исключении единого хранилища видео из системы, является обеспечение консистентности и однозначности данных при изменении текущего сервера транскодирования. Предлагаемое техническое решение использует ряд техник для решения этой проблемы. The main problem that appears when a single video storage is excluded from the system is to ensure the consistency and unambiguity of data when the current transcoding server is changed. The proposed technical solution uses a number of techniques to solve this problem.

Краткое описание проблемы консистентности данныхBrief description of the data consistency problem

В случае отсутствия единого хранилища видеофайлов пользователю потребуется искать файлы для определенного видеопотока на каждом из серверов транскодирования. Однако, если сессия транскодинга будет перезапускаться на разных серверах кластера (из-за отказа сервера либо перебалансировки нагрузки, либо по другим причинам), то в результате получают разные файлы с одинаковым именем для доступа к потоку на разных серверах. Проблему можно было бы частично решить с помощью полной синхронизации всех файлов между серверами кластера, однако, это приведет к росту трафика между серверами, увеличению требуемого хранилища на каждом из транскодеров, увеличению нагрузки на диски и как итог увеличению задержки при транскодировании видео. In the absence of a unified storage of video files, the user will need to search for files for a specific video stream on each of the transcoding servers. However, if the transcoding session is restarted on different servers in the cluster (due to server failure or load rebalancing, or for other reasons), then as a result, different files with the same name are obtained to access the stream on different servers. The problem could be partially solved by full synchronization of all files between the cluster servers, however, this will lead to an increase in traffic between servers, an increase in the required storage on each of the transcoders, an increase in the load on disks and, as a result, an increase in latency during video transcoding.

Предлагаемая система позволяет решить указанную проблему практически без какого-либо дополнительного увеличения нагрузки.The proposed system makes it possible to solve the indicated problem practically without any additional increase in the load.

В состав системы входят:The system includes:

• Несколько (по меньшей мере три) равноценных серверов транскодинга.• Several (at least three) equivalent transcoding servers.

• Управляющая система-балансировщик нагрузки.• Management system-load balancer.

• CDN для выдачи файлов, производимых серверами транскодинга.• CDN for delivery of files produced by transcoding servers.

Все сервера-транскодеры создают чанклисты и чанки видео.All transcoder servers create chunklists and video chunks.

Сервера синхронизируют чанклист друг с другом через сетевую файловую систему.Servers synchronize the chunklist with each other via the network file system.

Чанки видео не синхронизируются между серверами, а находятся только на том сервере, на котором создаются, чтобы не создавать сетевой трафикChunks of videos are not synchronized between servers, but are located only on the server on which they are created, so as not to create network traffic

Чанки видео имеют уникальную нумерацию. Это позволяет избежать проблем при рестарте транскодирования на другом сервере.Chunks of videos are numbered uniquely. This avoids problems when restarting transcoding on another server.

При просмотре видео чанклист скачивается с любого сервера, а для получения чанка видео осуществляется его поиск на одном из серверовWhen watching a video, the chunklist is downloaded from any server, and to receive a video chunk, it is searched for on one of the servers

За поиск чанклистов и чанков видео на серверах отвечает конфигурация CDN.The CDN configuration is responsible for searching for chunklists and video chunks on servers.

Вся доставка видео с помощью протолока HLS — это периодическое обновление чанклиста (списка ссылок на актуальные чанки видео) и запрос чанков видео (видеофрагментов) по ссылкам из этого чанклиста. All video delivery using the HLS protocol is a periodic update of the chunklist (a list of links to current video chunks) and a request for video chunks (video fragments) using links from this chunklist.

Пользователь осуществляет запрос чанклистов и чанки видео с CDN, а CDN ищет эти файлы поочередно на каждом из серверов кластера. Чанклисты будут найдены на любом из серверов, поскольку чанклист постоянно синхронизируется между серверами, а чанк видео - только на одном из них (потому что он есть только там, где создан).The user makes a request for chunklists and video chunks from the CDN, and the CDN searches for these files one by one on each of the cluster servers. The chunklists will be found on any of the servers, since the chunklist is constantly synchronized between the servers, and the video chunk is only on one of them (because it exists only where it was created).

Получение выходного транскодированного потока из входного по технологии HLS происходит следующим образом:Receiving the output transcoded stream from the input one using the HLS technology is as follows:

• На сервере транскодинга запускается процесс транскодирования.• The transcoding process starts on the transcoding server.

• Получают исходный поток с сервера-источника сигнала и производит его преобразование.• Receive the original stream from the signal source server and transforms it.

• Транскодированный поток фрагментируется на небольшие части, чаще всего длительностью от 2 до 5 секунд, и добавляется в периодически обновляемый чанклист (список ссылок на такие фрагменты). Данный способ удобен для раздачи видео с помощью распространенного протокола HTTP, так как весь видеопоток представляет собой набор оконечных видеофайлов.• The transcoded stream is fragmented into small parts, most often 2 to 5 seconds long, and added to a periodically updated chunklist (a list of links to such fragments). This method is convenient for distributing video using the popular HTTP protocol, since the entire video stream is a set of final video files.

Принцип работы системы.The principle of the system.

Балансировщик нагрузки формирует и отправляет серверу транскодирования команду. Формирование и отправка команды осуществляются следующим образом:The load balancer generates and sends a command to the transcoding server. Formation and sending of a command is carried out as follows:

1. На основании желаемых параметров, заданных пользователем (разрешение выходного видео, битрейт, количество кадров в секунду и других), формируется команда транскодирования видео;1. Based on the desired parameters specified by the user (output video resolution, bit rate, number of frames per second, etc.), a video transcoding command is formed;

2. На основании текущего алгоритма балансировки (например Round-Robin, когда случайным образом выбирается один из серверов, либо наименее загруженный по процессору сервер) балансировщик осуществляет выбор наиболее подходящего сервера из кластера транскодирования;2. Based on the current balancing algorithm (for example, Round-Robin, when one of the servers is randomly selected, or the server with the least CPU load), the balancer selects the most suitable server from the transcoding cluster;

3. Балансировщик отправляет выбранному серверу команду транскодирования через сервер обмена сообщениями на основе Redis. 3. The balancer sends a transcoding command to the selected server through the Redis-based messaging server.

После получения команды сервер транскодирования получает исходный поток (по протоколу RTMP или любому другому подходящему для передачи видео) и начинает транскодирование согласно полученным параметрам в формат HLS. Данный формат представляет транскодированный видеопоток в виде файлов следующего вида:After receiving the command, the transcoding server receives the original stream (via the RTMP protocol or any other suitable for video transmission) and starts transcoding according to the received parameters into the HLS format. This format represents a transcoded video stream in the form of files of the following type:

• Чанки видео — кусочки видео длиной примерно от 2 до 5 секунд.• Chunks of video - pieces of video approximately 2 to 5 seconds long.

• Чанклисты — постоянно обновляемый список имен генерируемых чанков видео.• Chunklists - constantly updated list of generated video chunk names.

При воспроизведении видео пользователь постоянно перезапрашивает чанклист по определенному неизменяемому и известному заранее URL, получает из него список URL актуальных чанков, и далее запрашивает требуемые для воспроизведения чанки видео.When playing a video, the user constantly re-requests the chunklist for a certain unchangeable and known in advance URL, receives from it a list of URLs of current chunks, and then requests the required video chunks for playback.

В рамках предлагаемой системы чанки видео имеют строго уникальное имя, привязанное к времени начала транскодирования, например 2019010101124501.ts, таким образом, имена файлов принципиально не могут пересечься, если сессия транскодирования будет перезапускаться на разных серверах. Within the framework of the proposed system, video chunks have a strictly unique name tied to the start time of transcoding, for example 2019010101124501.ts, thus, the file names fundamentally cannot overlap if the transcoding session is restarted on different servers.

Однако, имя файла чанклиста должно быть одинаковым на всех серверах, так как это имя заранее определено и явно указывается пользователям при доступе к потоку, например streams/123/480p/index.m3u8. Если сессия транскодирования будет запускаться на разных серверах, это приведет к наличию одного или нескольких неактуальных файлов на разных серверах, и пользователь не сможет однозначно определить, какой из файлов ему нужно смотреть в данный момент.However, the chunklist file name must be the same on all servers, since this name is predefined and explicitly indicated to users when accessing the stream, for example streams / 123 / 480p / index.m3u8. If a transcoding session is launched on different servers, this will lead to the presence of one or several irrelevant files on different servers, and the user will not be able to unambiguously determine which of the files he needs to watch at the moment.

В предлагаемой системе эта проблема решается путем хранения файлов чанклистов отдельно от чанков. При этом папка с чанклистами постоянно синхронизируется между серверами с помощью любой распределенной файловой системы (в конкретном случае используется GlusterFS). The proposed system solves this problem by storing chunklist files separately from chunks. In this case, the folder with chunklists is constantly synchronized between servers using any distributed file system (in this particular case, GlusterFS is used).

Чанклисты — файлы небольшого объема, но обновляются очень часто (раз в 1-2 секунды). Распределенная файловая система может легко и быстро синхронизировать эти файлы между серверами с минимальной нагрузкой на сеть и диски каждого из серверов. Chunklists are small files, but they are updated very often (once every 1-2 seconds). A distributed file system can easily and quickly synchronize these files between servers with minimal network and disk load on each server.

Таким образом, на каждом сервере мы получаем идентичный файл-чанклист и множество файлов с чанками видео, имеющих уникальное имя и потому не имеющими проблем с консистентностью.Thus, on each server we get an identical chunklist file and many files with video chunks that have a unique name and therefore have no problems with consistency.

Настройка CDN для просмотра видео.Setting up a CDN for watching videos.

Пользователь получает доступ к видеопотоку через CDN. По умолчанию для раздачи видеопотоков используется G-Core CDN. Это классический CDN (Content Delivery Network), предназначенный для доставки трафика на широкую аудиторию с помощью сети геораспределенных серверов. Сервера сети забирают видеотрафик с исходных серверов, кэшируют у себя и раздают конечным пользователям. Используя возможности настройки G-Core CDN появляется возможность указать в его настройках возможность использования в качестве источника файлов все сервера кластера транскодирования видео. При каждом запросе любого файла, CDN ищет его на любом из серверов кластера (проходя весь список по очереди, определяемой каждый раз случайным образом для выравнивания нагрузки, пока не найдет нужный файл).The user accesses the video stream via the CDN. By default, the G-Core CDN is used to distribute video streams. It is a classic CDN (Content Delivery Network) designed to deliver traffic to a wide audience using a network of geo-distributed servers. Network servers collect video traffic from source servers, cache them and distribute them to end users. Using the G-Core CDN settings, it becomes possible to specify in its settings the possibility of using all servers of the video transcoding cluster as a source of files. With each request for any file, the CDN looks for it on any of the cluster servers (going through the entire list in turn, randomly determined each time to balance the load, until it finds the required file).

В предлагаемой системе CDN работает следующим образом:In the proposed system, CDN works as follows:

• При поиске чанклиста — используется первый попавшийся чанклист, так как все чанклисты синхронизированы между серверами.• When searching for a chunklist - the first found chunklist is used, since all chunklists are synchronized between servers.

• При поиске чанка видео — осуществляется поиск по всем серверам, благодаря уникальности имени.• When searching for a video chunk - a search is carried out across all servers, due to the uniqueness of the name.

В конечном счете CDN осуществляет поиск всех необходимых пользователю файлов для просмотра видеопотока. Зритель не будет знать об устройстве кластера транскодирования видео, а будет использовать только внешние ссылки на CDN. Ultimately, the CDN searches for all the files the user needs to view the video stream. The viewer will not know about the device of the video transcoding cluster, but will only use external links to the CDN.

Процедура при смене сервера транскодирования.Procedure when changing the transcoding server.

В случае изменения текущего сервера транскодирования, транскодер начинает процесс не заново, а считывает уже имеющийся у него файл-чанклист. Таким образом, все ссылки на предыдущие чанки видео останутся в чанклисте и зритель не почувствует никакой разницы в чанклисте после смены сервера. Зритель сможет перематывать видео на момент как до переключения, так и после, а чанки видео будут скачиваться как с предыдущего, так и с нового сервера в данном случае.If the current transcoding server is changed, the transcoder does not start the process anew, but reads the chunklist file it already has. Thus, all links to previous video chunks will remain in the chunklist and the viewer will not feel any difference in the chunklist after changing the server. The viewer will be able to rewind the video for the moment both before and after the switch, and the video chunks will be downloaded both from the previous and from the new server in this case.

Ограниченная отказоустойчивость при падении одного из серверов кластера.Limited fault tolerance in the event of a failure of one of the cluster servers.

Так как чанки с видео никак не реплицируются, выход из строя текущего сервера транскодинга приведет к тому, что после перезапуска процесса транскодирования на новом сервере старые чанки будут недоступны, и перемотка назад для зрителя работать не будет. Since the chunks from the video are not replicated in any way, the failure of the current transcoding server will lead to the fact that after restarting the transcoding process on the new server, the old chunks will not be available, and rewinding will not work for the viewer.

Для решения данной проблемы используются промежуточные сервера между CDN и кластером транскодирования, которые будут принудительно и упреждающе кэшировать все новые чанки из чанклиста. В рамках инфраструктуры G-Core CDN это реализуемо с помощью сервиса шилдинга. Шилдинг позволяет снизить нагрузку на сервера-источники видеотрафика с помощью промежуточных кэширующих серверов. To solve this problem, intermediate servers are used between the CDN and the transcoding cluster, which will force and proactively cache all new chunks from the chunklist. Within the framework of the G-Core CDN infrastructure, this is implemented using a shielding service. Shielding allows you to reduce the load on the video traffic source servers by using intermediate caching servers.

Второй доступной технологией для решения данной проблемы с минимальными затратами является создание пар серверов в рамках рассматриваемого кластера, в рамках которых они будут обмениваться чанками с видео. Если бы обмен чанками производился между всеми серверами кластера, нагрузка на сеть и диски была бы N*M, где N — это количество серверов, а M — количество потков. Если сервера объединить в пары, нагрузка будет 2*M, что достаточно приемлемо для большинства случаев.The second available technology for solving this problem with minimal costs is the creation of pairs of servers within the considered cluster, within which they will exchange chunks with video. If chunks were exchanged between all servers in the cluster, the load on the network and disks would be N * M, where N is the number of servers, and M is the number of threads. If the servers are combined in pairs, the load will be 2 * M, which is quite acceptable for most cases.

Использование предлагаемой системы для Low-Latency стриминга.Using the proposed system for Low-Latency streaming.

Предалагемая система подходит для доставки видео по протоколу HTTP с низкой задержкой.The proposed system is suitable for low latency HTTP video delivery.

Различные имеющиеся на данный момент техники Low-Latency стриминга предполагают, что система может обновлять чанклисты часто и быстро, и предоставлять доступ к чанкам максимально быстро после их создания. Various currently available Low-Latency streaming techniques suggest that the system can update chunklists frequently and quickly, and provide access to chunks as quickly as possible after they are created.

Так как в предлагаемой системе отсутствуют любые синхронные взаимодействия, помимо быстрой синхронизации маленьких чанклистов, это позволяет максимально быстро получать доступ к создаваемым чанкам и чанклистам.Since the proposed system does not have any synchronous interactions, in addition to the fast synchronization of small chunklists, this allows you to get access to the created chunks and chunklists as quickly as possible.

На Фиг. 2 представлена общая схема вычислительного устройства (200), которое выполнено с возможностью обеспечивать обработку данных, необходимую для реализации заявленного решения, причем в качестве вычислительного устройства может выступать сервер. FIG. 2 shows a general diagram of a computing device (200), which is configured to provide data processing necessary to implement the claimed solution, and a server can act as a computing device.

В общем случае устройство (200) содержит такие компоненты, как: один или более процессоров (201), по меньшей мере одну память (202), средство хранения данных (203), интерфейсы ввода/вывода (204), средство В/В (205), средства сетевого взаимодействия (206).In the general case, the device (200) contains such components as: one or more processors (201), at least one memory (202), data storage means (203), input / output interfaces (204), I / O means ( 205), networking tools (206).

Процессор (201) устройства выполняет основные вычислительные операции, необходимые для функционирования устройства (200) или функциональности одного или более его компонентов. Процессор (201) исполняет необходимые машиночитаемые команды, содержащиеся в оперативной памяти (202).The processor (201) of the device performs the basic computational operations necessary for the operation of the device (200) or the functionality of one or more of its components. The processor (201) executes the necessary computer readable instructions contained in the main memory (202).

Память (202), как правило, выполнена в виде ОЗУ и содержит необходимую программную логику, обеспечивающую требуемый функционал. Memory (202), as a rule, is made in the form of RAM and contains the necessary program logic that provides the required functionality.

Средство хранения данных (203) может выполняться в виде HDD, SSD дисков, рейд массива, сетевого хранилища, флэш-памяти, оптических накопителей информации (CD, DVD, MD, Blue-Ray дисков) и т.п. Средство (203) позволяет выполнять долгосрочное хранение различного вида информации, например, вышеупомянутых файлов с наборами данных пользователей, базы данных, содержащих записи измеренных для каждого пользователя временных интервалов, идентификаторов пользователей и т.п.The data storage medium (203) can be performed in the form of HDD, SSD disks, raid array, network storage, flash memory, optical information storage devices (CD, DVD, MD, Blue-Ray disks), etc. The means (203) allows performing long-term storage of various types of information, for example, the aforementioned files with user data sets, a database containing records of time intervals measured for each user, user identifiers, etc.

Интерфейсы (204) представляют собой стандартные средства для подключения и работы с серверной частью, например, USB, RS232, RJ45, LPT, COM, HDMI, PS/2, Lightning, FireWire и т.п.Interfaces (204) are standard means for connecting and working with the server side, for example, USB, RS232, RJ45, LPT, COM, HDMI, PS / 2, Lightning, FireWire, etc.

Выбор интерфейсов (204) зависит от конкретного исполнения устройства (200), которое может представлять собой персональный компьютер, мейнфрейм, серверный кластер, тонкий клиент, смартфон, ноутбук и т.п.The choice of interfaces (204) depends on the specific implementation of the device (200), which can be a personal computer, mainframe, server cluster, thin client, smartphone, laptop, etc.

В качестве средств В/В данных (205) в любом воплощении системы, реализующей описываемый способ, должна использоваться клавиатура. Аппаратное исполнение клавиатуры может быть любым известным: это может быть, как встроенная клавиатура, используемая на ноутбуке или нетбуке, так и обособленное устройство, подключенное к настольному компьютеру, серверу или иному компьютерному устройству. Подключение при этом может быть, как проводным, при котором соединительный кабель клавиатуры подключен к порту PS/2 или USB, расположенному на системном блоке настольного компьютера, так и беспроводным, при котором клавиатура осуществляет обмен данными по каналу беспроводной связи, например, радиоканалу, с базовой станцией, которая, в свою очередь, непосредственно подключена к системному блоку, например, к одному из USB-портов. Помимо клавиатуры, в составе средств В/В данных также может использоваться: джойстик, дисплей (сенсорный дисплей), проектор, тачпад, манипулятор мышь, трекбол, световое перо, динамики, микрофон и т.п.As means of I / O data (205) in any embodiment of a system that implements the described method, a keyboard should be used. The hardware design of the keyboard can be any known: it can be either a built-in keyboard used on a laptop or netbook, or a stand-alone device connected to a desktop computer, server or other computer device. In this case, the connection can be either wired, in which the connecting cable of the keyboard is connected to the PS / 2 or USB port located on the system unit of the desktop computer, or wireless, in which the keyboard exchanges data via a wireless communication channel, for example, a radio channel, with base station, which, in turn, is directly connected to the system unit, for example, to one of the USB ports. In addition to the keyboard, I / O data can also include: joystick, display (touch screen), projector, touchpad, mouse, trackball, light pen, speakers, microphone, etc.

Средства сетевого взаимодействия (206) выбираются из устройства, обеспечивающий сетевой прием и передачу данных, например, Ethernet карту, WLAN/Wi-Fi модуль, Bluetooth модуль, BLE модуль, NFC модуль, IrDa, RFID модуль, GSM модем и т.п. С помощью средств (205) обеспечивается организация обмена данными по проводному или беспроводному каналу передачи данных, например, WAN, PAN, ЛВС (LAN), Интранет, Интернет, WLAN, WMAN или GSM.Networking means (206) are selected from a device that provides network reception and transmission of data, for example, Ethernet card, WLAN / Wi-Fi module, Bluetooth module, BLE module, NFC module, IrDa, RFID module, GSM modem, etc. The means (205) provide the organization of data exchange via a wired or wireless data transmission channel, for example, WAN, PAN, LAN, Intranet, Internet, WLAN, WMAN or GSM.

Компоненты устройства (200) сопряжены посредством общей шины передачи данных (210).The components of the device (200) are interfaced through a common data bus (210).

В настоящих материалах заявки было представлено предпочтительное раскрытие осуществление заявленного технического решения, которое не должно использоваться как ограничивающее иные, частные воплощения его реализации, которые не выходят за рамки испрашиваемого объема правовой охраны и являются очевидными для специалистов в соответствующей области техники.In the present application materials, a preferred disclosure of the implementation of the claimed technical solution was presented, which should not be used as limiting other, particular embodiments of its implementation, which do not go beyond the scope of the claimed scope of legal protection and are obvious to specialists in the relevant field of technology.

Claims (11)

Система отказоустойчивого транскодирования и выдачи прямых потоков в формате HLS, содержащая:A system of fault-tolerant transcoding and delivery of direct streams in HLS format, containing: географически распределённую сетевую инфраструктуру (CDN), выполненную с возможностью выдачи чанклистов и чанки видео, производимых серверами транскодирования, причем при запросе чанклистов и чанки видео с CDN, CDN за счет заранее заданной конфигурации осуществляет поочередный поиск чанклистов и чанки видео на каждом из серверов кластера;geographically distributed network infrastructure (CDN), capable of issuing chunklists and video chunks produced by transcoding servers, and when requesting chunklists and video chunks from a CDN, the CDN, due to a predetermined configuration, alternately searches for chunklists and video chunks on each of the cluster servers; балансировщик нагрузки, который выполнен с возможностью формирования и отправки команд серверам транскодирования;a load balancer that is configured to generate and send commands to transcoding servers; кластер серверов транскодирования видео, находящийся под единым управлением балансировщика нагрузки и выполненный с возможностью:a cluster of video transcoding servers, under the unified control of the load balancer and made with the ability to: создания чанклистов и чанки видео;creating chunklists and video chunks; синхронизации чанклистов друг с другом посредством распределенной файловой системы, причем:synchronization of chunklists with each other via a distributed file system, moreover: чанки видео не синхронизируются между серверами, а находятся только на том сервере, на котором создаются;video chunks are not synchronized between servers, but are located only on the server on which they are created; чанки видео имеют уникальную нумерацию;video chunks are uniquely numbered; при воспроизведении видео чанклист скачивается с любого сервера, а для получения чанка видео осуществляется его поиск на одном из серверов,when playing a video, the chunklist is downloaded from any server, and to receive a video chunk, it is searched for on one of the servers, при этом посредством промежуточных серверов между CDN и кластером транскодирования осуществляется принудительное и упреждающее кэширование всех новых чанки из чанклиста, причемat the same time, by means of intermediate servers between the CDN and the transcoding cluster, forced and proactive caching of all new chunks from the chunklist is carried out, and посредством транскодера при смене сервера транскодирования осуществляется считывание имеющегося у него файл-чанклиста.by means of the transcoder, when the transcoding server is changed, the chunklist file that it has is read.
RU2020131840A 2020-09-28 2020-09-28 System for fault-tolerant transcoding and output of direct streams in hls format RU2759595C1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
RU2020131840A RU2759595C1 (en) 2020-09-28 2020-09-28 System for fault-tolerant transcoding and output of direct streams in hls format
PCT/RU2021/050397 WO2022066066A1 (en) 2020-09-28 2021-11-26 System for fail-safe transcoding and generating direct streams in hls format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2020131840A RU2759595C1 (en) 2020-09-28 2020-09-28 System for fault-tolerant transcoding and output of direct streams in hls format

Publications (1)

Publication Number Publication Date
RU2759595C1 true RU2759595C1 (en) 2021-11-15

Family

ID=78607167

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2020131840A RU2759595C1 (en) 2020-09-28 2020-09-28 System for fault-tolerant transcoding and output of direct streams in hls format

Country Status (2)

Country Link
RU (1) RU2759595C1 (en)
WO (1) WO2022066066A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140379871A1 (en) * 2011-12-29 2014-12-25 Koninklijke Kpn N.V. Network-Initiated Content Streaming Control
US20150288736A1 (en) * 2014-04-03 2015-10-08 Cisco Technology Inc. Method for Enabling Use of HLS as a Common Intermediate Format
CN107222480A (en) * 2017-05-27 2017-09-29 中国联合网络通信集团有限公司 A kind of flow media playing method, terminal device and CDN server
RU2647654C2 (en) * 2012-08-27 2018-03-16 Броадпик System and method of delivering audio-visual content to client device
US20180227648A1 (en) * 2015-10-29 2018-08-09 Le Holdings (Beijing) Co., Ltd. Method for live broadcast based on hls protocol and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140379871A1 (en) * 2011-12-29 2014-12-25 Koninklijke Kpn N.V. Network-Initiated Content Streaming Control
RU2647654C2 (en) * 2012-08-27 2018-03-16 Броадпик System and method of delivering audio-visual content to client device
US20150288736A1 (en) * 2014-04-03 2015-10-08 Cisco Technology Inc. Method for Enabling Use of HLS as a Common Intermediate Format
US20180227648A1 (en) * 2015-10-29 2018-08-09 Le Holdings (Beijing) Co., Ltd. Method for live broadcast based on hls protocol and electronic device
CN107222480A (en) * 2017-05-27 2017-09-29 中国联合网络通信集团有限公司 A kind of flow media playing method, terminal device and CDN server

Also Published As

Publication number Publication date
WO2022066066A1 (en) 2022-03-31

Similar Documents

Publication Publication Date Title
US8145782B2 (en) Dynamic chunking for media streaming
US8489760B2 (en) Media file storage format and adaptive delivery system
US10469885B2 (en) Playback synchronization among adaptive bitrate streaming clients
JP6181650B2 (en) Transmission device, transmission method, and network device
US11665218B2 (en) Fast encoding of live streaming media content
US8190674B2 (en) Variable rate media delivery system
CN109791557B (en) Computer-implemented method for managing asset storage and storage system
US20120005313A1 (en) Dynamic indexing for ad insertion in media streaming
WO2016058411A1 (en) Splicing method and splicing system for http live streaming media fragmentation
US20140165119A1 (en) Offline download method, multimedia file download method and system thereof
US20110191446A1 (en) Storing and streaming media content
AU2013240578B2 (en) Dynamic audio track selection for media streaming
US8954540B2 (en) Dynamic audio track selection for media streaming
AU2013240558B2 (en) Dynamic chunking for delivery instances
US20180124445A1 (en) Massive file and data object replicator
JP2014532338A (en) Method and device for transmitting streaming media
RU2759595C1 (en) System for fault-tolerant transcoding and output of direct streams in hls format
US10523755B1 (en) Peer-based cloud storage for media broadcasts
van der Hooft et al. Low-latency delivery of news-based video content
US20210409813A1 (en) Lean private copy of media content within network-based digital video recordings
van der Hooft et al. Performance characterization of low-latency adaptive streaming from video portals
Prasad et al. Social Educational Streaming Platform Using HTML Live Streaming
Qiang et al. A Hyper-converged video management system based on object storage
KR20160063182A (en) Hadoop-based system for providing distributed multimedia streaming service and method thereof
KR20150112525A (en) Method for providing wireless streaming service and apparatus therefor