CN102045312B - Self-adaptative transcoding method and system - Google Patents
Self-adaptative transcoding method and system Download PDFInfo
- Publication number
- CN102045312B CN102045312B CN 200910205250 CN200910205250A CN102045312B CN 102045312 B CN102045312 B CN 102045312B CN 200910205250 CN200910205250 CN 200910205250 CN 200910205250 A CN200910205250 A CN 200910205250A CN 102045312 B CN102045312 B CN 102045312B
- Authority
- CN
- China
- Prior art keywords
- transcoding
- player
- media
- module
- media player
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本发明提供一种自适应转码方法和系统。所述自适应转码方法包括:当媒体播放器不支持本地多媒体文件的格式时,触发媒体服务器;媒体服务器确定转码模块是否支持转码,并且当确定转码模块支持转码时,通知媒体播放器上传所述多媒体文件;当媒体播放器将所述多媒体文件上传到媒体服务器时,媒体服务器启动转码模块读取上传的多媒体文件,从而转码模块以预定的转码策略对多媒体文件进行转码;媒体服务器从转码模块接收转码后的数据,并将接收的转码后的数据发送到媒体播放器中以进行播放;媒体服务器探测媒体播放器播放过程中网络性能参数以及播放器本身的性能参数,并根据所述性能参数对转码策略进行实时调整。
The invention provides an adaptive transcoding method and system. The adaptive transcoding method includes: when the media player does not support the format of the local multimedia file, triggering the media server; the media server determines whether the transcoding module supports transcoding, and when determining that the transcoding module supports transcoding, notifies the media The player uploads the multimedia file; when the media player uploads the multimedia file to the media server, the media server starts the transcoding module to read the uploaded multimedia file, so that the transcoding module performs the multimedia file with a predetermined transcoding strategy Transcoding; the media server receives the transcoded data from the transcoding module, and sends the received transcoded data to the media player for playback; the media server detects the network performance parameters of the media player during playback and the player own performance parameters, and adjust the transcoding strategy in real time according to the performance parameters.
Description
技术领域 technical field
本发明涉及一种自适应转码方法和系统,更具体地讲,涉及一种基于数字家庭网络的媒体播放器端的自动自适应转码方法和系统。The present invention relates to an adaptive transcoding method and system, more specifically, to an automatic adaptive transcoding method and system based on a digital home network media player.
背景技术 Background technique
数字家庭网络通过家庭网关将公共网络功能和应用延伸到家庭,并以有线网络或无线网络方式连接各种信息终端(如家用电器、PC等),提供语音、数据、多媒体、控制和管理等功能,达到信息在家庭内部终端之间以及与外部公共网络的充分流通和共享。从1994年数字家庭概念的诞生,到目前数字家庭市场的正式启动,从“维纳斯”计划的推出,到UPnP论坛、DLNA数字家庭组织的成立,已经历经十余年发展,数字化生活已步入真正的发展期。随着数字家庭网络梦想的逐步清晰,标准的问题随之而来。The digital home network extends the public network functions and applications to the home through the home gateway, and connects various information terminals (such as household appliances, PCs, etc.) through wired or wireless networks to provide functions such as voice, data, multimedia, control and management. , to achieve full circulation and sharing of information between internal terminals in the home and with external public networks. From the birth of the digital home concept in 1994 to the official launch of the digital home market, from the launch of the "Venus" project to the establishment of the UPnP forum and the DLNA digital home organization, it has been more than ten years of development, and the digital life has come a long way. into real development. As the dream of a digital home network becomes clearer, the question of standards comes along.
2003年6月,英特尔、飞利浦、IBM、惠普、微软和富士通等17家消费电子行业巨头成立“数字家庭工作组”(DHWG:Digital Home WorkGroup),共同研发在开放的行业标准基础上,建立一个具备协同工作能力的平台,以使各厂商开发出能通过有线或无线的互联网络进行内容共享的数字家庭产品。闪联(IGRS)标准于2005年6月29日正式获批成为国家推荐性行业标准,成为中国第一个“3C协同产业技术标准”。总体上看,DLNA的范围仅限于家庭内部,其目的是实现家电、计算机、通信设备的智能连接。IGRS与DLNA的主要区别在于:IGRS标准不仅实现设备间的智能互联,更重要的是实现设备的资源共享和协同服务;从工作范围上来讲,IGRS标准的范围不仅限于家庭,包括企业中的应用以及社会上相关资源的协同应用。In June 2003, 17 consumer electronics industry giants including Intel, Philips, IBM, HP, Microsoft and Fujitsu established the "Digital Home Work Group" (DHWG: Digital Home Work Group) to jointly develop and establish a A platform with the ability to work together enables manufacturers to develop digital home products that can share content through wired or wireless Internet networks. The IGRS standard was officially approved as a national recommended industry standard on June 29, 2005, becoming China's first "3C collaborative industry technology standard". Generally speaking, the scope of DLNA is limited to the interior of the home, and its purpose is to realize the intelligent connection of home appliances, computers, and communication equipment. The main difference between IGRS and DLNA is: the IGRS standard not only realizes the intelligent interconnection between devices, but more importantly, realizes the resource sharing and collaborative services of the devices; in terms of the scope of work, the scope of the IGRS standard is not limited to the family, including the application in the enterprise And the collaborative application of relevant resources in the society.
对于以上标准,按层次来分可以分为三块:设备探测与连接、媒体内容的管理以及媒体格式与传输。转码功能属于“媒体格式与传输”这个范畴。IGRS中由网关来实现,DLNA中由MIU(媒体互操作单元)来实现。网关与MIU都可以实现实时转码,且能够根据配置信息自动调整转码方案。然而,无论IGRS还是DLNA,实现的都是媒体流由媒体服务器传输到媒体播放器过程中的转码,默认多媒体文件存放在媒体服务器中。因此,现有转码方案并没有考虑到当多媒体文件存在于媒体播放器端时,媒体播放器需要对多媒体文件进行转码才能播放的问题。此外,现有技术只提供几种固定的转码方案,而没有根据媒体播放器的性能与网络状况实时调整的转码方案。For the above standards, it can be divided into three parts according to the level: device detection and connection, media content management, and media format and transmission. The transcoding function falls under the category of "media format and transmission". IGRS is implemented by a gateway, and DLNA is implemented by an MIU (Media Interoperation Unit). Both the gateway and MIU can realize real-time transcoding, and can automatically adjust the transcoding scheme according to the configuration information. However, no matter IGRS or DLNA, what is implemented is the transcoding of the media stream in the process of being transmitted from the media server to the media player. By default, the multimedia files are stored in the media server. Therefore, the existing transcoding scheme does not take into account the problem that the media player needs to transcode the multimedia file to play the multimedia file when the multimedia file exists on the media player side. In addition, the prior art only provides several fixed transcoding schemes, but there is no transcoding scheme that can be adjusted in real time according to the performance of the media player and network conditions.
发明内容 Contents of the invention
在下面的描述中将部分地阐明本发明另外的方面和/或优点,通过描述,其会变得更加清楚,或者通过实施本发明可以了解。Additional aspects and/or advantages of the invention will be set forth in part in the description which follows, and will be apparent from the description, or may be learned by practice of the invention.
根据本发明的一方面,提供一种自适应转码方法,包括以下步骤:当媒体播放器不支持本地多媒体文件的格式时,触发媒体服务器;媒体服务器确定转码模块是否支持转码,并且当确定转码模块支持转码时,通知媒体播放器上传所述多媒体文件;当媒体播放器将所述多媒体文件上传到媒体服务器时,媒体服务器启动转码模块读取上传的多媒体文件,从而转码模块以预定的转码策略对多媒体文件进行转码;媒体服务器从转码模块接收转码后的数据,并将接收的转码后的数据发送到媒体播放器中以进行播放;媒体服务器探测媒体播放器播放过程中网络性能参数以及播放器本身的性能参数,并根据所述性能参数对转码策略进行实时调整。According to one aspect of the present invention, a method for adaptive transcoding is provided, comprising the following steps: when the media player does not support the format of the local multimedia file, trigger the media server; the media server determines whether the transcoding module supports transcoding, and when When it is determined that the transcoding module supports transcoding, notify the media player to upload the multimedia file; when the media player uploads the multimedia file to the media server, the media server starts the transcoding module to read the uploaded multimedia file, thereby transcoding The module transcodes multimedia files with a predetermined transcoding strategy; the media server receives the transcoded data from the transcoding module, and sends the received transcoded data to the media player for playback; the media server detects the media During the playback process of the player, the network performance parameters and the performance parameters of the player itself, and adjust the transcoding strategy in real time according to the performance parameters.
根据本发明另一方面,提供一种自适应转码系统,包括:媒体播放器,当不支持本地多媒体文件的格式时触发媒体服务器,并且根据媒体服务器的通知上传所述多媒体文件;媒体服务器,确定转码模块是否支持转码,并且当确定转码模块支持转码时,通知媒体播放器端上传所述多媒体文件;转码模块,当媒体播放器将所述多媒体文件上传到媒体服务器时,读取上传的多媒体文件,以预定的转码策略对多媒体文件进行转码,并将转码后的数据发送到媒体服务器,其中,媒体播放器从媒体服务器接收转码后的数据以进行播放,媒体服务器探测媒体播放器的播放过程中网络性能参数以及播放器本身的性能参数,并根据所述性能参数对转码策略进行实时调整。According to another aspect of the present invention, an adaptive transcoding system is provided, including: a media player, triggering the media server when the format of the local multimedia file is not supported, and uploading the multimedia file according to the notification of the media server; the media server, Determine whether the transcoding module supports transcoding, and when it is determined that the transcoding module supports transcoding, notify the media player to upload the multimedia file; the transcoding module, when the media player uploads the multimedia file to the media server, Read the uploaded multimedia file, transcode the multimedia file with a predetermined transcoding strategy, and send the transcoded data to the media server, wherein the media player receives the transcoded data from the media server for playback, The media server detects the network performance parameters during the playback of the media player and the performance parameters of the player itself, and adjusts the transcoding strategy in real time according to the performance parameters.
附图说明 Description of drawings
通过下面结合附图对实施例进行的描述,本发明的这些和/或其他方面和优点将会变得清楚和更易于理解,其中:These and/or other aspects and advantages of the present invention will become clearer and easier to understand through the following description of embodiments in conjunction with the accompanying drawings, wherein:
图1示出了根据本发明实施例的自适应转码系统的框图;FIG. 1 shows a block diagram of an adaptive transcoding system according to an embodiment of the present invention;
图2示出了根据本发明实施例的自适应转码方法的流程图。Fig. 2 shows a flowchart of an adaptive transcoding method according to an embodiment of the present invention.
具体实施方式 Detailed ways
现在对本发明实施例进行详细的描述,其示例表示在附图中,其中,相同的标号始终表示相同部件。下面通过参照附图对实施例进行描述以解释本发明。Embodiments of the invention will now be described in detail, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like parts throughout. The embodiments are described below in order to explain the present invention by referring to the figures.
图1示出了根据本发明实施例的自适应转码系统的框图。参照图1,所述自适应转码系统包括媒体服务器、媒体播放器和转码模块,其中,转码模块可以设置在媒体服务器中,或者与媒体服务器分开设置。在媒体服务器、媒体播放器和转码模块内部又包含有多个功能模块,以协同完成特定功能,比如上传、转码、下载等。Fig. 1 shows a block diagram of an adaptive transcoding system according to an embodiment of the present invention. Referring to FIG. 1 , the adaptive transcoding system includes a media server, a media player, and a transcoding module, wherein the transcoding module can be set in the media server, or set separately from the media server. The media server, media player, and transcoding module also contain multiple functional modules to cooperate to complete specific functions, such as uploading, transcoding, and downloading.
具体地讲,媒体服务器包括:设备探测和连接模块、内容目录服务模块、上传控制模块、流媒体服务模块、XML文本解析模块、转码动态配置模块、网络和播放器性能探测模块、FIFO(先进先出)控制模块。其中,设备探测和连接模块、内容目录服务模块、上传控制模块、流媒体服务模块和XML文本解析模块是数字家庭网络协议中已经定义的。Specifically, the media server includes: device detection and connection module, content directory service module, upload control module, streaming media service module, XML text analysis module, transcoding dynamic configuration module, network and player performance detection module, FIFO (advanced first out) control module. Among them, the device detection and connection module, the content directory service module, the upload control module, the streaming media service module and the XML text analysis module are already defined in the digital home network protocol.
设备探测和连接模块探测媒体服务器与家庭网络中的装置的连接状态,并实现与家庭网络中的装置的物理连接。内容目录服务模块向媒体播放器提供可以播放的内容(视频、音频、图片等)的目录服务。XML文本解析模块用于解析转码器端以及媒体播放器端的配置文件,并将解析后的配置文件的信息提供给转码动态配置模块。上述三个模块所实现的功能是本领域技术人员公知的,因此在图1中省略了上述三个模块。The device detection and connection module detects the connection status of the media server and the devices in the home network, and realizes the physical connection with the devices in the home network. The content catalog service module provides the catalog service of playable content (video, audio, picture, etc.) to the media player. The XML text parsing module is used for parsing the configuration files of the transcoder side and the media player side, and provides the information of the parsed configuration files to the transcoding dynamic configuration module. The functions implemented by the above three modules are well known to those skilled in the art, so the above three modules are omitted in FIG. 1 .
上传控制模块控制由媒体播放器上传的多媒体文件数据,用于实现速率的控制以匹配转码模块的转码速度。The upload control module controls the multimedia file data uploaded by the media player, and is used to control the rate to match the transcoding speed of the transcoding module.
FIFO控制模块提供数据流的一种先进先出的机制,从而方便对流媒体数据进行流量控制。FIFO控制模块包括两个FIFO文件,一个用来存储从媒体播放器端接收的原始格式的FIFO输入文件(即,媒体播放器上传的多媒体文件数据),另一个从转码器读取FIFO输出文件,即,经由转码器转码后的多媒体数据。根据本发明实施例,FIFO控制模块可以设置一个容量限制以便控制流量。例如,当FIFO输入文件达到容量限制时,上传控制模块根据FIFO控制模块发出的错误消息请求媒体播放器停止上传多媒体文件数据。当FIFO输入文件已被转码模块读取之后FIFO输入文件空闲时,上传控制模块根据FIFO控制模块发出的空闲消息请求媒体播放器继续上传多媒体文件数据。The FIFO control module provides a first-in-first-out mechanism of data flow, so as to facilitate flow control of streaming media data. The FIFO control module includes two FIFO files, one is used to store the FIFO input file in the original format received from the media player (that is, the multimedia file data uploaded by the media player), and the other reads the FIFO output file from the transcoder , that is, the multimedia data transcoded by the transcoder. According to an embodiment of the present invention, the FIFO control module can set a capacity limit to control flow. For example, when the FIFO input file reaches the capacity limit, the upload control module requests the media player to stop uploading multimedia file data according to the error message sent by the FIFO control module. When the FIFO input file is idle after the FIFO input file has been read by the transcoding module, the upload control module requests the media player to continue uploading multimedia file data according to the idle message sent by the FIFO control module.
流媒体服务模块从FIFO控制模块接收FIFO输出文件(即,转码后的多媒体数据),并将转码后的多媒体数据传输到媒体播放器。The streaming media service module receives the FIFO output file (that is, transcoded multimedia data) from the FIFO control module, and transmits the transcoded multimedia data to the media player.
网络和播放器性能探测模块实时探测网络性能参数以及播放器本身的性能参数。网络性能参数包括当前带宽、IP包的送达率等。播放器本身的性能参数包括当前CPU占用率、当前帧率等。网络性能参数和播放器本身的性能参数每隔一段时间(例如,每隔5秒)就会更新一次。网络和播放器性能探测模块实时获取网络和播放器本身的性能参数,并将这些性能参数传输到转码动态配置模块。The network and player performance detection module detects network performance parameters and player performance parameters in real time. Network performance parameters include current bandwidth, delivery rate of IP packets, and so on. The performance parameters of the player itself include the current CPU usage, the current frame rate, and so on. The network performance parameters and the performance parameters of the player itself are updated at regular intervals (for example, every 5 seconds). The network and player performance detection module obtains the performance parameters of the network and the player itself in real time, and transmits these performance parameters to the transcoding dynamic configuration module.
转码动态配置模块可以获得以下信息:网络和播放器本身的性能参数、转码器功能描述文件以及媒体播放器端配置文件。其中,媒体播放器端配置文件包括播放器硬件功能描述文件和播放器性能描述文件,稍后将结合媒体播放器对此进行描述。转码动态配置模块利用转码器功能描述文件和媒体播放器端配置文件来大致配置转码模块的转码策略,并利用网络和播放器本身的性能参数来实时调整转码策略,以使转码和播放性能达到最佳。The transcoding dynamic configuration module can obtain the following information: the performance parameters of the network and the player itself, the function description file of the transcoder and the configuration file of the media player. Wherein, the configuration file at the media player side includes a player hardware function description file and a player performance description file, which will be described later in conjunction with the media player. The transcoding dynamic configuration module uses the transcoder function description file and the media player configuration file to roughly configure the transcoding strategy of the transcoding module, and uses the performance parameters of the network and the player itself to adjust the transcoding strategy in real time, so that the transcoding encoding and playback performance to achieve the best.
媒体播放器包括上传模块、媒体控制模块、媒体播放模块、播放器硬件功能描述文件和播放器性能描述文件。其中,上传模块、媒体控制模块、媒体播放模块是数字家庭网络协议中已经定义的,而播放器硬件功能描述文件和播放器性能描述文件组成上述的媒体播放器端配置文件。媒体播放器端配置文件可存储在媒体播放器的本地存储器中。此外,图1中示出了置于媒体播放器中的多媒体文件。The media player includes an upload module, a media control module, a media player module, a player hardware function description file and a player performance description file. Among them, the upload module, media control module and media player module are already defined in the digital home network protocol, and the player hardware function description file and the player performance description file form the above media player configuration file. The media player side configuration file may be stored in the local memory of the media player. In addition, multimedia files placed in a media player are shown in FIG. 1 .
媒体播放模块用于播放多媒体文件。具体地讲,媒体播放模块是一个多输入源的多媒体播放器,支持音频、视频、图片的播放。在正常情况下,如果媒体播放器的本地硬件解码器可以对多媒体文件解码时,播放模块直接播放多媒体文件;如果本地硬件解码器不支持对多媒体文件解码并且同时转码模块支持转码,则媒体播放模块将数据源转向媒体服务器端的输入,接收媒体服务器中的流媒体服务模块提供的数据(即,转码后的多媒体文件),以实现实时流媒体播放。The media player module is used to play multimedia files. Specifically, the media player module is a multimedia player with multiple input sources, supporting the playback of audio, video, and pictures. Under normal circumstances, if the local hardware decoder of the media player can decode the multimedia file, the playback module directly plays the multimedia file; if the local hardware decoder does not support the decoding of the multimedia file and the transcoding module supports transcoding, the media The playback module turns the data source to the input of the media server, and receives the data (that is, transcoded multimedia files) provided by the streaming service module in the media server, so as to realize real-time streaming media playback.
媒体控制模块控制上传模块和媒体播放模块,并监控播放器性能信息。媒体控制模块监控媒体播放模块播放的多媒体文件的格式,当发现有多媒体文件的格式不被媒体播放模块支持时,触发上传模块。当上传模块由媒体控制模块触发时,将多媒体文件上传到媒体服务器中的上传控制模块。上传模块可以在媒体控制模块的控制下根据HTTP协议上传多媒体文件。此外,媒体控制模块还可将媒体播放器端配置文件发送到媒体服务器中的转码动态配置模块。另一方面,在转码模块进行转码期间,媒体控制模块根据媒体服务器中的网络和播放器性能探测模块的请求,将播放器性能信息实时发送到网络和播放器性能探测模块。The media control module controls the upload module and the media player module, and monitors player performance information. The media control module monitors the format of the multimedia file played by the media player module, and triggers the upload module when it finds that the format of the multimedia file is not supported by the media player module. When the upload module is triggered by the media control module, the multimedia file is uploaded to the upload control module in the media server. The upload module can upload multimedia files according to the HTTP protocol under the control of the media control module. In addition, the media control module can also send the media player configuration file to the transcoding dynamic configuration module in the media server. On the other hand, during the transcoding by the transcoding module, the media control module sends the player performance information to the network and player performance detection module in real time according to the request of the network and player performance detection module in the media server.
播放器硬件功能描述文件包括两个方面,一方面是硬件解码器的功能描述,另一方面是播放器的硬件描述,比如屏幕大小、分辨率、内存大小、声道数等。播放器性能描述文件包括处理器的能力、硬件解码器的能力以及分配给解码器的显示内存的容量等。The player hardware function description file includes two aspects, one is the function description of the hardware decoder, and the other is the hardware description of the player, such as screen size, resolution, memory size, number of channels, etc. The player performance description file includes the capability of the processor, the capability of the hardware decoder, and the capacity of the display memory allocated to the decoder, etc.
转码模块包括任意第三方提供的转码器以及转码器功能描述文件。最常见的转码器就是ffmpeg。转码器功能描述文件定义了转码器所支持的转码功能,例如,将wmv文件转换为mpeg4文件的转码功能。转码模块在运行过程中可以是一个独立进程,也可以是独立的硬件转码装置。The transcoding module includes the transcoder provided by any third party and the function description file of the transcoder. The most common transcoder is ffmpeg. The transcoder function description file defines the transcoding function supported by the transcoder, for example, the transcoding function of converting a wmv file into an mpeg4 file. During operation, the transcoding module can be an independent process, or an independent hardware transcoding device.
具体地讲,转码模块可以是第三方的转码软件库,也可以是网络上的硬件设备。如果转码模块是网络上的硬件设备的话,则在转码模块与媒体服务器中间需要设置网络通信模块以实现两者间的数据与控制信息的传输。转码模块本身是动态可配置的,涉及码率的变换、输出分辨率的变换、色彩空间的变换等。Specifically, the transcoding module may be a third-party transcoding software library, or a hardware device on the network. If the transcoding module is a hardware device on the network, a network communication module needs to be set between the transcoding module and the media server to realize the transmission of data and control information between the two. The transcoding module itself is dynamically configurable, involving bit rate conversion, output resolution conversion, color space conversion, etc.
根据本发明实施例,媒体服务器中的转码动态配置模块首先提取转码器功能描述文件,确定可以转码的格式范围,建立转码规则库。然后,转码动态配置模块提取媒体播放器端配置文件,按顺序匹配查询转码模块是否支持将原始格式转换到播放器所支持的格式,并按最近匹配原则选择。由于网络和播放器性能的不稳定性,因此转码动态配置模块可利用网络和播放器性能探测模块所提供的信息实时调整转码动作,以达到在播放器端实现最优播放效果。According to the embodiment of the present invention, the transcoding dynamic configuration module in the media server first extracts the transcoder function description file, determines the range of formats that can be transcoded, and establishes a transcoding rule base. Then, the transcoding dynamic configuration module extracts the configuration file of the media player, matches in sequence and inquires whether the transcoding module supports converting the original format to the format supported by the player, and selects according to the nearest matching principle. Due to the instability of network and player performance, the transcoding dynamic configuration module can use the information provided by the network and player performance detection module to adjust the transcoding action in real time, so as to achieve the optimal playback effect on the player side.
以下参照图2来描述由所述自适应转码系统执行的自适应转码方法。The adaptive transcoding method performed by the adaptive transcoding system is described below with reference to FIG. 2 .
图2示出了根据本发明实施例的自适应转码方法的流程图。假设此时媒体播放器和媒体服务器已建立了连接。Fig. 2 shows a flowchart of an adaptive transcoding method according to an embodiment of the present invention. Assume that the media player and the media server have established a connection at this point.
参照图2,在步骤S201中,当媒体播放器中的媒体播放模块在播放本地多媒体文件时,如果媒体控制模块发现该多媒体文件的格式不被媒体播放模块支持,则读取本地存储器中的媒体播放器端配置文件,并将读取的媒体播放器端配置文件发送到媒体服务器端。同时,媒体控制模块可触发媒体服务器中的转码动态配置模块。With reference to Fig. 2, in step S201, when the media player module in the media player is playing local multimedia file, if the media control module finds that the format of this multimedia file is not supported by the media player module, then read the media in the local memory Player-side configuration file, and send the read media player-side configuration file to the media server side. At the same time, the media control module can trigger the transcoding dynamic configuration module in the media server.
媒体播放器端配置文件中的播放器硬件功能描述文件的示例由XML文本描述如下:An example of the player hardware function description file in the media player configuration file is described by XML text as follows:
<profile name=”supported file format”><profile name="supported file format">
<mimetype>audio/x-wav</mimetype><mimetype>audio/x-wav</mimetype>
<mimetype>audio/midi</mimetype><mimetype>audio/midi</mimetype>
<mimetype>audio/mp3</mimetype><mimetype>audio/mp3</mimetype>
<mimetype>video/mp4</mimetype><mimetype>video/mp4</mimetype>
<mimetype>video/3gp</mimetype><mimetype>video/3gp</mimetype>
<mimetype>video/x-mp4</mimetype><mimetype>video/x-mp4</mimetype>
<mimetype>image/jpeg</mimetype><mimetype>image/jpeg</mimetype>
<mimetype>image/gif</mimetype><mimetype>image/gif</mimetype>
<mimetype>image/png</mimetype><mimetype>image/png</mimetype>
</profile></profile>
<profile name=”player hardware infomation”><profile name="player hardware infomation">
<pixel>720x576</pixel><pixel>720x576</pixel>
<memory>128</memory><memory>128</memory>
<channel>2</channel><channel>2</channel>
</profile></profile>
根据如上所示的播放器硬件功能描述文件,可以确定媒体播放器支持的音频、视频、图片格式,以及媒体播放器的硬件信息,比如分辨率、内存大小、声道数。According to the player hardware function description file shown above, the audio, video, and picture formats supported by the media player can be determined, as well as the hardware information of the media player, such as resolution, memory size, and number of channels.
在步骤S202中,媒体服务器中的转码动态配置模块接收到媒体播放器端配置文件后,调用XML文本解析模块将媒体播放器端配置文件解析成元数据(例如,播放器硬件功能描述文件中定义的audio/x-wav、video/mp4、image/png等),同时解析转码器功能描述文件,利用解析后的信息确定转码模块是否支持转码。这里,转码动态配置模块首先确定在转码器功能描述文件里定义的所支持的转码类型,然后确定是否可以将当前媒体播放器不支持的格式转换到播放器端配置文件中所列的任意一种文件。如果确定转码模块支持转码,则转码动态配置模块通知媒体播放器端开始上传多媒体文件,同时将媒体播放器端的数据源从本地多媒体文件重定向到媒体服务器的流媒体服务。In step S202, after the transcoding dynamic configuration module in the media server receives the configuration file of the media player, it invokes the XML text analysis module to resolve the configuration file of the media player into metadata (for example, in the player hardware function description file defined audio/x-wav, video/mp4, image/png, etc.), and analyze the transcoder function description file at the same time, and use the parsed information to determine whether the transcoding module supports transcoding. Here, the transcoding dynamic configuration module first determines the supported transcoding types defined in the transcoder function description file, and then determines whether the formats not supported by the current media player can be converted to the ones listed in the player configuration file. any kind of file. If it is determined that the transcoding module supports transcoding, the transcoding dynamic configuration module notifies the media player to start uploading the multimedia file, and at the same time redirects the data source of the media player from the local multimedia file to the streaming media service of the media server.
转码器功能描述文件文本示例由XML文本描述如下:An example of the text of the transcoder function description file is described by the XML text as follows:
<profile name=”transcode function”><profile name="transcode function">
<transcode from=”audio/x-ms-wma”to=”audio/mp3”/><transcode from="audio/x-ms-wma"to="audio/mp3"/>
<transcode from=”video/x-ms-wmv”to=”video/mp4”/><transcode from="video/x-ms-wmv"to="video/mp4"/>
<transcode from=”image/tif”to=”image/jpeg”/><transcode from=”image/tif”to=”image/jpeg”/>
<codec command=”ffmpeg”arguments=”-d%format-f%out-f%in”><codec command="ffmpeg" arguments="-d%format-f%out-f%in">
</profile></profile>
根据如上所示的转码器功能描述文件,定义了一系列的转码规则以及默认的转码参数。这里,转码规则指的是从一种编码格式转换到另一种编码格式,转码参数指的是将被传送给转码模块的参数,用于调整转码模块的运行状态。具体地讲,转码参数可包括分辨率、帧率、视频比特率、音频比特率等。根据本发明实施例,转码模块支持动态调整其运行参数。According to the transcoder function description file shown above, a series of transcoding rules and default transcoding parameters are defined. Here, the transcoding rule refers to conversion from one encoding format to another encoding format, and the transcoding parameter refers to a parameter to be transmitted to the transcoding module for adjusting the running state of the transcoding module. Specifically, the transcoding parameters may include resolution, frame rate, video bit rate, audio bit rate, and the like. According to the embodiment of the present invention, the transcoding module supports dynamic adjustment of its operating parameters.
在步骤S203中,媒体播放器中的上传模块将多媒体文件数据传输到媒体服务器。具体地讲,在转码动态配置模块确定转码模块支持转码时,上传控制模块向媒体播放器发送HTTP-Get请求,接收到该请求的媒体播放器通过媒体控制模块控制上传模块将多媒体文件数据传输到媒体服务器,媒体服务器的上传控制模块将接收到的多媒体文件数据传送到FIFO控制模块的FIFO输入文件中。In step S203, the upload module in the media player transmits the multimedia file data to the media server. Specifically, when the transcoding dynamic configuration module determines that the transcoding module supports transcoding, the upload control module sends an HTTP-Get request to the media player, and the media player that receives the request controls the upload module to upload the multimedia file through the media control module. The data is transmitted to the media server, and the upload control module of the media server transmits the received multimedia file data to the FIFO input file of the FIFO control module.
在步骤S204中,媒体服务器中的转码动态配置模块启动转码模块,从而转码模块读取上传的多媒体文件,并以预定转码策略对多媒体文件数据进行实时解码。这里,转码模块可以以单独进程的模式或者以单独硬件模块的模式,由解析的转码器功能描述文件和媒体播放器端配置文件初始化(即,配置转码模块的转码策略)。In step S204, the transcoding dynamic configuration module in the media server activates the transcoding module, so that the transcoding module reads the uploaded multimedia file and decodes the multimedia file data in real time with a predetermined transcoding strategy. Here, the transcoding module can be initialized from the parsed transcoder function description file and media player configuration file in the mode of a separate process or in the mode of a separate hardware module (ie, configure the transcoding strategy of the transcoding module).
在步骤S205中,在转码模块进行实时转码后,将转码后的数据发送到媒体服务器的FIFO输出文件中。In step S205, after the transcoding module performs real-time transcoding, the transcoded data is sent to the FIFO output file of the media server.
在步骤S206中,媒体服务器中的流媒体服务模块读取FIFO输出文件中的数据,然后以HTTP协议的形式将读取的数据发送到媒体播放器中,以进行播放。In step S206, the streaming media service module in the media server reads the data in the FIFO output file, and then sends the read data to the media player in the form of HTTP protocol for playing.
在步骤S207中,媒体播放器中的播放模块接收流媒体服务模块传输来的数据,调用本地硬件解码器对数据解码,并在显示屏幕上显示解码的数据。In step S207, the playing module in the media player receives the data transmitted by the streaming media service module, calls the local hardware decoder to decode the data, and displays the decoded data on the display screen.
在步骤S208中,媒体服务器中的网络和播放器性能探测模块以固定频率(例如,5秒/次)探测媒体播放器的播放过程中网络以及播放器本身的性能参数,并将探测到的参数传输到转码动态配置模块,从而转码动态配置模块可根据所述性能参数实时地调整转码模块的转码策略。即,转码动态配置模块可根据所述性能参数实时地调整转码参数,以实现动态配置转码模块。In step S208, the network and player performance detection module in the media server detects the performance parameters of the network and the player itself during the playback of the media player with a fixed frequency (for example, 5 seconds/time), and the detected parameters The transcoding dynamic configuration module is transmitted to the transcoding dynamic configuration module, so that the transcoding dynamic configuration module can adjust the transcoding strategy of the transcoding module in real time according to the performance parameters. That is, the transcoding dynamic configuration module can adjust the transcoding parameters in real time according to the performance parameters, so as to realize dynamic configuration of the transcoding module.
尽管在以上描述中,多媒体文件数据的传输基于HTTP协议,但是本发明不限于此,也可基于FTP协议来传输多媒体文件数据。Although in the above description, the transmission of the multimedia file data is based on the HTTP protocol, the present invention is not limited thereto, and the multimedia file data can also be transmitted based on the FTP protocol.
根据本发明的自适应转码方法和系统利用数字家庭网络提供的现有功能,具有成本低、灵活性大、可配置等优点。此外,根据本发明的自适应转码方法和系统为的数字家庭网络环境下的数字装置提供了媒体格式无关性的概念,从而只需要在整个数字家庭网络环境下提供一个强大的转码服务器,就可以解决多个数字装置解码能力弱的问题。The adaptive transcoding method and system according to the present invention utilize the existing functions provided by the digital home network, and have the advantages of low cost, high flexibility, configurability and the like. In addition, the adaptive transcoding method and system according to the present invention provide a concept of media format independence for digital devices in the digital home network environment, so that only one powerful transcoding server needs to be provided in the entire digital home network environment, Therefore, the problem of weak decoding ability of multiple digital devices can be solved.
虽然已经参照本发明的实施例显示和描述了本发明,但是本领域技术人员应该理解,在不脱离由权利要求及其等同物限定的本发明的精神和范围的情况下,可在形式和细节上进行各种改变。While the present invention has been shown and described with reference to embodiments thereof, it will be understood by those skilled in the art that changes in form and details may be made without departing from the spirit and scope of the invention as defined by the claims and their equivalents. Make various changes.
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200910205250 CN102045312B (en) | 2009-10-21 | 2009-10-21 | Self-adaptative transcoding method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200910205250 CN102045312B (en) | 2009-10-21 | 2009-10-21 | Self-adaptative transcoding method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102045312A CN102045312A (en) | 2011-05-04 |
CN102045312B true CN102045312B (en) | 2013-09-18 |
Family
ID=43911093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200910205250 Active CN102045312B (en) | 2009-10-21 | 2009-10-21 | Self-adaptative transcoding method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102045312B (en) |
Families Citing this family (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9515904B2 (en) * | 2011-06-21 | 2016-12-06 | The Nielsen Company (Us), Llc | Monitoring streaming media content |
CN102957902B (en) * | 2011-08-22 | 2017-03-15 | 腾讯科技(深圳)有限公司 | The adaptation method and device of audio frequency and video transcoding parameter |
CN102404624B (en) * | 2011-11-07 | 2014-02-19 | 深圳市佳创视讯技术股份有限公司 | All-format media player capable of supporting hardware decoding for digital STB (Set Top Box) |
CN103379363B (en) * | 2012-04-19 | 2018-09-11 | 腾讯科技(深圳)有限公司 | Method for processing video frequency and device, mobile terminal and system |
CN102982116A (en) * | 2012-11-09 | 2013-03-20 | 中国联合网络通信集团有限公司 | Multi-media transfer method and system based on cloud |
CN103873951B (en) * | 2012-12-17 | 2018-06-12 | 南京中兴软件有限责任公司 | Realize the method and system and relevant device of digital home videos stream adaptive identifying |
CN104104972A (en) * | 2013-04-10 | 2014-10-15 | 深圳市快播科技有限公司 | Multimedia playing method, apparatus and system |
CN103237215B (en) * | 2013-04-17 | 2016-12-28 | 华为技术有限公司 | Player method and playback equipment |
CN103561279B (en) * | 2013-10-10 | 2017-02-01 | 中兴通讯股份有限公司 | Method and system for playing multi-media file and cloud transcoding service device |
US9661106B2 (en) * | 2013-12-04 | 2017-05-23 | Facebook, Inc. | Uploading and transcoding media files |
CN103702182B (en) * | 2014-01-14 | 2017-06-23 | 北京奇艺世纪科技有限公司 | Video broadcasting method and device |
CN104254007B (en) * | 2014-09-03 | 2017-11-03 | 海信集团有限公司 | A kind of audio-frequency processing method and device |
CN104394486B (en) * | 2014-11-26 | 2018-03-13 | 中标软件有限公司 | A kind of video stream processing method and device based on cloud desktop |
CN104573475A (en) * | 2014-12-31 | 2015-04-29 | 乐视网信息技术(北京)股份有限公司 | Method and system for authenticating transcoding service program |
CN104602008B (en) | 2015-01-14 | 2018-03-20 | 腾讯科技(深圳)有限公司 | Method for video coding, device and system |
CN105610782A (en) * | 2015-11-02 | 2016-05-25 | 林晓东 | Mobile streaming media player and gateway thereof |
CN105898371A (en) * | 2015-12-07 | 2016-08-24 | 乐视云计算有限公司 | Real-time transcoding real-time control method and device |
CN105897684A (en) * | 2015-12-14 | 2016-08-24 | 乐视云计算有限公司 | Malicious attack detection method and device of transcoding system |
CN105657451B (en) * | 2016-01-14 | 2018-06-22 | 世纪龙信息网络有限责任公司 | Uploaded videos file is carried out at the same time the method and system of transcoding |
CN106817628B (en) * | 2017-01-26 | 2019-12-20 | 成都市亚丁胡杨科技股份有限公司 | Network live broadcast platform |
CN110278459A (en) * | 2018-03-16 | 2019-09-24 | 上海小麦互动企业发展有限公司 | Content control system and its control method |
CN109474827B (en) * | 2018-12-03 | 2022-11-29 | 四川巧夺天工信息安全智能设备有限公司 | Method for rapidly transcoding monitoring video |
CN110166797B (en) * | 2019-05-17 | 2022-02-01 | 北京达佳互联信息技术有限公司 | Video transcoding method and device, electronic equipment and storage medium |
CN112822519A (en) * | 2020-12-30 | 2021-05-18 | 杭州雾联科技有限公司 | Video stream streaming method, device and equipment for sharing video pictures by multiple users |
CN112788235B (en) * | 2020-12-31 | 2022-01-28 | 深圳追一科技有限公司 | Image processing method, image processing device, terminal equipment and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101404652A (en) * | 2008-10-10 | 2009-04-08 | 华南理工大学 | Media format conversion system and method used for digital house |
CN101437047A (en) * | 2008-12-09 | 2009-05-20 | 中兴通讯股份有限公司 | Method, system and media server for playback/ sound-recording for user terminal |
EP2073486A1 (en) * | 2007-12-17 | 2009-06-24 | Alcatel Lucent | Method for providing multimedia service to a mobile device in case of foreseen network unavailability |
-
2009
- 2009-10-21 CN CN 200910205250 patent/CN102045312B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2073486A1 (en) * | 2007-12-17 | 2009-06-24 | Alcatel Lucent | Method for providing multimedia service to a mobile device in case of foreseen network unavailability |
CN101404652A (en) * | 2008-10-10 | 2009-04-08 | 华南理工大学 | Media format conversion system and method used for digital house |
CN101437047A (en) * | 2008-12-09 | 2009-05-20 | 中兴通讯股份有限公司 | Method, system and media server for playback/ sound-recording for user terminal |
Also Published As
Publication number | Publication date |
---|---|
CN102045312A (en) | 2011-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102045312B (en) | Self-adaptative transcoding method and system | |
AU2017202995B2 (en) | System and method for adapting video communications | |
EP2740265B1 (en) | System and method for adapting video communications | |
CN100518303C (en) | Apparatus and method for accommodating rapid changes in digital streaming sources and formats | |
CN105814900B (en) | System and method for managing adjacent channels in an adaptive streaming environment | |
US9112938B2 (en) | Adaptive playback with look-ahead | |
US6278478B1 (en) | End-to-end network encoding architecture | |
CN103583040B (en) | Real-time video detector | |
US8218439B2 (en) | Method and apparatus for adaptive buffering | |
CN105940680B (en) | Streaming policy management system and method | |
CN106165432B (en) | System and method for implementing fast channel changes in an adaptive streaming environment | |
US20130346627A1 (en) | Dynamic bit rate scaling | |
WO2009128528A1 (en) | Server device, content distribution method, and program | |
US20080267213A1 (en) | Client-Side Bandwidth Allocation for Continuous and Discrete Media | |
JPWO2009128515A1 (en) | Gateway apparatus and method | |
KR101764317B1 (en) | Streaming server, streaming system and streaming method | |
CN114025191B (en) | Webrtc low-delay live broadcast method and system based on Nginx-rtmp | |
CN105577645A (en) | Proxy-based HLS client device and its implementation method | |
TW200947977A (en) | Efficient interworking between circuit-switched and packet-switched multimedia services | |
KR20140086801A (en) | Realtime content transcoding method, apparatus and system, and realtime content reception method and apparatus | |
HK1197516A (en) | System and method for adapting video communications | |
HK1197516B (en) | System and method for adapting video communications |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder |
Address after: 5-12 / F, building 6, 57 Andemen street, Yuhuatai District, Nanjing City, Jiangsu Province Patentee after: Samsung Electronics (China) R&D Center Patentee after: SAMSUNG ELECTRONICS Co.,Ltd. Address before: No. 268 Nanjing Huijie square Zhongshan Road city in Jiangsu province 210009 8 floor Patentee before: Samsung Electronics (China) R&D Center Patentee before: SAMSUNG ELECTRONICS Co.,Ltd. |
|
CP02 | Change in the address of a patent holder |