CN102055964A - Transcoding method for multimedia file, and transcoder - Google Patents
Transcoding method for multimedia file, and transcoder Download PDFInfo
- Publication number
- CN102055964A CN102055964A CN200910110089.6A CN200910110089A CN102055964A CN 102055964 A CN102055964 A CN 102055964A CN 200910110089 A CN200910110089 A CN 200910110089A CN 102055964 A CN102055964 A CN 102055964A
- Authority
- CN
- China
- Prior art keywords
- transcoding
- multimedia file
- file
- point
- source multimedia
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000012545 processing Methods 0.000 claims abstract description 32
- 238000000926 separation method Methods 0.000 claims description 10
- 238000006243 chemical reaction Methods 0.000 claims 2
- 230000008676 import Effects 0.000 claims 1
- 230000000694 effects Effects 0.000 description 14
- 230000008569 process Effects 0.000 description 9
- 230000005540 biological transmission Effects 0.000 description 4
- 238000005070 sampling Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000006837 decompression Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/162—User input
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/70—Media network packetisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/40—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明适用于多媒体处理领域,提供了一种多媒体文件转码方法和转码器,所述方法包括下述步骤:接收用户输入的源多媒体文件和转码参数;根据所述源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件。本发明实施例通过根据源多媒体文件和转码参数,从点对点网络中查找并下载根据源多媒体文件和转码参数转码得到的目标多媒体文件,从而在多个用户均要根据相同的转码参数对相同的源多媒体文件进行转码时,不需要每个用户均进行转码操作,大大节约了多媒体文件的转码资源。
The present invention is applicable to the field of multimedia processing, and provides a multimedia file transcoding method and a transcoder. The method includes the following steps: receiving a source multimedia file and a transcoding parameter input by a user; Code parameter, search and download the corresponding target multimedia file from the peer-to-peer network. The embodiment of the present invention searches and downloads the target multimedia file transcoded according to the source multimedia file and the transcoding parameter from the peer-to-peer network according to the source multimedia file and the transcoding parameter, so that multiple users need to transcode according to the same transcoding parameter When transcoding the same source multimedia file, each user does not need to perform a transcoding operation, which greatly saves the transcoding resources of the multimedia file.
Description
技术领域technical field
本发明属于多媒体处理领域,尤其涉及一种多媒体文件转码方法和转码器。The invention belongs to the field of multimedia processing, and in particular relates to a multimedia file transcoding method and a transcoder.
背景技术Background technique
在信息高速发展的今天,多媒体技术已经成为人们工作、学习中必不可少的重要组成部分,随着网络技术的不断进步,其得到了进一步的发展,成为信息产业中发展最为迅速的部分。为了促进多媒体业务的进一步发展,满足人们在日常工作、生活中对多媒体服务的不同需求,一些标准化组织针对社会上不同业务需求提出了多种音视频编码标准。如针对视频电话和视频会议业务提出的H.263标准;针对DVB,HDTV和DVD提出的MPEG2标准;针对网络中流媒体服务开发的MPEG4标准;以及能够提供高视频压缩性能,网络友好的H.264标准等。Today, with the rapid development of information, multimedia technology has become an indispensable and important part of people's work and study. With the continuous advancement of network technology, it has been further developed and has become the fastest-growing part of the information industry. In order to promote the further development of multimedia services and meet people's different needs for multimedia services in daily work and life, some standardization organizations have proposed a variety of audio and video coding standards for different business needs in society. Such as the H.263 standard proposed for video telephony and video conferencing services; the MPEG2 standard proposed for DVB, HDTV and DVD; the MPEG4 standard developed for streaming media services in the network; and the network-friendly H.264 that can provide high video compression performance standard etc.
由于多种音视频编码标准的同时存在,以及在多媒体应用中对压缩效率、解压速度、码流使用的目标设备等要求的不同,存在着多种多样的媒体文件,它们彼此之间所使用的文件格式、视频格式、压缩格式各不相同。为了有效地利用现有的多媒体资源,现有技术提供了一种转码技术,用于在多种音视频编码标准之间进行转换。转码技术日渐受到人们的广泛关注,不断得到进一步的研究与开发。Due to the simultaneous existence of multiple audio and video coding standards, as well as the different requirements for compression efficiency, decompression speed, and target devices used in code streams in multimedia applications, there are a variety of media files. File formats, video formats, compression formats vary. In order to effectively utilize existing multimedia resources, the prior art provides a transcoding technology for converting between multiple audio and video coding standards. The transcoding technology has been widely concerned by people day by day, and has been further researched and developed continuously.
这种在多种音视频编码标准之间进行转换的软件或者硬件工具称为转码器。但是由于目标设备的多种多样,如目前比较常使用的手持设备就包括各种型号的手机、各种型号的MP4\MP3\PSP等手持娱乐设备等等,对于普通用户来说,很难在极为复杂专业的各项转码参数中选择出一组最适应自己手持设备的转码参数,甚至有时都难以选择出可以在自己手持设备上播放的参数,这样就无形中提高了用户使用转码器的门槛。且转码器在根据转码参数对源多媒体文件进行转码,得到目标多媒体文件的过程中,需要占用较多的CPU资源。当多个用户需要根据相同的转码参数对相同的源多媒体文件进行转码时,将造成严重的资源浪费。This software or hardware tool that converts between multiple audio and video coding standards is called a transcoder. However, due to the variety of target devices, such as currently commonly used handheld devices include various types of mobile phones, various types of MP4\MP3\PSP and other handheld entertainment devices, etc., for ordinary users, it is difficult to Choose a set of transcoding parameters that are most suitable for your handheld device from among the extremely complex and professional transcoding parameters, and sometimes it is even difficult to choose the parameters that can be played on your handheld device, which invisibly improves the user's use of transcoding device threshold. In addition, the transcoder needs to occupy more CPU resources during the process of transcoding the source multimedia file according to the transcoding parameters to obtain the target multimedia file. When multiple users need to transcode the same source multimedia file according to the same transcoding parameters, serious waste of resources will be caused.
发明内容Contents of the invention
本发明实施例的目的在于提供一种多媒体文件转码方法,旨在解决现有的多媒体文件转码方法在进行文件转码时,存在的资源浪费严重的问题。The purpose of the embodiment of the present invention is to provide a multimedia file transcoding method, aiming at solving the problem of serious waste of resources when performing file transcoding in the existing multimedia file transcoding method.
本发明实施例是这样实现的,一种多媒体文件转码方法,所述方法包括下述步骤:The embodiment of the present invention is realized like this, a kind of multimedia file transcoding method, described method comprises the following steps:
接收用户输入的源多媒体文件和转码参数;Receive the source multimedia file and transcoding parameters input by the user;
根据所述源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件。According to the source multimedia file and the transcoding parameters, the corresponding target multimedia file is searched and downloaded from the peer-to-peer network.
优选的,所述根据所述源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件的步骤具体为:Preferably, the step of searching and downloading the corresponding target multimedia file from the peer-to-peer network according to the source multimedia file and transcoding parameters is specifically:
向点对点网络中的查询服务器发送目标文件查询请求,所述目标文件查询请求携带源多媒体文件信息和转码参数信息,以使查询服务器返回存储有源多媒体文件和转码参数的客户端列表;Send a target file query request to the query server in the peer-to-peer network, and the target file query request carries source multimedia file information and transcoding parameter information, so that the query server returns a list of clients storing active multimedia files and transcoding parameters;
从查询服务器返回的客户端列表中的客户端中下载采用所述转码参数对所述源多媒体文件进行转码得到的目标多媒体文件。The target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameters is downloaded from the clients in the client list returned by the query server.
优选的,所述根据所述源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件的步骤具体为:Preferably, the step of searching and downloading the corresponding target multimedia file from the peer-to-peer network according to the source multimedia file and transcoding parameters is specifically:
向预先存储的客户端列表中的客户端发送目标文件查询请求,所述目标文件查询请求携带源多媒体文件信息和转码参数信息,以使接收到所述目标文件查询请求的客户端返回存储有所述源多媒体文件和转码参数的客户端列表;Send a target file query request to the client in the pre-stored client list, the target file query request carries source multimedia file information and transcoding parameter information, so that the client that receives the target file query request returns the stored A client list of the source multimedia files and transcoding parameters;
从返回的客户端列表中的客户端中下载采用所述转码参数对所述源多媒体文件进行转码得到的目标多媒体文件。The target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameters is downloaded from the clients in the returned client list.
优选的,所述方法还包括下述步骤:Preferably, the method further comprises the steps of:
当根据所述源多媒体文件和转码参数,从点对点网络中未查找到对应的目标多媒体文件时,直接根据所述转码参数对所述源多媒体文件进行转码处理,生成目标多媒体文件。When no corresponding target multimedia file is found from the peer-to-peer network according to the source multimedia file and transcoding parameters, directly perform transcoding processing on the source multimedia file according to the transcoding parameters to generate a target multimedia file.
优选的,所述方法还包括下述步骤:Preferably, the method further comprises the steps of:
当在预设的时间内未从点对点网络中查找到对应的目标多媒体文件时,直接根据所述转码参数对所述源多媒体文件进行转码处理,生成目标多媒体文件。When the corresponding target multimedia file is not found from the peer-to-peer network within the preset time, the source multimedia file is directly transcoded according to the transcoding parameters to generate the target multimedia file.
优选的,在所述根据所述源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件的步骤之前,所述方法还包括:Preferably, before the step of searching and downloading the corresponding target multimedia file from the peer-to-peer network according to the source multimedia file and transcoding parameters, the method further includes:
根据所述源多媒体文件和转码参数估算转码完成时间;Estimating the completion time of transcoding according to the source multimedia file and transcoding parameters;
当估算得到的转码完成时间超过预设的时间时,执行所述根据所述源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件的步骤;When the estimated transcoding completion time exceeds the preset time, perform the step of searching and downloading the corresponding target multimedia file from the peer-to-peer network according to the source multimedia file and the transcoding parameters;
当估算得到的转码完成时间未超过预设的时间时,直接根据所述转码参数对所述源多媒体文件进行转码处理,生成目标多媒体文件。When the estimated transcoding completion time does not exceed the preset time, the source multimedia file is directly transcoded according to the transcoding parameter to generate the target multimedia file.
优选的,在所述直接根据所述转码参数对所述源多媒体文件进行转码处理,生成目标多媒体文件的步骤之后,所述方法还包括下述步骤:Preferably, after the step of directly transcoding the source multimedia file according to the transcoding parameters to generate a target multimedia file, the method further includes the following steps:
将生成的目标多媒体文件共享至点对点网络,以提供给点对点网络中的其他用户下载。The generated target multimedia file is shared to the peer-to-peer network for downloading by other users in the peer-to-peer network.
本发明实施例的另一目的在于提供一种转码器,所述转码器包括:Another object of the embodiments of the present invention is to provide a transcoder, the transcoder comprising:
信息接收单元,用于接收用户输入的源多媒体文件和转码参数;An information receiving unit, configured to receive source multimedia files and transcoding parameters input by the user;
点对点网络管理单元,用于根据所述信息接收单元接收的源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件。The point-to-point network management unit is configured to search and download the corresponding target multimedia file from the point-to-point network according to the source multimedia file and transcoding parameters received by the information receiving unit.
优选的,所述点对点网络管理单元包括:Preferably, the point-to-point network management unit includes:
第一查询请求发送模块,用于向点对点网络中的查询服务器发送目标文件查询请求,所述目标文件查询请求携带源多媒体文件信息和转码参数信息,以使查询服务器返回存储有源多媒体文件和转码参数的客户端列表;The first query request sending module is used to send a target file query request to the query server in the peer-to-peer network, and the target file query request carries source multimedia file information and transcoding parameter information, so that the query server returns and stores the source multimedia file and client list of transcoding parameters;
第一文件下载模块,用于从查询服务器返回的客户端列表中的客户端中下载采用所述转码参数对所述源多媒体文件进行转码得到的目标多媒体文件。The first file downloading module is configured to download the target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameters from the clients in the client list returned by the query server.
优选的,所述点对点网络管理单元包括:Preferably, the point-to-point network management unit includes:
第二查询请求发送模块,用于向预先存储的客户端列表中的客户端发送目标文件查询请求,所述目标文件查询请求携带源多媒体文件信息和转码参数信息,以使接收到所述目标文件查询请求的客户端返回存储有所述源多媒体文件和转码参数的客户端列表;The second query request sending module is used to send a target file query request to the client in the pre-stored client list, and the target file query request carries source multimedia file information and transcoding parameter information, so that the target file can be received The client of the file query request returns a list of clients storing the source multimedia files and transcoding parameters;
第二文件下载模块,用于从返回的客户端列表中的客户端中下载采用所述转码参数对所述源多媒体文件进行转码得到的目标多媒体文件。The second file download module is configured to download the target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameters from the clients in the returned client list.
优选的,所述转码器还包括:Preferably, the transcoder also includes:
转码时间估算单元,用于根据源多媒体文件和转码参数估算转码完成时间。The transcoding time estimating unit is used for estimating the transcoding completion time according to the source multimedia file and transcoding parameters.
转码处理单元,用于在所述转码时间估算单元估算得到的转码完成时间超过预设时间时,直接根据所述信息接收单元接收的转码参数对源多媒体文件进行转码处理,生成目标多媒体文件。A transcoding processing unit, configured to perform transcoding processing on the source multimedia file directly according to the transcoding parameters received by the information receiving unit when the transcoding completion time estimated by the transcoding time estimation unit exceeds a preset time, to generate Target multimedia file.
优选的,所述转码处理单元在所述点对点网络管理单元从点对点网络中未查找到对应的目标多媒体文件时,或者在所述点对点网络管理单元在预设的时间内未从点对点网络中查找到对应的目标多媒体文件时,直接根据所述信息接收单元接收的转码参数对源多媒体文件进行转码处理,生成目标多媒体文件。Preferably, when the transcoding processing unit does not find the corresponding target multimedia file from the peer-to-peer network, or when the peer-to-peer network management unit fails to find the corresponding target multimedia file within the preset time When the corresponding target multimedia file is received, the source multimedia file is directly transcoded according to the transcoding parameters received by the information receiving unit to generate the target multimedia file.
优选的,所述转码处理单元包括:Preferably, the transcoding processing unit includes:
音视频分离模块,用于对所述信息接收单元接收的源多媒体文件进行解析,分离出音频流和视频流;The audio and video separation module is used to analyze the source multimedia file received by the information receiving unit, and separate the audio stream and the video stream;
视频转码模块,用于根据所述信息接收单元接收的转码参数对所述音视频分离模块分离出的视频流进行转码处理;A video transcoding module, configured to transcode the video stream separated by the audio-video separation module according to the transcoding parameters received by the information receiving unit;
音频转码模块,用于根据所述信息接收单元接收的转码参数对所述音视频分离模块分离出的音频流进行转码处理;An audio transcoding module, configured to transcode the audio stream separated by the audio-video separation module according to the transcoding parameters received by the information receiving unit;
目标文件生成模块,用于将所述视频转码模块转码后的视频流和音频转码模块转码后的音频流进行合成,生成目标多媒体文件。The target file generating module is used to synthesize the video stream transcoded by the video transcoding module and the audio stream transcoded by the audio transcoding module to generate a target multimedia file.
优选的,所述转码器还包括:Preferably, the transcoder also includes:
文件共享单元,用于将所述转码处理单元生成的目标多媒体文件共享至点对点网络,以提供给点对点网络中的其他用户下载。A file sharing unit, configured to share the target multimedia file generated by the transcoding processing unit to the peer-to-peer network for downloading by other users in the peer-to-peer network.
在本发明实施例中,在接收到用户输入的源多媒体文件和转码参数时,根据源多媒体文件和转码参数,从点对点网络中查找并下载根据源多媒体文件和转码参数转码得到的目标多媒体文件,从而在多个用户均要根据相同的转码参数对相同的源多媒体文件进行转码时,不需要每个用户均进行转码操作,大大节约了多媒体文件的转码资源。In the embodiment of the present invention, when the source multimedia file and transcoding parameters input by the user are received, according to the source multimedia file and the transcoding parameters, the source multimedia file and transcoding parameters obtained by transcoding are searched and downloaded from the peer-to-peer network. Target multimedia files, so that when multiple users need to transcode the same source multimedia file according to the same transcoding parameters, each user does not need to perform transcoding operations, which greatly saves transcoding resources for multimedia files.
附图说明Description of drawings
图1是本发明实施例提供的多媒体文件转码方法的实现流程图;Fig. 1 is the implementation flowchart of the multimedia file transcoding method provided by the embodiment of the present invention;
图2是本发明实施例提供的转码器的结构框图。Fig. 2 is a structural block diagram of a transcoder provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
在本发明实施例中,在接收到用户输入的源多媒体文件和转码参数时,根据源多媒体文件和转码参数,从点对点网络中查找并下载根据源多媒体文件和转码参数转码得到的目标多媒体文件,从而在多个用户均要根据相同的转码参数对相同的源多媒体文件进行转码时,不需要每个用户均进行转码操作,节约了资源。In the embodiment of the present invention, when the source multimedia file and transcoding parameters input by the user are received, according to the source multimedia file and the transcoding parameters, the source multimedia file and transcoding parameters obtained by transcoding are searched and downloaded from the peer-to-peer network. target multimedia files, so that when multiple users need to transcode the same source multimedia file according to the same transcoding parameters, each user does not need to perform transcoding operations, which saves resources.
图1示出了本发明实施例提供的多媒体文件转码方法的实现流程,详述如下:Fig. 1 shows the implementation process of the multimedia file transcoding method provided by the embodiment of the present invention, which is described in detail as follows:
在步骤S101中,接收用户输入的源多媒体文件和转码参数。In step S101, a source multimedia file and a transcoding parameter input by a user are received.
其中转码参数包括但不限于文件容器格式、视频格式、视频大小、视频帧率、视频码率、音频格式、音频码率、音频采样率、音频声道数等。The transcoding parameters include but are not limited to file container format, video format, video size, video frame rate, video bit rate, audio format, audio bit rate, audio sampling rate, number of audio channels, etc.
在步骤S102中,根据源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件。当点对点网络中存在查询服务器时,步骤S102具体为:In step S102, according to the source multimedia file and the transcoding parameters, the corresponding target multimedia file is searched and downloaded from the peer-to-peer network. When there is a query server in the peer-to-peer network, step S102 is specifically:
A1、向点对点网络中的查询服务器发送目标文件查询请求,该目标文件查询请求携带源多媒体文件信息和转码参数信息,以使查询服务器返回存储有该源多媒体文件和转码参数的客户端列表。A1, send a target file query request to the query server in the point-to-point network, the target file query request carries source multimedia file information and transcoding parameter information, so that the query server returns the client list that stores the source multimedia file and transcoding parameters .
在本发明实施例中,目标文件查询请求中携带的源多媒体文件信息可以是源多媒体文件的哈希(Hash)值。目标文件查询请求中携带的转码参数信息可以是播放效果,此时,预先建立播放效果与转码参数之间的对应关系。举例说明如下:In this embodiment of the present invention, the source multimedia file information carried in the target file query request may be a hash (Hash) value of the source multimedia file. The transcoding parameter information carried in the target file query request may be a playback effect. In this case, the corresponding relationship between the playback effect and the transcoding parameter is established in advance. Examples are as follows:
当播放效果为“播放效果最佳”时,其对应的转码参数如下:视频格式为、视频大小为、视频帧率为、视频码率为、音频格式为、音频码率为、音频采样率为、音频声道数为;当播放效果为“播放效果最差”时,其对应的转码参数如下:视频格式为、视频大小为、视频帧率为、视频码率为、音频格式为、音频码率为、音频采样率为、音频声道数为。When the playback effect is "best playback effect", the corresponding transcoding parameters are as follows: video format is, video size is, video frame rate, video bit rate, audio format is, audio bit rate, audio sampling rate is, the number of audio channels is; when the playback effect is "worst playback effect", the corresponding transcoding parameters are as follows: video format is, video size is, video frame rate, video bit rate, audio format is, The audio bit rate, audio sampling rate, and audio channel number are.
A2、从查询服务器返回的客户端列表中的客户端中下载采用该转码参数对该源多媒体文件进行转码得到的目标多媒体文件。A2. Download the target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameter from the clients in the client list returned by the query server.
在本发明另一实施例中,该在步骤B之后,该方法还包括下述步骤:In another embodiment of the present invention, after step B, the method also includes the following steps:
A3、当下载成功后,查询服务器将下载了目标多媒体文件的客户端增加至存储有该源多媒体文件的Hash值以及转码参数的客户端列表中。A3. After the download is successful, the query server adds the client that has downloaded the target multimedia file to the client list that stores the Hash value and transcoding parameters of the source multimedia file.
举例说明如下:Examples are as follows:
假设A用户需要转码的源多媒体文件名称为“黑客.avi”,选择的转码参数为“目标设备为PSP,播放效果最佳”,在查询时,该转码参数会映射到一组整数上,如“目标设备为PSP,播放效果最佳”可以对应整数1,而“目标设备为PSP,播放效果最差”可以对应整数2等。Assume that the name of the source multimedia file that user A needs to transcode is "hacker.avi", and the selected transcoding parameter is "the target device is PSP, with the best playback effect". When querying, the transcoding parameter will be mapped to a set of integers In the above, for example, "the target device is PSP, the playback effect is the best" may correspond to the integer 1, while "the target device is the PSP, the playback effect is the worst" may correspond to the integer 2, etc.
A用户的客户端连接到查询服务器后,向查询服务器发送目标文件查询请求,该目标文件查询请求中携带源多媒体文件的Hash值以及转码参数,查询服务器返回其他的存储有该源多媒体文件的Hash值以及转码参数的客户端的列表给A用户的客户端,如果查询服务器寻找不到其他的有此源多媒体文件的Hash值以及转码参数的客户端,则返回下载失败的信息。A用户的客户端在接收到查询服务器返回的客户端列表中的客户端中下载采用该转码参数对该源多媒体文件进行转码得到的目标多媒体文件。下载完成后,查询服务器将A用户的客户端加入有此源多媒体文件的Hash值以及转码参数的客户端列表。After the client of user A connects to the query server, it sends a target file query request to the query server. The target file query request carries the Hash value and transcoding parameters of the source multimedia file, and the query server returns other files that store the source multimedia file. The client list of the Hash value and transcoding parameters is given to the client of user A. If the query server cannot find other clients with the Hash value and transcoding parameters of the source multimedia file, the download failure information will be returned. The client of user A downloads the target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameter from the clients in the client list returned by the query server. After the download is completed, the query server adds the client of user A to the list of clients with the Hash value of the source multimedia file and the transcoding parameters.
当点对点网络中不存在查询服务器时,步骤S102具体为:When there is no query server in the peer-to-peer network, step S102 is specifically:
B1、向预先存储的客户端列表中的客户端发送目标文件查询请求,该目标文件查询请求携带源多媒体文件信息和转码参数信息,以使接收到该目标文件查询请求的客户端返回存储有该源多媒体文件和转码参数的客户端列表。B1. Send a target file query request to the client in the pre-stored client list, the target file query request carries source multimedia file information and transcoding parameter information, so that the client that receives the target file query request returns the stored information. A list of clients for this source multimedia file and transcoding parameters.
在本发明实施例中,当接收到目标文件查询请求的客户端中存储了有该源多媒体文件和转码参数的客户端列表时,则直接返回该客户端列表;当接收到目标文件查询请求的客户端中未存储有该源多媒体文件和转码参数的客户端列表时,向该接收到目标文件查询请求的客户端再向其预先存储的客户端列表中的客户端发送目标文件查询请求,该目标文件查询请求携带源多媒体文件信息和转码参数信息,直到查找到存储有该源多媒体文件和转码参数的客户端,如寻最终都未查找到存储有该源多媒体文件和转码参数的客户端时,返回下载失败的信息。In the embodiment of the present invention, when the client list that has this source multimedia file and transcoding parameter is stored in the client that receives target file query request, then directly return this client list; When receiving target file query request When the client list of the source multimedia file and transcoding parameters is not stored in the client, send the target file query request to the client that has received the target file query request to the client in its pre-stored client list , the target file query request carries source multimedia file information and transcoding parameter information, until the client that stores the source multimedia file and transcoding parameters is found, if no client is found that stores the source multimedia file and transcoding parameters When the client of the parameter is set, the download failure information will be returned.
B2、从返回的客户端列表中的客户端中下载采用该转码参数对该源多媒体文件进行转码得到的目标多媒体文件。B2. Download the target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameter from the clients in the returned client list.
在本发明另一实施例中,该在步骤B2之后,该方法还包括下述步骤:In another embodiment of the present invention, after step B2, the method further includes the following steps:
B3、当下载成功后,通知预先存储的客户端列表中的客户端将下载了目标多媒体文件的客户端增加至存储有该源多媒体文件的Hash值以及转码参数的客户端列表中。B3. After the download is successful, notify the clients in the pre-stored client list to add the client that has downloaded the target multimedia file to the client list that stores the Hash value and transcoding parameters of the source multimedia file.
举例说明如下:Examples are as follows:
假设A用户需要转码的源多媒体文件名称为“黑客.avi”,选择的转码参数为“目标设备为PSP,播放效果最佳”,在查询时,该转码参数会映射到一组整数上,如“目标设备为PSP,播放效果最佳”可以对应整数1,而“目标设备为PSP,播放效果最差”可以对应整数2等。Assume that the name of the source multimedia file that user A needs to transcode is "hacker.avi", and the selected transcoding parameter is "the target device is PSP, with the best playback effect". When querying, the transcoding parameter will be mapped to a set of integers In the above, for example, "the target device is PSP, the playback effect is the best" may correspond to the integer 1, while "the target device is the PSP, the playback effect is the worst" may correspond to the integer 2, etc.
A用户的客户端会在本地保存一些其它客户端的IP列表,A用户的客户端源多媒体文件向在此IP列表内的其他客户端发送目标文件查询请求,该目标文件查询请求中携带源多媒体文件的Hash值以及转码参数,如果临近的客户端存储了有此源多媒体文件的Hash值以及转码参数的客户端的列表,会直接返回给A用户的客户端,如果没有,临近的客户端再向其存储的客户端列表中的客户端发送目标文件查询请求,该目标文件查询请求中携带源多媒体文件的Hash值以及转码参数,,直到最终有结果返回给A用户的客户端,假如寻找不到其他的有此源多媒体文件的Hash值以及转码参数的客户端,则向A用户的客户端返回下载失败的信息。下载完成后,A用户的客户端通知其所有临近的客户端将A用户的客户端加入有此源多媒体文件的Hash值以及转码参数的客户端列表。User A's client will store some IP lists of other clients locally, and the source multimedia file of user A's client sends a target file query request to other clients in this IP list, and the target file query request carries the source multimedia file Hash value and transcoding parameters, if the adjacent client has stored the list of clients with the hash value and transcoding parameters of the source multimedia file, it will directly return to the client of user A, if not, the adjacent client will then Send a target file query request to the client in its stored client list, the target file query request carries the Hash value and transcoding parameters of the source multimedia file, until the final result is returned to the client of user A. If there are no other clients that have the Hash value and the transcoding parameters of the source multimedia file, a message that the download fails will be returned to the client of user A. After the download is completed, the client of user A notifies all its adjacent clients to add the client of user A to the list of clients with the Hash value of the source multimedia file and the transcoding parameters.
当然在本发明实施例中,还可以根据转码器的具体实现设置其他用来查找目标多媒体文件的算法,而不以上述举例说明为限。在本发明实施例中,预先建立与其他用户之间的点对点传输网络,当接收到用户输入的源多媒体文件和转码参数时,从点对点网络中查找对应的目标多媒体文件,其中对应的目标多媒体文件是指根据转码参数对源多媒体文件进行转码操作得到的多媒体文件。Of course, in the embodiment of the present invention, other algorithms for finding the target multimedia file can also be set according to the specific implementation of the transcoder, and the above examples are not limited. In the embodiment of the present invention, a point-to-point transmission network with other users is pre-established, and when the source multimedia file and transcoding parameters input by the user are received, the corresponding target multimedia file is searched from the point-to-point network, wherein the corresponding target multimedia file The file refers to a multimedia file obtained by performing a transcoding operation on the source multimedia file according to the transcoding parameters.
在本发明另一实施例中,当从点对点网络中未查找到对应的目标多媒体文件时,直接根据转码参数对源多媒体文件进行转码处理,生成目标多媒体文件。其具体过程属于现有技术,在此不再赘述。In another embodiment of the present invention, when the corresponding target multimedia file is not found from the peer-to-peer network, the source multimedia file is directly transcoded according to the transcoding parameters to generate the target multimedia file. The specific process belongs to the prior art and will not be repeated here.
当从点对点网络中查找到对应的目标多媒体文件时,可以直接从点对点网络中下载查找的对应的目标多媒体文件,也可以输出人机交互界面,以使用户通过该人机交互界面选择多媒体文件转码方式,并根据选择的多媒体文件转码方式从点对点网络下载对应的目标多媒体文件,或者直接根据转码参数对源多媒体文件进行转码处理,生成目标多媒体文件。When the corresponding target multimedia file is found from the peer-to-peer network, the corresponding target multimedia file can be directly downloaded from the peer-to-peer network, and a human-computer interaction interface can also be output, so that the user can select the multimedia file to convert through the human-computer interaction interface. transcoding method, and download the corresponding target multimedia file from the peer-to-peer network according to the selected multimedia file transcoding method, or directly transcode the source multimedia file according to the transcoding parameters to generate the target multimedia file.
当点对点网络的传输速度较慢时,从点对点网络中查找对应的目标多媒体文件需要花费较长时间,这将给用户带来较差的用户体验,为了避免这种问题,在本发明另一实施例中,在方法还包括下述步骤:When the transmission speed of the peer-to-peer network is slow, it takes a long time to find the corresponding target multimedia file from the peer-to-peer network, which will bring poor user experience to the user. In order to avoid this problem, in another embodiment of the present invention In the example, the method also includes the following steps:
当在预设的时间内未从点对点网络中查找到对应的目标多媒体文件时,直接根据转码参数对源多媒体文件进行转码处理,生成目标多媒体文件。When the corresponding target multimedia file is not found from the peer-to-peer network within the preset time, the source multimedia file is directly transcoded according to the transcoding parameters to generate the target multimedia file.
虽然直接根据转码参数对源多媒体文件进行转码处理需要占用较多的CPU资源,但当网络速度较慢时,如果直接从点对点网络中查找并下载对应的目标多媒体文件也可能需要花费较长的时间,为了在转码速度和转码消耗的资源之间找到较好的平衡点,在本发明另一实施例中,在步骤S102之前,该方法还包括下述步骤:Although it takes more CPU resources to transcode the source multimedia files directly according to the transcoding parameters, it may take a long time to find and download the corresponding target multimedia files directly from the peer-to-peer network when the network speed is slow. time, in order to find a better balance between the transcoding speed and the resources consumed by transcoding, in another embodiment of the present invention, before step S102, the method further includes the following steps:
根据源多媒体文件和转码参数估算转码完成时间,当估算得到的转码完成时间超过预设的时间时,执行步骤S102,否则,直接根据转码参数对源多媒体文件进行转码处理,得到目标多媒体文件。其中根据源多媒体文件和转码参数估算转码完成时间的步骤具体如下:Estimate the transcoding completion time according to the source multimedia file and the transcoding parameters, and when the estimated transcoding completion time exceeds the preset time, execute step S102; otherwise, directly perform transcoding processing on the source multimedia file according to the transcoding parameters, and obtain Target multimedia file. The steps for estimating the completion time of transcoding according to the source multimedia file and transcoding parameters are as follows:
转码完成时间=基准时间×源多媒体文件分辨率的对应系数×源多媒体文件的时长×目标文件格式的对应系数×目标文件分辨率的对应系数×目标文件编码格式的对应系数×用户PC计算能力的对应系数。对应系数为在若干台测试机器测试后的平均值,例如目标文件编码格式为H.263的对应系数定义为1的话,那么当目标文件编码格式为H.264时,由于H.264的复杂度高于H.263,可以将其定义为2.3。Transcoding completion time = reference time × corresponding coefficient of source multimedia file resolution × source multimedia file duration × corresponding coefficient of target file format × corresponding coefficient of target file resolution × corresponding coefficient of target file encoding format × user PC computing power The corresponding coefficient. The corresponding coefficient is the average value after testing on several test machines. For example, if the corresponding coefficient of the target file encoding format is H.263 is defined as 1, then when the target file encoding format is H.264, due to the complexity of H.264 Higher than H.263, it can be defined as 2.3.
当然在本发明另一实施例中,还可以根据转码的具体需求设置其他的转码估算算法来估算转码完成时间,而不以上述举例说明为限。Of course, in another embodiment of the present invention, other transcoding estimation algorithms can also be set according to specific transcoding requirements to estimate the transcoding completion time, and the above examples are not limited.
为了实现目标多媒体文件的共享,在本发明另一实施例中,在直接根据转码参数对源多媒体文件进行转码处理,得到目标多媒体文件的步骤之后,该方法还包括下述步骤:In order to realize the sharing of the target multimedia file, in another embodiment of the present invention, after the step of obtaining the target multimedia file by directly transcoding the source multimedia file according to the transcoding parameters, the method also includes the following steps:
将转码得到的目标多媒体文件共享至点对点网络,以便点对点网络中的其他用户下载。Share the target multimedia file obtained by transcoding to the peer-to-peer network so that other users in the peer-to-peer network can download it.
图2示出了本发明实施例提供的转码器的结构,为了便于说明,仅示出了与本发明实施例相关的部分。其中:Fig. 2 shows the structure of the transcoder provided by the embodiment of the present invention, and for the convenience of description, only the parts related to the embodiment of the present invention are shown. in:
信息接收单元21接收用户输入的源多媒体文件和转码参数。The information receiving unit 21 receives the source multimedia file and transcoding parameters input by the user.
其中转码参数包括但不限于文件容器格式、视频格式、视频大小、视频帧率、视频码率、音频格式、音频码率、音频采样率、音频声道数等。The transcoding parameters include but are not limited to file container format, video format, video size, video frame rate, video bit rate, audio format, audio bit rate, audio sampling rate, number of audio channels, etc.
点对点网络管理单元22根据信息接收单元21接收到的源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件。The peer-to-peer network management unit 22 searches and downloads the corresponding target multimedia file from the peer-to-peer network according to the source multimedia file and the transcoding parameters received by the information receiving unit 21 .
在本发明实施例中,点对点网络管理单元22在启动转码器或者在信息接收单元21接收到源多媒体文件和转码参数时,建立与其他用户之间的点对点传输网络。其中对应的目标多媒体文件是指根据转码参数对源多媒体文件进行转码操作得到的多媒体文件。In the embodiment of the present invention, the point-to-point network management unit 22 establishes a point-to-point transmission network with other users when the transcoder is started or when the information receiving unit 21 receives the source multimedia file and transcoding parameters. The corresponding target multimedia file refers to a multimedia file obtained by performing a transcoding operation on the source multimedia file according to the transcoding parameters.
在本发明实施例中,该点对点网络管理单元22包括第一查询请求发送模块(图未示出)和第一文件下载模块(图未示出)。其中:In the embodiment of the present invention, the P2P network management unit 22 includes a first query request sending module (not shown in the figure) and a first file downloading module (not shown in the figure). in:
第一查询请求发送模块向点对点网络中的查询服务器发送目标文件查询请求,该目标文件查询请求携带源多媒体文件信息和转码参数信息,以使查询服务器返回存储有该源多媒体文件和转码参数的客户端列表。The first query request sending module sends a target file query request to the query server in the peer-to-peer network, and the target file query request carries source multimedia file information and transcoding parameter information, so that the query server returns and stores the source multimedia file and transcoding parameter information list of clients.
在本发明实施例中,目标文件查询请求中携带的源多媒体文件信息可以是源多媒体文件的哈希(Hash)值。目标文件查询请求中携带的转码参数信息可以是播放效果,此时,预先建立播放效果与转码参数之间的对应关系。In this embodiment of the present invention, the source multimedia file information carried in the target file query request may be a hash (Hash) value of the source multimedia file. The transcoding parameter information carried in the target file query request may be a playback effect. In this case, the corresponding relationship between the playback effect and the transcoding parameter is established in advance.
第一文件下载模块从查询服务器返回的客户端列表中的客户端中下载采用该转码参数对该源多媒体文件进行转码得到的目标多媒体文件。The first file downloading module downloads the target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameter from the clients in the client list returned by the query server.
在本发明另一实施例中,该点对点网络管理单元22包括第二查询请求发送模块(图未示出)和第二文件下载模块(图未示出)。其中:In another embodiment of the present invention, the P2P network management unit 22 includes a second query request sending module (not shown in the figure) and a second file downloading module (not shown in the figure). in:
第二查询请求发送模块向预先存储的客户端列表中的客户端发送目标文件查询请求,该目标文件查询请求携带源多媒体文件信息和转码参数信息,以使接收到该目标文件查询请求的客户端返回存储有该源多媒体文件和转码参数的客户端列表。The second query request sending module sends a target file query request to the client in the pre-stored client list, and the target file query request carries source multimedia file information and transcoding parameter information, so that the client who receives the target file query request The client returns a list of clients storing the source multimedia file and transcoding parameters.
在本发明实施例中,当接收到目标文件查询请求的客户端中存储了有该源多媒体文件和转码参数的客户端列表时,则直接返回该客户端列表;当接收到目标文件查询请求的客户端中未存储有该源多媒体文件和转码参数的客户端列表时,向该接收到目标文件查询请求的客户端再向其预先存储的客户端列表中的客户端发送目标文件查询请求,该目标文件查询请求携带源多媒体文件信息和转码参数信息,直到查找到存储有该源多媒体文件和转码参数的客户端,如寻最终都未查找到存储有该源多媒体文件和转码参数的客户端时,返回下载失败的信息。In the embodiment of the present invention, when the client list that has this source multimedia file and transcoding parameter is stored in the client that receives target file query request, then directly return this client list; When receiving target file query request When the client list of the source multimedia file and transcoding parameters is not stored in the client, send the target file query request to the client that has received the target file query request to the client in its pre-stored client list , the target file query request carries source multimedia file information and transcoding parameter information, until the client that stores the source multimedia file and transcoding parameters is found, if no client is found that stores the source multimedia file and transcoding parameters When the client of the parameter is set, the download failure information will be returned.
第二文件下载模块从返回的客户端列表中的客户端中下载采用该转码参数对该源多媒体文件进行转码得到的目标多媒体文件。The second file download module downloads the target multimedia file obtained by transcoding the source multimedia file by using the transcoding parameter from the clients in the returned client list.
当网络速度较慢时,如果直接从点对点网络中查找并下载对应的目标多媒体文件也可能需要花费较长的时间,为了在转码速度和转码消耗的资源之间找到较好的平衡点,在本发明另一实施例中,该转码器还包括转码时间估算单元23和转码处理单元24。其中:When the network speed is slow, it may take a long time to find and download the corresponding target multimedia files directly from the peer-to-peer network. In order to find a better balance between the transcoding speed and the resources consumed by transcoding, In another embodiment of the present invention, the transcoder further includes a transcoding time estimation unit 23 and a transcoding processing unit 24 . in:
转码时间估算单元23根据源多媒体文件和转码参数估算转码完成时间。其中转码时间估算单元23根据源多媒体文件和转码参数估算转码完成时间的具体过程如下:The transcoding time estimating unit 23 estimates the transcoding completion time according to the source multimedia file and transcoding parameters. Wherein the transcoding time estimation unit 23 estimates the specific process of the transcoding completion time according to the source multimedia file and the transcoding parameters as follows:
转码完成时间=基准时间×源多媒体文件分辨率的对应系数×源多媒体文件的时长×目标文件格式的对应系数×目标文件分辨率的对应系数×目标文件编码格式的对应系数×用户PC计算能力的对应系数。对应系数为在若干台测试机器测试后的平均值。当然还可以根据转码的具体需求设置其他的转码估算算法来估算转码完成时间,而不以上述举例说明为限。转码处理单元24直接根据转码参数对源多媒体文件进行转码处理,生成目标多媒体文件。在本发明实施例中,当转码时间估算单元23估算得到的转码完成时间超过预设的时间时,转码处理单元24直接根据转码参数对源多媒体文件进行转码处理,得到目标多媒体文件。其具体过程属于现有技术,在此不再赘述。Transcoding completion time = reference time × corresponding coefficient of source multimedia file resolution × source multimedia file duration × corresponding coefficient of target file format × corresponding coefficient of target file resolution × corresponding coefficient of target file encoding format × user PC computing power The corresponding coefficient. The corresponding coefficient is the average value after testing on several test machines. Of course, other transcoding estimation algorithms can also be set according to the specific requirements of transcoding to estimate the completion time of transcoding, not limited to the above examples. The transcoding processing unit 24 directly performs transcoding processing on the source multimedia file according to the transcoding parameters to generate a target multimedia file. In the embodiment of the present invention, when the transcoding completion time estimated by the transcoding time estimation unit 23 exceeds the preset time, the transcoding processing unit 24 directly performs transcoding processing on the source multimedia file according to the transcoding parameters to obtain the target multimedia file. document. The specific process belongs to the prior art and will not be repeated here.
在本发明另一实施例中,当点对点网络管理单元22从点对点网络中未查找到对应的目标多媒体文件时,触发转码处理单元24。即转码处理单元24在点对点网络管理单元22从点对点网络中未查找到对应的目标多媒体文件时,直接根据转码参数对源多媒体文件进行转码处理,生成目标多媒体文件。In another embodiment of the present invention, when the peer-to-peer network management unit 22 does not find the corresponding target multimedia file from the peer-to-peer network, the transcoding processing unit 24 is triggered. That is, when the P2P network management unit 22 does not find the corresponding target multimedia file from the P2P network, the transcoding processing unit 24 directly performs transcoding processing on the source multimedia file according to the transcoding parameters to generate the target multimedia file.
在本发明另一实施例中,当点对点网络的传输速度较慢时,从点对点网络中查找对应的目标多媒体文件需要花费较长时间,这将给用户带来较差的用户体验,为了避免这种问题,在本发明另一实施例中,在点对点网络管理单元22在预设的时间内未从点对点网络中查找到对应的目标多媒体文件时,触发转码处理单元24。即转码处理单元24在点对点网络管理单元22在预设的时间内未从点对点网络中查找到对应的目标多媒体文件时,直接根据转码参数对源多媒体文件进行转码处理,生成目标多媒体文件。In another embodiment of the present invention, when the transmission speed of the peer-to-peer network is slow, it takes a long time to find the corresponding target multimedia file from the peer-to-peer network, which will bring poor user experience to the user. In order to avoid this To solve this problem, in another embodiment of the present invention, when the peer-to-peer network management unit 22 fails to find the corresponding target multimedia file from the peer-to-peer network within a preset time, the transcoding processing unit 24 is triggered. That is, when the transcoding processing unit 24 does not find the corresponding target multimedia file from the peer-to-peer network within the preset time, the transcoding processing unit 24 directly performs transcoding processing on the source multimedia file according to the transcoding parameters to generate the target multimedia file .
该转码处理单元24包括音视频分离模块241、视频转码模块242、音频转码模块243以及目标文件生成模块244。其中:The transcoding processing unit 24 includes an audio and video separation module 241 , a video transcoding module 242 , an audio transcoding module 243 and an object file generation module 244 . in:
音视频分离模块241对信息接收单元21接收的源多媒体文件进行解析,分离出音频流和视频流。其具体过程属于现有技术,在此不再赘述。The audio and video separation module 241 analyzes the source multimedia file received by the information receiving unit 21, and separates the audio stream and the video stream. The specific process belongs to the prior art and will not be repeated here.
视频转码模块242根据信息接收单元21接收的转码参数对音视频分离模块241分离出的视频流进行转码处理。其具体过程属于现有技术,在此不再赘述。The video transcoding module 242 performs transcoding processing on the video stream separated by the audio and video separation module 241 according to the transcoding parameters received by the information receiving unit 21 . The specific process belongs to the prior art and will not be repeated here.
音频转码模块243根据信息接收单元21接收的转码参数对音视频分离模块241分离出的音频流进行转码处理。其具体过程属于现有技术,在此不再赘述。The audio transcoding module 243 performs transcoding processing on the audio stream separated by the audio-video separation module 241 according to the transcoding parameters received by the information receiving unit 21 . The specific process belongs to the prior art and will not be repeated here.
目标文件生成模块244将视频转码模块242转码后的视频流和音频转码模块243转码后的音频流进行合成,生成目标多媒体文件。其具体过程属于现有技术,在此不再赘述。The target file generating module 244 synthesizes the video stream transcoded by the video transcoding module 242 and the audio stream transcoded by the audio transcoding module 243 to generate a target multimedia file. The specific process belongs to the prior art and will not be repeated here.
为了实现目标多媒体文件的共享,在本发明另一实施例中,该转码器还包括文件共享单元25。该文件共享单元25将转码处理单元24生成的目标多媒体文件共享至点对点网络,以便点对点网络中的其他用户下载。In order to realize the sharing of target multimedia files, in another embodiment of the present invention, the transcoder further includes a file sharing unit 25 . The file sharing unit 25 shares the target multimedia file generated by the transcoding processing unit 24 to the peer-to-peer network, so that other users in the peer-to-peer network can download it.
在本发明实施例中,在接收到用户输入的源多媒体文件和转码参数时,根据源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件,从而在多个用户均要根据相同的转码参数对相同的源多媒体文件进行转码时,不需要每个用户均进行转码操作,节约了资源。同时通过估算转码完成时间,并在估算的转码完成时间超过预设的时间时,根据源多媒体文件和转码参数,从点对点网络中查找并下载对应的目标多媒体文件,在估算的转码完成时间未超过预设的时间时,直接根据转码参数对源多媒体文件进行转码处理,生成目标多媒体文件,从而在转码速度和转码消耗的资源之间找到较好的平衡点,最大程度为用户节约资源,同时保证得到目标多媒体文件的速度。In the embodiment of the present invention, when the source multimedia file and transcoding parameters input by the user are received, the corresponding target multimedia file is searched and downloaded from the peer-to-peer network according to the source multimedia file and the transcoding parameter, so that multiple users can When the same source multimedia file needs to be transcoded according to the same transcoding parameter, each user does not need to perform the transcoding operation, which saves resources. At the same time, by estimating the completion time of transcoding, and when the estimated completion time of transcoding exceeds the preset time, according to the source multimedia file and transcoding parameters, find and download the corresponding target multimedia file from the peer-to-peer network. When the completion time does not exceed the preset time, the source multimedia file is directly transcoded according to the transcoding parameters to generate the target multimedia file, so as to find a better balance between the transcoding speed and the resources consumed by transcoding. The degree saves resources for users, and at the same time guarantees the speed of getting target multimedia files.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.
Claims (14)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200910110089.6A CN102055964A (en) | 2009-11-11 | 2009-11-11 | Transcoding method for multimedia file, and transcoder |
| PCT/CN2010/073652 WO2011057489A1 (en) | 2009-11-11 | 2010-06-08 | Method and device for multimedia file transcoding |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200910110089.6A CN102055964A (en) | 2009-11-11 | 2009-11-11 | Transcoding method for multimedia file, and transcoder |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102055964A true CN102055964A (en) | 2011-05-11 |
Family
ID=43959833
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN200910110089.6A Pending CN102055964A (en) | 2009-11-11 | 2009-11-11 | Transcoding method for multimedia file, and transcoder |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN102055964A (en) |
| WO (1) | WO2011057489A1 (en) |
Cited By (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102780728A (en) * | 2011-05-13 | 2012-11-14 | 腾讯科技(深圳)有限公司 | Media file transcoding and downloading method and client |
| CN102882829A (en) * | 2011-07-11 | 2013-01-16 | 腾讯科技(深圳)有限公司 | Transcoding method and system |
| CN102883185A (en) * | 2011-07-14 | 2013-01-16 | 上海聚力传媒技术有限公司 | Video-on-demand method and equipment thereof |
| CN103024491A (en) * | 2012-12-31 | 2013-04-03 | 传聚互动(北京)科技有限公司 | Video playing method and video playing system of mobile terminal |
| CN103379362A (en) * | 2012-04-24 | 2013-10-30 | 腾讯科技(深圳)有限公司 | Video-on-demand method and system |
| CN103546751A (en) * | 2012-07-10 | 2014-01-29 | 美国博通公司 | Video coding method and system |
| CN103702172A (en) * | 2013-12-13 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Method and system for carrying out dolby transcoding on AV (Audio/Video) |
| CN105100141A (en) * | 2014-05-04 | 2015-11-25 | 腾讯科技(深圳)有限公司 | Multimedia content network sharing method, multimedia content network sharing device and multimedia content network sharing system |
| US9282141B2 (en) | 2012-05-15 | 2016-03-08 | Tencent Technology (Shenzhen) Company Limited | Method and system for loading file in webgame |
| US9491225B2 (en) | 2012-03-16 | 2016-11-08 | Tencent Technology (Shenzhen) Company Limited | Offline download method and system |
| CN103856814B (en) * | 2012-11-28 | 2017-09-15 | 北京音之邦文化科技有限公司 | The broadcasting control strategy control method and device of Web players |
| CN108141644A (en) * | 2015-09-09 | 2018-06-08 | 万特里克斯公司 | For the method and system of panorama transmission of multimedia streams |
| CN110113660A (en) * | 2019-02-27 | 2019-08-09 | 咪咕视讯科技有限公司 | Method, device, terminal and storage medium for transcoding time length estimation |
| CN110120930A (en) * | 2018-02-06 | 2019-08-13 | 阿里巴巴集团控股有限公司 | Obtain method, system and the multimedia equipment of transmission file |
| CN110611703A (en) * | 2013-12-04 | 2019-12-24 | 脸谱公司 | Upload and transcode media files |
| CN112416568A (en) * | 2020-09-01 | 2021-02-26 | 上海哔哩哔哩科技有限公司 | Duration estimation method and duration estimation device for audio and video transcoding task |
| CN115842925A (en) * | 2022-11-22 | 2023-03-24 | 魏洪源 | Video transcoding method, device, equipment and storage medium |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014015168A2 (en) * | 2012-07-18 | 2014-01-23 | Skyfire Labs, Inc. | Just-in-time distributed video cache |
| CN114003238B (en) * | 2021-09-30 | 2023-11-03 | 苏州浪潮智能科技有限公司 | Container deployment method, device, equipment and storage medium based on transcoding card |
| CN114915624B (en) * | 2022-07-13 | 2022-12-13 | 飞狐信息技术(天津)有限公司 | File processing method and system and electronic equipment |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020116533A1 (en) * | 2001-02-20 | 2002-08-22 | Holliman Matthew J. | System for providing a multimedia peer-to-peer computing platform |
| US20050172127A1 (en) * | 2004-01-31 | 2005-08-04 | Frank Hartung | System and method for transcoding encrypted multimedia messages transmitted between two devices |
| CN100375533C (en) * | 2004-03-10 | 2008-03-12 | 浙江大学 | Adaptive video transcoding gateway with multiple conversion functions |
| CN101098272A (en) * | 2006-06-27 | 2008-01-02 | 腾讯科技(深圳)有限公司 | Seed enquiring method of P2P system and P2P server |
-
2009
- 2009-11-11 CN CN200910110089.6A patent/CN102055964A/en active Pending
-
2010
- 2010-06-08 WO PCT/CN2010/073652 patent/WO2011057489A1/en not_active Ceased
Cited By (24)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102780728A (en) * | 2011-05-13 | 2012-11-14 | 腾讯科技(深圳)有限公司 | Media file transcoding and downloading method and client |
| CN102882829A (en) * | 2011-07-11 | 2013-01-16 | 腾讯科技(深圳)有限公司 | Transcoding method and system |
| WO2013007148A1 (en) * | 2011-07-11 | 2013-01-17 | 腾讯科技(深圳)有限公司 | Transcoding method and system |
| CN102883185A (en) * | 2011-07-14 | 2013-01-16 | 上海聚力传媒技术有限公司 | Video-on-demand method and equipment thereof |
| US9491225B2 (en) | 2012-03-16 | 2016-11-08 | Tencent Technology (Shenzhen) Company Limited | Offline download method and system |
| CN103379362B (en) * | 2012-04-24 | 2017-07-07 | 腾讯科技(深圳)有限公司 | VOD method and system |
| CN103379362A (en) * | 2012-04-24 | 2013-10-30 | 腾讯科技(深圳)有限公司 | Video-on-demand method and system |
| US9282141B2 (en) | 2012-05-15 | 2016-03-08 | Tencent Technology (Shenzhen) Company Limited | Method and system for loading file in webgame |
| CN103546751A (en) * | 2012-07-10 | 2014-01-29 | 美国博通公司 | Video coding method and system |
| US9426498B2 (en) | 2012-07-10 | 2016-08-23 | Broadcom Corporation | Real-time encoding system of multiple spatially scaled video based on shared video coding information |
| CN103546751B (en) * | 2012-07-10 | 2017-03-01 | 美国博通公司 | Method for video coding and system |
| CN103856814B (en) * | 2012-11-28 | 2017-09-15 | 北京音之邦文化科技有限公司 | The broadcasting control strategy control method and device of Web players |
| CN103024491B (en) * | 2012-12-31 | 2016-01-27 | 北京奇艺世纪科技有限公司 | The video broadcasting method of mobile terminal and system |
| CN103024491A (en) * | 2012-12-31 | 2013-04-03 | 传聚互动(北京)科技有限公司 | Video playing method and video playing system of mobile terminal |
| CN110611703A (en) * | 2013-12-04 | 2019-12-24 | 脸谱公司 | Upload and transcode media files |
| CN103702172A (en) * | 2013-12-13 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Method and system for carrying out dolby transcoding on AV (Audio/Video) |
| CN105100141B (en) * | 2014-05-04 | 2019-05-24 | 腾讯科技(深圳)有限公司 | Multimedia content network sharing method, apparatus and system |
| CN105100141A (en) * | 2014-05-04 | 2015-11-25 | 腾讯科技(深圳)有限公司 | Multimedia content network sharing method, multimedia content network sharing device and multimedia content network sharing system |
| CN108141644A (en) * | 2015-09-09 | 2018-06-08 | 万特里克斯公司 | For the method and system of panorama transmission of multimedia streams |
| CN110120930A (en) * | 2018-02-06 | 2019-08-13 | 阿里巴巴集团控股有限公司 | Obtain method, system and the multimedia equipment of transmission file |
| CN110113660A (en) * | 2019-02-27 | 2019-08-09 | 咪咕视讯科技有限公司 | Method, device, terminal and storage medium for transcoding time length estimation |
| CN110113660B (en) * | 2019-02-27 | 2021-08-06 | 咪咕视讯科技有限公司 | A method, device, terminal and storage medium for estimating transcoding duration |
| CN112416568A (en) * | 2020-09-01 | 2021-02-26 | 上海哔哩哔哩科技有限公司 | Duration estimation method and duration estimation device for audio and video transcoding task |
| CN115842925A (en) * | 2022-11-22 | 2023-03-24 | 魏洪源 | Video transcoding method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2011057489A1 (en) | 2011-05-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102055964A (en) | Transcoding method for multimedia file, and transcoder | |
| Kesavan et al. | An investigation on adaptive HTTP media streaming Quality-of-Experience (QoE) and agility using cloud media services | |
| CA2841377C (en) | Video transcoding services provided by searching for currently transcoded versions of a requested file before performing transcoding | |
| EP3056014B1 (en) | Method and apparatus for content delivery | |
| US8843596B2 (en) | Conversion between streaming media communication protocols | |
| CN102045312B (en) | Self-adaptative transcoding method and system | |
| US9712590B2 (en) | Method and device for transmitting streaming media | |
| CN1554054A (en) | Method and system for transcoding video and voice signals | |
| CN1758646A (en) | System and method for receiver-driven streaming in a peer-to-peer network | |
| US10673907B2 (en) | Systems and methods for providing DLNA streaming to client devices | |
| WO2013037241A1 (en) | Mobile multimedia real-time transcoding playing system, device, storage medium and method | |
| CN105049931B (en) | The method and system that the video of format non-supporting in mobile terminal is converted | |
| US20140226711A1 (en) | System and method for self-adaptive streaming of multimedia content | |
| CN105142020A (en) | Method and system for converting video in unsupported format in mobile terminal | |
| US8621107B2 (en) | State-mediated data signaling used for compression in telecommunication services | |
| WO2009092240A1 (en) | A communication device and application method, system thereof | |
| CN101640627B (en) | System and method for transmitting multimedia data stream | |
| CN104717555B (en) | The acquisition methods and device of video code flow | |
| CN102571409A (en) | Service request management system and method for realizing service across-terminal application | |
| CN105992016A (en) | HLS on-line transcoding method and system | |
| AU2004316014B2 (en) | Method and arrangement for state memory management | |
| JP2004038941A (en) | Universal multimedia framework terminal device, server, and gateway content adaptation method | |
| Andriescu et al. | AmbiStream: a middleware for multimedia streaming on heterogeneous mobile devices | |
| CN102271122B (en) | A kind of rubbish contents applied to P2P networks determine method and its system | |
| CN110493244A (en) | A kind of video capture method based on CMSP |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C12 | Rejection of a patent application after its publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20110511 |