WO2012028096A1 - Method and apparatus for downloading audio-video file - Google Patents
Method and apparatus for downloading audio-video file Download PDFInfo
- Publication number
- WO2012028096A1 WO2012028096A1 PCT/CN2011/079149 CN2011079149W WO2012028096A1 WO 2012028096 A1 WO2012028096 A1 WO 2012028096A1 CN 2011079149 W CN2011079149 W CN 2011079149W WO 2012028096 A1 WO2012028096 A1 WO 2012028096A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- segment
- file
- video
- format
- data stream
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000006243 chemical reaction Methods 0.000 claims abstract description 88
- 238000004458 analytical method Methods 0.000 claims abstract description 22
- 238000012916 structural analysis Methods 0.000 claims abstract description 12
- 239000012634 fragment Substances 0.000 claims description 16
- 238000000926 separation method Methods 0.000 claims description 6
- 230000003139 buffering effect Effects 0.000 claims description 3
- 230000004888 barrier function Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 3
- 230000006872 improvement Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- 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/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- 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/61—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
- H04L65/612—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
-
- 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/2866—Architectures; Arrangements
- H04L67/30—Profiles
- H04L67/303—Terminal profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44008—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
Definitions
- the present invention relates to the field of data processing, and in particular, to a method and an apparatus for downloading audio and video files. Background of the invention
- the general user equipment provides video and audio playback functions.
- the audio and video files on the Internet are directly downloaded to the user equipment. It is often impossible to play on the top.
- an implementation method requires two processes of downloading and format conversion, that is, downloading the video and audio files first, and then the user converts the downloaded video and audio files according to the format conversion tool, and In the format conversion, the format conversion tool needs to be downloaded separately.
- Another implementation method is to set up different user equipment zones through some video resource websites to meet the specific requirements of different user equipments for the audio and video formats.
- the inventors have found that the prior art has at least the following disadvantages: Since general video and audio format conversion tools are specialized, ordinary users often have higher thresholds for using these tools, so the first implementation is more Complex; when the website meets the format requirements of different user equipments for audio and video files, it requires a higher operating cost to network The network video resources are converted into a format suitable for a specific user equipment, and there are many types of user equipment, which is difficult to meet the requirements of all user equipment. Summary of the invention
- embodiments of the present invention provide a method and apparatus for downloading video and audio files.
- the technical solution is as follows:
- a method for downloading a video file includes: downloading each segment of a video file selected by a user, and performing structural analysis on each downloaded segment;
- each of the segments satisfies the format conversion condition; when the segment satisfies the format conversion condition, the format of the segment is converted into a format that matches the specified device.
- the performing structural analysis on each of the downloaded segments specifically includes: identifying a file type of the video file according to each segment, and parsing the segment according to a structure corresponding to the identified file type, to obtain the The structural information of each segment takes the structural information of each segment as the analysis result of each segment.
- the segment is determined to be the current to-be-converted segment according to the index data of the file header and the file end, the segment is determined to satisfy the format conversion condition; otherwise , determining that the segment does not satisfy the format conversion bar Piece
- the method further includes: buffering the segment that does not satisfy the format conversion condition until the format conversion condition is satisfied.
- the method Before converting the format of the segment to a format that matches the specified device, the method further includes:
- the converting the format of the fragment into a format that matches the specified device includes:
- the determining the transcoding parameters that match the specified device specifically includes:
- Prompting the user to select a device model of the specified device searching for a transcoding parameter matching the specified device in a pre-stored parameter database according to the device model selected by the user; or prompting the user to set a transcoding parameter, and the user is
- the set transcoding parameter is determined to be a transcoding parameter that matches the specified device.
- a device for downloading a video file includes: a downloading module, configured to download each segment of a video file selected by a user;
- An analysis module configured to perform structural analysis on each segment downloaded by the download module, and a determining module, configured to respectively determine each segment according to an analysis result of the analysis module Whether the format conversion condition is satisfied;
- a conversion module configured to: when the determining module determines that the segment satisfies a format conversion condition, convert the format of the segment into a format that matches a specified device.
- the analyzing module is specifically configured to identify a file type of the video file according to each segment, and parse each segment according to a structure corresponding to the identified file type, to obtain structural information of each segment.
- the structural information of each of the segments is taken as the analysis result of each of the segments.
- the determining module is configured to determine, according to the structural information of each segment, whether the index data of the file header and the file tail of the video file are successfully downloaded, and determine the foregoing according to the index data of the file header and the file tail. Whether the fragment is the current to-be-converted segment; if the file header of the video file is successfully downloaded, and the segment is determined to be the current to-be-converted segment according to the index data of the file header and the file end, determining that the segment satisfies the format conversion condition ; Nobe ' J , judge that the fragment does not satisfy the format conversion condition;
- the device further includes:
- a buffering module configured to: when the determining module determines that the segment does not satisfy the format conversion condition, cache the segment that does not satisfy the format conversion condition until the format conversion condition is met.
- the device further includes:
- a determining module configured to determine a transcoding parameter that matches the specified device before the converting module converts a format of each of the segments into a format that matches the specified device;
- the converting module specifically includes:
- an audio and video stream separation unit configured to separate the audio and video streams, to obtain an audio data stream and a video data stream
- a decoding unit configured to decode the audio data stream and the video data stream separated by the audio and video stream separation unit, to obtain an uncompressed audio data stream and an uncompressed video data stream;
- a coding unit, the uncompressed audio data stream obtained by decoding the decoding unit and the uncompressed video data stream are encoded according to the transcoding parameters determined by the determining module and matched with the designated device, to obtain a compressed audio data stream. And compressing the video data stream;
- an audio/video stream merging unit configured to combine the compressed audio data stream and the compressed video data stream obtained by the coding unit to obtain a video file with a format matching the specified device.
- the determining module is specifically configured to prompt the user to select a device model of the specified device, and search for a transcoding parameter matching the specified device in the pre-stored parameter database according to the device model selected by the user; or, prompt the user to set Transcoding parameters, the transcoding parameters set by the user are determined as transcoding parameters that match the specified device.
- the downloaded video files can meet the format requirements of various user equipments for the audio and video files, thereby eliminating the format obstacles in downloading the audio and video files, and since no additional download format is required.
- the conversion tool is thus able to streamline user operations.
- FIG. 1 is a flowchart of a method for downloading a video file according to Embodiment 1 of the present invention
- FIG. 2 is a flowchart of a method for downloading a video file according to Embodiment 2 of the present invention
- FIG. 3 is a parameter setting of transcoding provided by Embodiment 2 of the present invention
- FIG. 4 is a schematic structural diagram of an apparatus for downloading video and audio files according to Embodiment 3 of the present invention
- FIG. 5 is a schematic structural diagram of another apparatus for downloading video and audio files according to Embodiment 3 of the present invention.
- FIG. 6 is a schematic structural diagram of another apparatus for downloading video and audio files according to Embodiment 3 of the present invention
- Figure ⁇ is a schematic structural diagram of a conversion module provided in Embodiment 3 of the present invention.
- the embodiment provides a method for downloading a video file, and the method is specifically as follows:
- the method for downloading video and audio files provided by this embodiment is to perform format conversion on the user equipment when the user equipment downloads the video file, so that the downloaded video file satisfies the format requirement of the user equipment for the video file, thereby eliminating the existence of downloading the video file.
- the format is cumbersome, and since there is no need to download a separate format conversion tool, the user operation can be managed.
- the embodiment provides a method for downloading a video file. After downloading each segment of the video file, the method directly converts the format of each segment into a format that matches the specified device, thereby eliminating the existence of the video file. Format barrier. Referring to FIG. 2, the flow of downloading the audio and video file provided in this embodiment is as follows:
- the video and audio provided by this embodiment
- the downloading method of the file may provide the user with an entrance for searching for the audio and video resources, and the user searches for and selects the video and audio file to be downloaded through the entrance of the searched audio and video resource, and starts downloading the video and audio file after adding the downloading task according to the user's selection.
- the specific download mode is not limited. Since the existing download mode generally adopts P2P (Peer-to-Peer) technology, the video file is sliced when downloaded, for example, the basic unit is 512 KB. The audio and video files are segmented, and are not downloaded in strict accordance with the segment sequence of the video file segmentation, but the segments of the video file are downloaded in an out-of-order manner.
- the file type of the video file may be identified according to each segment, and each segment is parsed according to the structure corresponding to the identified file type, and the structural information of each segment is obtained, and the structural information of each segment is Analysis results.
- this embodiment is not specifically limited. This can be identified by the file suffix name or file type identification byte of each fragment.
- the three file type identification bytes of the rmvb type file at the beginning of the file are the characters "RMF".
- Video files of different file types correspond to different structures.
- the structure of a general video file includes three parts: description information (HEAD) of the file header, audio and video data (DATA) in the file, and index data (INDX) at the end of the file.
- the file header describes the overall information of the file, including but not limited to the file duration, the number of audio streams in the file, the detailed information of the audio and video streams, etc.; the index data at the end of the file describes the location information of the file data block, such as the Nth The file address corresponding to the fragment, and so on.
- the description information of the file header and the index data at the end of the file are generally short.
- the RMVB file has about 512 KB of head and tail data.
- step 202 Determine, according to the analysis result, whether each segment satisfies the format conversion condition, if not, execute step 203, otherwise, perform step 204;
- each segment of the video file is downloaded in an out-of-order manner
- the format conversion needs to be converted according to the order in which the segments are arranged in the video file, that is, the first segment of the video file needs to be converted. Even if other clips have already been downloaded, if the first clip has not been successfully downloaded to the local, it still needs to wait until the first clip is downloaded and the first clip is formatted before the other clips can be sequentially processed. Format conversion. Therefore, when performing format conversion on each segment, it is necessary to ensure that each segment to be format converted is the current segment to be converted.
- the determination of the currently to-be-converted segments is in a certain order.
- the segments are downloaded out of order, since the file header describes the file duration and the detailed information of the audio stream in the file, the index data at the end of the file describes the file segment.
- the position information so the order of each segment in the video file can be obtained according to the index data of the file header and the file end. According to the order of each segment in the video file, it can be determined that each segment to be format converted is sequentially Whether it is the current segment to be converted.
- the format conversion condition requires that the index data of the file header and the file end of the video file be downloaded successfully, and it is also required to determine, according to the index data of the file header and the file end, that the fragment to be format converted is the current to-be-converted segment. Then, according to the analysis result, whether each segment satisfies the format conversion condition, firstly, according to the structure information of each segment, it is determined whether the file header and the file end index data of the video file are successfully downloaded, and according to the index data of the file header and the file tail.
- each segment to be format-converted is the current segment to be converted; if the index data of the file header and the file end of the video file is successfully downloaded, and determining the format conversion to be performed according to the index data of the file header and the file tail
- the segments are sequentially the segments to be converted, and then each segment is judged to satisfy the format conversion condition; otherwise, each segment is judged.
- the format conversion condition is not met.
- the index data of the file header and the file end of the video file has not been successfully downloaded, which means that each of the out-of-order downloads is downloaded.
- the order of the fragments has not been determined, so that all the downloaded fragments do not satisfy the format conversion condition; in addition, even if it is judged that the index data of the file header and the file end of the video file are successfully downloaded, if the format to be converted is That is, the current to-be-converted segment is the fourth segment, that is, the fourth segment has not been successfully formatted, and it is still determined that the fifth segment to be format-converted does not satisfy the format conversion condition; only when the file header of the video file is determined The index data at the end of the file is successfully downloaded, and the fourth segment has been successfully formatted, and the current segment to be converted is just the fifth segment, and it can be judged that the fifth segment satisfies the format conversion condition.
- step 204 Cache the fragment that does not meet the format conversion condition, and after the format conversion condition is met, perform step 204;
- the current segment does not satisfy the conversion condition, it needs to be cached until the format conversion condition is satisfied, that is, when the current to-be-converted segment is sequentially selected as the segment, and then the format conversion is continued, thereby continuing to perform the subsequent step 204.
- the format conversion condition is satisfied, that is, when the current to-be-converted segment is sequentially selected as the segment, and then the format conversion is continued, thereby continuing to perform the subsequent step 204.
- the current segment to be converted is the fifth segment in the video file
- the sixth segment has been downloaded after the fifth segment is not successfully downloaded, the sixth segment needs to be cached because it is not the current segment to be converted. After the 5th fragment is downloaded and the 5th fragment is successfully formatted, the 6th fragment satisfies the format conversion condition.
- the method for downloading the video file needs to determine a transcoding parameter that matches the specified device before performing the format conversion operation.
- different types of devices can be pre-stored.
- Corresponding transcoding parameters, and storing the transcoding parameters corresponding to different types of devices in the form of a parameter database prompting the user to select the device model of the specified device, and searching for the device in the pre-stored parameter database according to the device model selected by the user. Specifies the transcoding parameters that the device matches. Taking the transcoding parameter setting selection interface shown in FIG. 3 as an example, the user is prompted to select the device on which the video file is desired to be downloaded.
- the transcoding parameters include, but are not limited to, the file type of the transcoded output, the video resolution, the video frame rate, the video encoding type, the audio encoding type, the video bit rate, and the audio bit rate.
- the specific content of the transcoding parameter is not performed in this embodiment. limited.
- the file type in the transcoding parameter is MP4, video resolution 640x360, video frame rate 15fps, video encoding type MPEG4, audio encoding type AAC, video bit rate 768kbps, and audio code. Rate 64kbps and so on.
- the user may be prompted to set a transcoding parameter, and the transcoding parameter set by the user is determined as a transcoding parameter that matches the specified device, that is, the user manually performs transcoding.
- the setting of the parameters may be prompted to set a transcoding parameter, and the transcoding parameter set by the user is determined as a transcoding parameter that matches the specified device, that is, the user manually performs transcoding.
- the audio and video streams are separated in turn to obtain an audio data stream and a video data stream; and the audio data stream and the video data stream are decoded to obtain an uncompressed audio data stream and an uncompressed video data stream;
- the compressed audio data stream and the compressed video data stream are combined to obtain a video file whose format matches the specified device.
- audio and video streams are separated, decoded, encoded, and combined, they are implemented in the prior art.
- the embodiment is not specifically limited, and will not be described again.
- the designated device can directly play the video file without having to download the format conversion tool, thereby enabling the user to operate.
- the method for downloading a video file provided by this embodiment may perform format conversion on all segments sequentially or simultaneously after all segments of the video file are downloaded.
- the method for downloading the video file provided by the embodiment may not require the format conversion to be converted according to the order of the segments in the video file, that is, each time a segment is downloaded, the segment successfully downloaded is separately executed.
- the format conversion does not need to wait for all the segments of the video file to be downloaded and then format conversion.
- Other conversion strategies can also be adopted. This embodiment does not limit the specific conversion strategy.
- the method for downloading a video file provided by the embodiment, by downloading the video file at the same time, and simultaneously converting the video file, so that the downloaded video file satisfies the format requirements of the audio and video files of various devices, thereby eliminating the existence of the video file when downloading the video file.
- the format is cumbersome, and since there is no need to download a separate format conversion tool, the user operation can be managed.
- the embodiment provides a downloading device for video and audio files, and the device includes: a downloading module 401, configured to download each segment of a video file selected by a user; and an analyzing module 402, configured to download the downloading module 401.
- the segment is subjected to structural analysis;
- the determining module 403 is configured to determine, according to the analysis result of the analyzing module 402, whether each segment satisfies a format conversion condition;
- the conversion module 404 is configured to convert the format of each segment into a format that matches the specified device when the determining module 403 determines that each segment satisfies the format conversion condition.
- the analyzing module 402 is specifically configured to identify a file type of the audio and video file according to each segment, and parse each segment according to the structure corresponding to the identified file type, to obtain structural information of each segment, and to construct structure information of each segment. As a result of the analysis.
- the determining module 403 is specifically configured to determine, according to the structure information of each segment, whether the file header and the file end of the video file are successfully downloaded, and determine whether each segment is the current to be converted according to the index data of the file header and the file tail.
- each segment is judged to be the currently to be converted according to the index data of the file header and the file end, it is judged that each segment satisfies the format conversion condition; otherwise, each judgment is judged; Segments do not satisfy the format conversion condition;
- the device further includes:
- the cache module 405 is configured to: when the determining module 403 determines that each segment does not satisfy the format conversion condition, cache the segment that does not satisfy the format conversion condition until the format conversion condition is satisfied.
- the apparatus further includes:
- a determining module 406 configured to determine, after the converting module 404 converts the format of each segment into a format that matches the specified device, determining a transcoding parameter that matches the specified device;
- the conversion module 404 specifically includes:
- the audio and video stream separation unit 404a is configured to separate each segment into an audio and video stream to obtain an audio data stream and a video data stream;
- the decoding unit 404b is configured to decode the audio data stream and the video data stream separated by the audio-video stream separation unit 404a to obtain an uncompressed audio data stream and an uncompressed video data stream.
- the encoding unit 404c is configured to decode the decoding unit 404b.
- the uncompressed audio data stream and the uncompressed video data stream are encoded according to a transcoding parameter determined by the determining module and matched with the specified device, to obtain a compressed audio data stream and a compressed video data stream;
- the audio and video stream merging unit 404d is configured to combine the compressed audio data stream and the compressed video data stream obtained by the encoding unit 404c to obtain a video file whose format matches the specified device.
- the apparatus may include multiple conversion modules 404, or one conversion module 404 may include multiple decoding units 404b and coding units 404c, or may adopt other manners. limited.
- the determining module 406 is specifically configured to prompt the user to select a device model of the specified device, and search for a transcoding parameter matching the specified device in the pre-stored parameter database according to the device model selected by the user; or, prompt the user to set the transcoding parameter.
- the user-set transcoding parameter is determined as a transcoding parameter that matches the specified device.
- the downloading device for video and audio files provided by this embodiment eliminates the download by satisfying the format requirements of the audio and video files of various devices by downloading the video files at the same time.
- the format barrier exists in video files, and since there is no need to download a separate format conversion tool, user operations can be managed.
- the downloading device of the audio and video file in the foregoing embodiment is only illustrated by the division of each functional module. In actual applications, the function may be assigned to different functional modules according to needs. Upon completion, the internal structure of the device is divided into different functional modules to perform all or part of the functions described above.
- the downloading device of the audio-visual file provided by the foregoing embodiment is the same as the embodiment of the method for downloading the audio-visual file. For the specific implementation process, refer to the method embodiment, and details are not described herein again.
- All or part of the steps in the embodiment of the present invention may be implemented by software, and the corresponding software program may be stored in a readable storage medium such as an optical disk or a hard disk.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Information Transfer Between Computers (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Disclosed are a method and apparatus for downloading an audio-video file, which belongs to the field of data processing. The method comprises: downloading various segments of an audio-video file selected by a user and carrying out structural analysis on each of the segments; judging whether each of the segments meets a format conversion condition according to the analysis results; and converting the format of each of the segments into a format matching that of a specified device when each of the segments meets the format conversion condition. In the present invention, a downloaded audio-video file can be made to meet the audio-video file format requirements of various devices by carrying out format conversion thereon at the time of downloading it, so that the format barrier at the time of downloading the audio-video file is eliminated and user operation can be simplified since there is no need to separately download a format conversion tool.
Description
影音文件的下载方法及装置 本申请要求于 2010 年 09 月 01 日提交中国专利局、 申请号为 201010272312.X, 发明名称为 "影音文件的下载方法及装置" 的中国专 利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 Method and apparatus for downloading audio and video files, the present application claims priority to Chinese Patent Application No. 201010272312.X, filed on September 1, 2010, entitled "Downloading Method and Apparatus for Video Files", The entire contents are incorporated herein by reference. Technical field
本发明涉及数据处理领域, 特别涉及一种影音文件的下载方法及装 置。 发明背景 The present invention relates to the field of data processing, and in particular, to a method and an apparatus for downloading audio and video files. Background of the invention
随着多媒体娱乐功能的逐渐完善, 一般的用户设备都提供了影音播 放功能。 但由于有些用户设备的影音播放功能可支持的影音文件的格式 有限, 且需要从互联网上获取影音文件, 而互联网上的影音文件的格式 种类繁多, 因而将互联网上的影音文件直接下载到用户设备上时往往无 法播放。 With the gradual improvement of multimedia entertainment functions, the general user equipment provides video and audio playback functions. However, due to the limited format of audio and video files supported by the audio and video playback functions of some user equipments, and the need to obtain audio and video files from the Internet, and the variety of audio and video files on the Internet, the audio and video files on the Internet are directly downloaded to the user equipment. It is often impossible to play on the top.
为了使影音文件能够在用户设备上正常播放, 一种实现方式是需要 经过下载和格式转换两个过程, 即先下载影音文件, 再由用户根据格式 转换工具对下载的影音文件进行格式转换, 且在进行格式转换时, 需要 另外下载格式转换工具; 另外一种实现方式是通过一些影视资源网站设 立不同用户设备专区来满足不同用户设备对影音格式的特定要求。 In order to enable the audio and video files to be played normally on the user equipment, an implementation method requires two processes of downloading and format conversion, that is, downloading the video and audio files first, and then the user converts the downloaded video and audio files according to the format conversion tool, and In the format conversion, the format conversion tool needs to be downloaded separately. Another implementation method is to set up different user equipment zones through some video resource websites to meet the specific requirements of different user equipments for the audio and video formats.
在实现本发明的过程中, 发明人发现现有技术至少存在以下缺点: 由于一般的影音格式转换工具都偏专业化, 普通用户使用这些工具 往往有较高的门槛, 因而第一种实现方式较为复杂; 而通过网站满足不 同用户设备对影音文件的格式要求时, 需要花费较高的运营成本来将网
络影视资源转换成适合特定用户设备的格式, 而且用户设备的种类众 多, 很难满足所有用户设备的要求。 发明内容 In the process of implementing the present invention, the inventors have found that the prior art has at least the following disadvantages: Since general video and audio format conversion tools are specialized, ordinary users often have higher thresholds for using these tools, so the first implementation is more Complex; when the website meets the format requirements of different user equipments for audio and video files, it requires a higher operating cost to network The network video resources are converted into a format suitable for a specific user equipment, and there are many types of user equipment, which is difficult to meet the requirements of all user equipment. Summary of the invention
为了满足各种用户设备对影音文件的格式要求, 消除下载影音文件 时存在的格式障碍, 并筒化用户操作, 本发明实施例提供了一种影音文 件的下载方法及装置。 所述技术方案如下: In order to meet the format requirements of various user equipments for audio and video files, and to eliminate the format obstacles in downloading audio and video files, and to simplify user operations, embodiments of the present invention provide a method and apparatus for downloading video and audio files. The technical solution is as follows:
一方面, 提供了一种影音文件的下载方法, 所述方法包括: 下载用户选择的影音文件的各个片段, 并对下载的各片段分别进行 结构分析; In one aspect, a method for downloading a video file is provided, where the method includes: downloading each segment of a video file selected by a user, and performing structural analysis on each downloaded segment;
根据分析结果分别判断各所述片段是否满足格式转换条件; 在所述片段满足格式转换条件时, 将所述片段的格式转换成与指定 设备相匹配的格式。 It is judged according to the analysis result whether each of the segments satisfies the format conversion condition; when the segment satisfies the format conversion condition, the format of the segment is converted into a format that matches the specified device.
其中, 所述对下载的各片段分别进行结构分析, 具体包括: 根据每个片段识别所述影音文件的文件类型, 并根据识别出的文件 类型对应的结构解析所述每个片段, 得到所述每个片段的结构信息, 将 所述每个片段的结构信息作为所述每个片段的分析结果。 The performing structural analysis on each of the downloaded segments specifically includes: identifying a file type of the video file according to each segment, and parsing the segment according to a structure corresponding to the identified file type, to obtain the The structural information of each segment takes the structural information of each segment as the analysis result of each segment.
所述根据分析结果分别判断各所述片段是否满足格式转换条件, 具 体包括: And determining, according to the analysis result, whether each of the segments satisfies a format conversion condition, and specifically includes:
根据各所述片段的结构信息判断所述影音文件的文件头和文件尾的 索引数据是否下载成功, 并根据所述文件头和文件尾的索引数据判断各 所述片段是否为当前待转换片段; Determining, according to the structural information of each of the segments, whether the index data of the file header and the file end of the video file is successfully downloaded, and determining, according to the index data of the file header and the file end, whether each segment is a current to-be-converted segment;
如果所述影音文件的文件头和文件尾的索引数据下载成功, 且根据 所述文件头和文件尾的索引数据判断所述片段为当前待转换片段, 则判 断所述片段满足格式转换条件; 否则, 判断所述片段未满足格式转换条
件; If the index data of the file header and the file end of the video file is successfully downloaded, and the segment is determined to be the current to-be-converted segment according to the index data of the file header and the file end, the segment is determined to satisfy the format conversion condition; otherwise , determining that the segment does not satisfy the format conversion bar Piece
相应地, 判断所述片段未满足格式转换条件之后, 还包括: 将未满足格式转换条件的所述片段进行緩存, 直至满足格式转换条 件。 Correspondingly, after determining that the segment does not satisfy the format conversion condition, the method further includes: buffering the segment that does not satisfy the format conversion condition until the format conversion condition is satisfied.
所述将所述片段的格式转换成与指定设备相匹配的格式之前, 还包 括: Before converting the format of the segment to a format that matches the specified device, the method further includes:
确定与所述指定设备相匹配的转码参数; Determining a transcoding parameter that matches the specified device;
相应地, 所述将所述片段的格式转换成与指定设备相匹配的格式, 具体包括: Correspondingly, the converting the format of the fragment into a format that matches the specified device includes:
将所述片段进行音视频流分离, 得到音频数据流及视频数据流; 对所述音频数据流及视频数据流解码, 得到未压缩音频数据流及未 压缩视频数据流; And separating the audio and video streams to obtain an audio data stream and a video data stream; and decoding the audio data stream and the video data stream to obtain an uncompressed audio data stream and an uncompressed video data stream;
将所述未压缩音频数据流及未压缩视频数据流按照与所述指定设备 相匹配的转码参数进行编码, 得到压缩音频数据流及压缩视频数据流; 将所述压缩音频数据流及压缩视频数据流进行合并, 得到格式与所 述指定设备相匹配的影音文件。 And compressing the uncompressed audio data stream and the uncompressed video data stream according to a transcoding parameter matched with the specified device to obtain a compressed audio data stream and a compressed video data stream; and the compressed audio data stream and the compressed video The data streams are combined to obtain a video file having a format matching the specified device.
所述确定与所述指定设备相匹配的转码参数, 具体包括: The determining the transcoding parameters that match the specified device specifically includes:
提示用户选择指定设备的设备型号, 根据所述用户选择的设备型号 在预先存储的参数数据库中查找与所述指定设备相匹配的转码参数; 或, 提示用户设置转码参数, 将所述用户设置的转码参数确定为与 所述指定设备相匹配的转码参数。 Prompting the user to select a device model of the specified device, searching for a transcoding parameter matching the specified device in a pre-stored parameter database according to the device model selected by the user; or prompting the user to set a transcoding parameter, and the user is The set transcoding parameter is determined to be a transcoding parameter that matches the specified device.
另一方面, 还提供了一种影音文件的下载装置, 所述装置包括: 下载模块, 用于下载用户选择的影音文件的各个片段; In another aspect, a device for downloading a video file is provided, where the device includes: a downloading module, configured to download each segment of a video file selected by a user;
分析模块,用于对所述下载模块下载的各个片段分别进行结构分析; 判断模块, 用于根据所述分析模块的分析结果分别判断各所述片段
是否满足格式转换条件; An analysis module, configured to perform structural analysis on each segment downloaded by the download module, and a determining module, configured to respectively determine each segment according to an analysis result of the analysis module Whether the format conversion condition is satisfied;
转换模块,用于在所述判断模块判断所述片段满足格式转换条件时, 将所述片段的格式转换成与指定设备相匹配的格式。 And a conversion module, configured to: when the determining module determines that the segment satisfies a format conversion condition, convert the format of the segment into a format that matches a specified device.
其中, 所述分析模块, 具体用于根据每个片段识别所述影音文件的 文件类型, 并根据识别出的文件类型对应的结构解析所述每个片段, 得 到所述每个片段的结构信息, 将所述每个片段的结构信息作为所述每个 片段的分析结果。 The analyzing module is specifically configured to identify a file type of the video file according to each segment, and parse each segment according to a structure corresponding to the identified file type, to obtain structural information of each segment. The structural information of each of the segments is taken as the analysis result of each of the segments.
所述判断模块, 具体用于根据各所述片段的结构信息判断所述影音 文件的文件头和文件尾的索引数据是否下载成功, 并根据所述文件头和 文件尾的索引数据判断各所述片段是否为当前待转换片段; 如果所述影 音文件的文件头下载成功, 且根据所述文件头和文件尾的索引数据判断 所述片段为当前待转换片段,则判断所述片段满足格式转换条件; 否贝' J , 判断所述片段未满足格式转换条件; The determining module is configured to determine, according to the structural information of each segment, whether the index data of the file header and the file tail of the video file are successfully downloaded, and determine the foregoing according to the index data of the file header and the file tail. Whether the fragment is the current to-be-converted segment; if the file header of the video file is successfully downloaded, and the segment is determined to be the current to-be-converted segment according to the index data of the file header and the file end, determining that the segment satisfies the format conversion condition ; Nobe ' J , judge that the fragment does not satisfy the format conversion condition;
相应地, 所述装置还包括: Correspondingly, the device further includes:
緩存模块, 用于在所述判断模块判断出所述片段不满足格式转换条 件时, 将未满足格式转换条件的所述片段进行緩存, 直至满足格式转换 条件。 And a buffering module, configured to: when the determining module determines that the segment does not satisfy the format conversion condition, cache the segment that does not satisfy the format conversion condition until the format conversion condition is met.
进一步地, 所述装置, 还包括: Further, the device further includes:
确定模块, 用于在所述转换模块将各所述片段的格式转换成与指定 设备相匹配的格式之前, 确定与所述指定设备相匹配的转码参数; a determining module, configured to determine a transcoding parameter that matches the specified device before the converting module converts a format of each of the segments into a format that matches the specified device;
相应地, 所述转换模块, 具体包括: Correspondingly, the converting module specifically includes:
音视频流分离单元, 用于将所述片段进行音视频流分离, 得到音频 数据流及视频数据流; And an audio and video stream separation unit, configured to separate the audio and video streams, to obtain an audio data stream and a video data stream;
解码单元, 用于对所述音视频流分离单元分离得到的音频数据流及 视频数据流解码, 得到未压缩音频数据流及未压缩视频数据流;
编码单元, 用于将所述解码单元解码得到的未压缩音频数据流及未 压缩视频数据流按照所述确定模块确定的与所述指定设备相匹配的转 码参数进行编码, 得到压缩音频数据流及压缩视频数据流; a decoding unit, configured to decode the audio data stream and the video data stream separated by the audio and video stream separation unit, to obtain an uncompressed audio data stream and an uncompressed video data stream; a coding unit, the uncompressed audio data stream obtained by decoding the decoding unit and the uncompressed video data stream are encoded according to the transcoding parameters determined by the determining module and matched with the designated device, to obtain a compressed audio data stream. And compressing the video data stream;
音视频流合并单元, 用于将所述编码单元编码得到的压缩音频数据 流及压缩视频数据流进行合并, 得到格式与所述指定设备相匹配的影音 文件。 And an audio/video stream merging unit, configured to combine the compressed audio data stream and the compressed video data stream obtained by the coding unit to obtain a video file with a format matching the specified device.
所述确定模块, 具体用于提示用户选择指定设备的设备型号, 根据 所述用户选择的设备型号在预先存储的参数数据库中查找与所述指定 设备相匹配的转码参数; 或, 提示用户设置转码参数, 将所述用户设置 的转码参数确定为与所述指定设备相匹配的转码参数。 The determining module is specifically configured to prompt the user to select a device model of the specified device, and search for a transcoding parameter matching the specified device in the pre-stored parameter database according to the device model selected by the user; or, prompt the user to set Transcoding parameters, the transcoding parameters set by the user are determined as transcoding parameters that match the specified device.
本发明实施例提供的技术方案的有益效果是: The beneficial effects of the technical solutions provided by the embodiments of the present invention are:
通过在下载影音文件时, 同时对其进行格式转换, 使下载的影音文 件能够满足各种用户设备对影音文件的格式要求, 从而消除了下载影音 文件时存在的格式障碍, 且由于无需另外下载格式转换工具, 因而能够 筒化用户操作。 附图简要说明 By downloading the audio and video files and simultaneously converting them, the downloaded video files can meet the format requirements of various user equipments for the audio and video files, thereby eliminating the format obstacles in downloading the audio and video files, and since no additional download format is required. The conversion tool is thus able to streamline user operations. BRIEF DESCRIPTION OF THE DRAWINGS
图 1是本发明实施例一提供的影音文件的下载方法流程图; 图 2是本发明实施例二提供的影音文件的下载方法流程图; 图 3是本发明实施例二提供的转码参数设置示意图; 1 is a flowchart of a method for downloading a video file according to Embodiment 1 of the present invention; FIG. 2 is a flowchart of a method for downloading a video file according to Embodiment 2 of the present invention; FIG. 3 is a parameter setting of transcoding provided by Embodiment 2 of the present invention; Schematic diagram
图 4是本发明实施例三提供的影音文件的下载装置结构示意图; 图 5是本发明实施例三提供的另一种影音文件的下载装置结构示意 图; 4 is a schematic structural diagram of an apparatus for downloading video and audio files according to Embodiment 3 of the present invention; FIG. 5 is a schematic structural diagram of another apparatus for downloading video and audio files according to Embodiment 3 of the present invention;
图 6是本发明实施例三提供的又一种影音文件的下载装置结构示意 图;
图 Ί是本发明实施例三提供的转换模块结构示意图。 实施本发明的方式 为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对 本发明实施方式作进一步地详细描述。 6 is a schematic structural diagram of another apparatus for downloading video and audio files according to Embodiment 3 of the present invention; Figure 结构 is a schematic structural diagram of a conversion module provided in Embodiment 3 of the present invention. The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
实施例一 Embodiment 1
参见图 1 , 本实施例提供了一种影音文件的下载方法, 该方法流程 具体如下: Referring to FIG. 1, the embodiment provides a method for downloading a video file, and the method is specifically as follows:
101: 下载用户选择的影音文件的各个片段, 并对每个片段进行结构 分析; 101: download each segment of the video file selected by the user, and perform structural analysis on each segment;
102: 根据分析结果判断每个片段是否满足格式转换条件; 102: Determine, according to the analysis result, whether each segment satisfies a format conversion condition;
103: 在每个片段满足格式转换条件时,将每个片段的格式转换成与 指定设备相匹配的格式。 103: When each segment satisfies the format conversion condition, the format of each segment is converted into a format that matches the specified device.
本实施例提供的影音文件下载方法, 通过在用户设备下载影音文件 时, 同时对其进行格式转换, 使下载的影音文件满足该用户设备对影音 文件的格式要求, 从而消除了下载影音文件时存在的格式障碍, 且由于 无需另外下载格式转换工具, 因而能够筒化用户操作。 The method for downloading video and audio files provided by this embodiment is to perform format conversion on the user equipment when the user equipment downloads the video file, so that the downloaded video file satisfies the format requirement of the user equipment for the video file, thereby eliminating the existence of downloading the video file. The format is cumbersome, and since there is no need to download a separate format conversion tool, the user operation can be managed.
实施例二 Embodiment 2
本实施例提供了一种影音文件的下载方法, 该方法在将影音文件的 各个片段下载后, 直接将每个片段的格式转换成与指定设备相匹配的格 式, 从而消除下载影音文件时存在的格式障碍。 参见图 2, 本实施例提 供的影音文件的下载方法流程具体如下: The embodiment provides a method for downloading a video file. After downloading each segment of the video file, the method directly converts the format of each segment into a format that matches the specified device, thereby eliminating the existence of the video file. Format barrier. Referring to FIG. 2, the flow of downloading the audio and video file provided in this embodiment is as follows:
201: 下载用户选择的影音文件的各个片段, 并对每个片段进行结构 分析; 201: download each segment of the video file selected by the user, and perform structural analysis on each segment;
针对该步骤, 为了下载用户期望的影音文件, 本实施例提供的影音
文件的下载方法可为用户提供搜索影音资源的入口, 由用户通过该搜索 影音资源的入口查找并选择想要下载的影音文件, 在根据用户的选择添 加下载任务之后开始下载影音文件。 本实施例不对具体的下载方式进行 限定, 由于现有的下载方式一般都采用 P2P ( Peer-to-Peer, 点对点)技 术, 下载时会对影音文件进行分片, 例如, 以 512KB大小为基本单元对 影音文件进行切分, 并且不会严格按照影音文件切分的片段顺序来下 载, 而是以乱序的方式下载影音文件的各个片段。 For this step, in order to download the video file desired by the user, the video and audio provided by this embodiment The downloading method of the file may provide the user with an entrance for searching for the audio and video resources, and the user searches for and selects the video and audio file to be downloaded through the entrance of the searched audio and video resource, and starts downloading the video and audio file after adding the downloading task according to the user's selection. In this embodiment, the specific download mode is not limited. Since the existing download mode generally adopts P2P (Peer-to-Peer) technology, the video file is sliced when downloaded, for example, the basic unit is 512 KB. The audio and video files are segmented, and are not downloaded in strict accordance with the segment sequence of the video file segmentation, but the segments of the video file are downloaded in an out-of-order manner.
在将影音文件的各个片段下载之后, 为了能够成功对其进行格式转 换, 需要对每个片段进行结构分析。 进行结构分析时, 可先根据每个片 段识别出影音文件的文件类型, 并根据识别出的文件类型对应的结构解 析每个片段, 得到每个片段的结构信息, 每个片段的结构信息即为分析 结果。 After downloading the various segments of the video file, in order to successfully convert the format, a structural analysis of each segment is required. When performing structural analysis, the file type of the video file may be identified according to each segment, and each segment is parsed according to the structure corresponding to the identified file type, and the structural information of each segment is obtained, and the structural information of each segment is Analysis results.
关于如何根据每个片段识别影音文件的文件类型, 本实施例不作具 体限定。 具体可以通过每个片段的文件后缀名或文件类型标识字节来识 别。 例如, rmvb 类型文件在文件开头的三个文件类型标识字节是字符 "RMF"。 Regarding how to identify the file type of the video file according to each segment, this embodiment is not specifically limited. This can be identified by the file suffix name or file type identification byte of each fragment. For example, the three file type identification bytes of the rmvb type file at the beginning of the file are the characters "RMF".
根据识别出的文件类型对应的结构解析每个片段时, 可根据影音文 件的文件类型所对应的文件结构规范来进行片段的结构解析。 不同文件 类型的影音文件对应不同的结构。 一般的影音文件的结构均包括文件头 的描述信息 (HEAD )、 文件中的音视频数据 (DATA )和文件尾的索引 数据 (INDX )三个部分。 文件头描述了文件的总体信息, 包括但不限 于文件时长、 文件中音视频流的数量、 音视频流的详细信息等; 文件尾 的索引数据描述了文件数据块的位置信息, 比如第 N个片段对应的文件 地址等。文件头的描述信息和文件尾的索引数据一般较短,例如, RMVB 文件大约具有 512KB 左右的头尾数据。 通过对每个片段的结构进行解
析, 即可判断出影音文件的各个部分是否已经下载完成。 When each segment is parsed according to the structure corresponding to the identified file type, the structure of the segment can be parsed according to the file structure specification corresponding to the file type of the video file. Video files of different file types correspond to different structures. The structure of a general video file includes three parts: description information (HEAD) of the file header, audio and video data (DATA) in the file, and index data (INDX) at the end of the file. The file header describes the overall information of the file, including but not limited to the file duration, the number of audio streams in the file, the detailed information of the audio and video streams, etc.; the index data at the end of the file describes the location information of the file data block, such as the Nth The file address corresponding to the fragment, and so on. The description information of the file header and the index data at the end of the file are generally short. For example, the RMVB file has about 512 KB of head and tail data. By solving the structure of each fragment Analysis, you can determine whether the various parts of the video file have been downloaded.
202: 根据分析结果判断每个片段是否满足格式转换条件, 如果否, 则执行步骤 203 , 否则, 执行步骤 204; 202: Determine, according to the analysis result, whether each segment satisfies the format conversion condition, if not, execute step 203, otherwise, perform step 204;
具体地, 由于影音文件的各个片段是以乱序的方式来下载的, 而进 行格式转换需要按照各个片段在影音文件中的排列顺序进行转换, 即需 要从影音文件的第一个片段开始转换, 即使其他片段已经下载完毕, 但 如果第一个片段还未成功下载到本地, 仍然需要等待, 直至第一个片段 下载完成, 并对该第一个片段进行格式转换之后, 才能对其他片段依次 进行格式转换。 因此, 对每个片段进行格式转换时, 需要保证每个待进 行格式转换的片段依次为当前待转换片段。 Specifically, since each segment of the video file is downloaded in an out-of-order manner, the format conversion needs to be converted according to the order in which the segments are arranged in the video file, that is, the first segment of the video file needs to be converted. Even if other clips have already been downloaded, if the first clip has not been successfully downloaded to the local, it still needs to wait until the first clip is downloaded and the first clip is formatted before the other clips can be sequentially processed. Format conversion. Therefore, when performing format conversion on each segment, it is necessary to ensure that each segment to be format converted is the current segment to be converted.
当前待转换片段的确定是按照一定次序的, 虽然各个片段下载时是 乱序的, 但由于文件头描述了文件时长以及文件中音视频流的详细信息 等, 文件尾的索引数据描述了文件片段的位置信息, 因而可根据文件头 及文件尾的索引数据得出每个片段在影音文件中的顺序, 根据每个片段 在影音文件中的顺序即可判断出每个待进行格式转换的片段依次是否 为当前待转换片段。 The determination of the currently to-be-converted segments is in a certain order. Although the segments are downloaded out of order, since the file header describes the file duration and the detailed information of the audio stream in the file, the index data at the end of the file describes the file segment. The position information, so the order of each segment in the video file can be obtained according to the index data of the file header and the file end. According to the order of each segment in the video file, it can be determined that each segment to be format converted is sequentially Whether it is the current segment to be converted.
也就是说, 格式转换条件除了要求影音文件的文件头和文件尾的索 引数据下载成功, 还要求根据文件头和文件尾的索引数据能够判断出待 进行格式转换的片段为当前待转换片段。 则根据分析结果判断每个片段 是否满足格式转换条件时, 首先需要根据每个片段的结构信息判断影音 文件的文件头和文件尾的索引数据是否下载成功, 并根据文件头和文件 尾的索引数据判断每个待进行格式转换的片段依次是否为当前待转换 片段; 如果影音文件的文件头和文件尾的索引数据下载成功, 且根据文 件头和文件尾的索引数据判断每个待进行格式转换的片段依次为当前 待转换片段, 则判断每个片段满足格式转换条件; 否则, 判断每个片段
未满足格式转换条件。 That is to say, the format conversion condition requires that the index data of the file header and the file end of the video file be downloaded successfully, and it is also required to determine, according to the index data of the file header and the file end, that the fragment to be format converted is the current to-be-converted segment. Then, according to the analysis result, whether each segment satisfies the format conversion condition, firstly, according to the structure information of each segment, it is determined whether the file header and the file end index data of the video file are successfully downloaded, and according to the index data of the file header and the file tail. Determining whether each segment to be format-converted is the current segment to be converted; if the index data of the file header and the file end of the video file is successfully downloaded, and determining the format conversion to be performed according to the index data of the file header and the file tail The segments are sequentially the segments to be converted, and then each segment is judged to satisfy the format conversion condition; otherwise, each segment is judged. The format conversion condition is not met.
以当前下载的片段为影音文件的第 5片段为例, 如果根据下载的各 个片段的结构信息判断出影音文件的文件头和文件尾的索引数据还未 下载成功, 即意味着乱序下载的各个片段的顺序还未确定, 因而得出所 有已下载的片段都未满足格式转换条件; 另外, 即使判断出影音文件的 文件头和文件尾的索引数据均下载成功, 但如果待进行格式转换的片段 即当前待转换片段为第 4片段, 即第 4片段还未成功进行格式转换, 则 仍判断下一待进行格式转换的第 5片段不满足格式转换条件; 仅当判断 出影音文件的文件头和文件尾的索引数据均下载成功, 且第 4片段已成 功进行格式转换, 而当前待转换片段恰为第 5片段时, 才可判断得出该 第 5片段满足格式转换条件。 Taking the currently downloaded segment as the fifth segment of the video file, if it is determined according to the structure information of each segment downloaded, the index data of the file header and the file end of the video file has not been successfully downloaded, which means that each of the out-of-order downloads is downloaded. The order of the fragments has not been determined, so that all the downloaded fragments do not satisfy the format conversion condition; in addition, even if it is judged that the index data of the file header and the file end of the video file are successfully downloaded, if the format to be converted is That is, the current to-be-converted segment is the fourth segment, that is, the fourth segment has not been successfully formatted, and it is still determined that the fifth segment to be format-converted does not satisfy the format conversion condition; only when the file header of the video file is determined The index data at the end of the file is successfully downloaded, and the fourth segment has been successfully formatted, and the current segment to be converted is just the fifth segment, and it can be judged that the fifth segment satisfies the format conversion condition.
203: 将不满足格式转换条件的片段进行緩存, 直至满足格式转换条 件之后, 执行步骤 204; 203: Cache the fragment that does not meet the format conversion condition, and after the format conversion condition is met, perform step 204;
针对该步骤, 如果当前片段不满足转换条件, 需要将其进行緩存, 直至满足格式转换条件, 即依次等待当前待转换片段为该片段时, 再继 续对其进行格式转换, 从而继续执行后续步骤 204。 以当前待转换片段 为影音文件中的第 5片段为例, 如果在第 5片段未下载成功时, 第 6片 段已经下载完毕, 则该第 6片段由于不是当前待转换片段, 因而需要先 进行緩存, 直至第 5片段下载完毕, 并成功对第 5片段进行格式转换之 后, 该第 6片段才满足格式转换条件。 For this step, if the current segment does not satisfy the conversion condition, it needs to be cached until the format conversion condition is satisfied, that is, when the current to-be-converted segment is sequentially selected as the segment, and then the format conversion is continued, thereby continuing to perform the subsequent step 204. . For example, if the current segment to be converted is the fifth segment in the video file, if the sixth segment has been downloaded after the fifth segment is not successfully downloaded, the sixth segment needs to be cached because it is not the current segment to be converted. After the 5th fragment is downloaded and the 5th fragment is successfully formatted, the 6th fragment satisfies the format conversion condition.
204:将满足格式转换条件的片段的格式转换成与指定设备相匹配的 格式。 204: Convert the format of the fragment that satisfies the format conversion condition to a format that matches the specified device.
具体地, 为了将片段的格式转换成与指定设备相匹配的格式, 本实 施例提供的影音文件的下载方法在进行格式转换操作之前, 需要确定与 指定设备相匹配的转码参数。 具体实现时, 可预先存储不同型号的设备
对应的转码参数, 并以参数数据库的形式进行不同型号的设备对应的转 码参数存储之后, 提示用户选择指定设备的设备型号, 根据用户选择的 设备型号在预先存储的参数数据库中查找与该指定设备相匹配的转码 参数。 以图 3所示的转码参数设置选择界面为例, 提示用户选择希望把 影音文件下载到什么型号的设备上。 根据用户输入的设备型号, 在参数 数据库中查找对应的转码参数。 转码参数包括但不限于转码输出的文件 类型、 视频分辨率、 视频帧率、 视频编码类型、 音频编码类型、 视频码 率和音频码率等, 本实施例不对转码参数的具体内容进行限定。 仍以图 3 所示的转码参数为例, 转码参数中的文件类型为 MP4、 视频分辨率 640x360、视频帧率 15fps、 视频编码类型 MPEG4、 音频编码类型 AAC、 视频码率 768kbps和音频码率 64kbps等。 Specifically, in order to convert the format of the segment into a format that matches the specified device, the method for downloading the video file provided in this embodiment needs to determine a transcoding parameter that matches the specified device before performing the format conversion operation. In the specific implementation, different types of devices can be pre-stored. Corresponding transcoding parameters, and storing the transcoding parameters corresponding to different types of devices in the form of a parameter database, prompting the user to select the device model of the specified device, and searching for the device in the pre-stored parameter database according to the device model selected by the user. Specifies the transcoding parameters that the device matches. Taking the transcoding parameter setting selection interface shown in FIG. 3 as an example, the user is prompted to select the device on which the video file is desired to be downloaded. Find the corresponding transcoding parameters in the parameter database according to the device model entered by the user. The transcoding parameters include, but are not limited to, the file type of the transcoded output, the video resolution, the video frame rate, the video encoding type, the audio encoding type, the video bit rate, and the audio bit rate. The specific content of the transcoding parameter is not performed in this embodiment. limited. Still taking the transcoding parameter shown in Figure 3 as an example, the file type in the transcoding parameter is MP4, video resolution 640x360, video frame rate 15fps, video encoding type MPEG4, audio encoding type AAC, video bit rate 768kbps, and audio code. Rate 64kbps and so on.
如果预先未存储不同型号的设备对应的转码参数, 则可以提示用户 设置转码参数, 并将用户设置的转码参数确定为与指定设备相匹配的转 码参数, 即由用户手动完成转码参数的设置。 If the transcoding parameters corresponding to different types of devices are not stored in advance, the user may be prompted to set a transcoding parameter, and the transcoding parameter set by the user is determined as a transcoding parameter that matches the specified device, that is, the user manually performs transcoding. The setting of the parameters.
除上述两种确定转码参数的方式外, 还可以选择其它方式, 本实施 例对此不作具体限定。 确定与指定设备相匹配的转码参数之后, 将每个 片段的格式转换成与指定设备相匹配的格式时, 具体包括: In addition to the above two methods for determining the transcoding parameters, other methods may be selected, which are not specifically limited in this embodiment. After determining the transcoding parameters that match the specified device, and converting the format of each segment to a format that matches the specified device, specifically:
依次将每个片段进行音视频流分离,得到音频数据流及视频数据流; 对音频数据流及视频数据流解码, 得到未压缩音频数据流及未压缩 视频数据流; The audio and video streams are separated in turn to obtain an audio data stream and a video data stream; and the audio data stream and the video data stream are decoded to obtain an uncompressed audio data stream and an uncompressed video data stream;
将未压缩音频数据流及未压缩视频数据流按照与指定设备相匹配的 转码参数进行编码, 得到压缩音频数据流及压缩视频数据流; Encoding the uncompressed audio data stream and the uncompressed video data stream according to a transcoding parameter matching the specified device to obtain a compressed audio data stream and a compressed video data stream;
将压缩音频数据流及压缩视频数据流进行合并, 得到格式与指定设 备相匹配的影音文件。 The compressed audio data stream and the compressed video data stream are combined to obtain a video file whose format matches the specified device.
由于音视频流分离、 解码、 编码及合并均在现有技术中实现, 本实
施例对此不作具体限定, 且不再赘述。 在将压缩音视频数据流合并, 得 到格式与指定设备相匹配的影音文件之后, 指定设备可直接进行影音文 件的播放, 而无需再另外下载格式转换工具, 因而能够筒化用户操作。 Since audio and video streams are separated, decoded, encoded, and combined, they are implemented in the prior art. The embodiment is not specifically limited, and will not be described again. After the compressed audio and video data streams are combined to obtain a video file whose format matches the specified device, the designated device can directly play the video file without having to download the format conversion tool, thereby enabling the user to operate.
需要说明的是, 本实施例提供的影音文件的下载方法可在将影音文 件的所有片段均下载之后, 再对所有片段依次或同时进行格式转换。 但 为了节省时间, 本实施例提供的影音文件的下载方法也可以不要求格式 转换需要按照各个片段在影音文件中的排列顺序进行转换, 即在每下载 一个片段时, 对下载成功的片段分别执行格式转换, 而无需等待将影音 文件的所有片段下载之后再进行格式转换, 还可以采取其他转换策略, 本实施例不对具体的转换策略进行限定。 It should be noted that the method for downloading a video file provided by this embodiment may perform format conversion on all segments sequentially or simultaneously after all segments of the video file are downloaded. However, in order to save time, the method for downloading the video file provided by the embodiment may not require the format conversion to be converted according to the order of the segments in the video file, that is, each time a segment is downloaded, the segment successfully downloaded is separately executed. The format conversion does not need to wait for all the segments of the video file to be downloaded and then format conversion. Other conversion strategies can also be adopted. This embodiment does not limit the specific conversion strategy.
本实施例提供的影音文件的下载方法, 通过在下载影音文件时, 同 时对其进行格式转换, 使下载的影音文件满足各种设备对影音文件的格 式要求, 从而消除了下载影音文件时存在的格式障碍, 且由于无需另外 下载格式转换工具, 因而能够筒化用户操作。 The method for downloading a video file provided by the embodiment, by downloading the video file at the same time, and simultaneously converting the video file, so that the downloaded video file satisfies the format requirements of the audio and video files of various devices, thereby eliminating the existence of the video file when downloading the video file. The format is cumbersome, and since there is no need to download a separate format conversion tool, the user operation can be managed.
实施例三 Embodiment 3
参见图 4, 本实施例提供了一种影音文件的下载装置, 该装置包括: 下载模块 401 , 用于下载用户选择的影音文件的各个片段; 分析模块 402, 用于对下载模块 401下载的每个片段进行结构分析; 判断模块 403 , 用于根据分析模块 402的分析结果判断每个片段是 否满足格式转换条件; Referring to FIG. 4, the embodiment provides a downloading device for video and audio files, and the device includes: a downloading module 401, configured to download each segment of a video file selected by a user; and an analyzing module 402, configured to download the downloading module 401. The segment is subjected to structural analysis; the determining module 403 is configured to determine, according to the analysis result of the analyzing module 402, whether each segment satisfies a format conversion condition;
转换模块 404, 用于在判断模块 403判断每个片段满足格式转换条 件时, 将每个片段的格式转换成与指定设备相匹配的格式。 The conversion module 404 is configured to convert the format of each segment into a format that matches the specified device when the determining module 403 determines that each segment satisfies the format conversion condition.
其中, 分析模块 402, 具体用于根据每个片段识别影音文件的文件 类型, 并根据识别出的文件类型对应的结构解析每个片段, 得到每个片 段的结构信息, 将每个片段的结构信息作为分析结果。
判断模块 403 , 具体用于根据每个片段的结构信息判断影音文件的 文件头和文件尾的索引数据是否下载成功, 并根据文件头和文件尾的索 引数据判断每个片段是否为当前待转换片段; 如果影音文件的文件头和 文件尾的索引数据下载成功, 且根据文件头和文件尾的索引数据判断每 个片段为当前待转换片段, 则判断每个片段满足格式转换条件; 否则, 判断每个片段未满足格式转换条件; The analyzing module 402 is specifically configured to identify a file type of the audio and video file according to each segment, and parse each segment according to the structure corresponding to the identified file type, to obtain structural information of each segment, and to construct structure information of each segment. As a result of the analysis. The determining module 403 is specifically configured to determine, according to the structure information of each segment, whether the file header and the file end of the video file are successfully downloaded, and determine whether each segment is the current to be converted according to the index data of the file header and the file tail. If the index data of the file header and the file end of the video file is successfully downloaded, and each segment is judged to be the currently to be converted according to the index data of the file header and the file end, it is judged that each segment satisfies the format conversion condition; otherwise, each judgment is judged; Segments do not satisfy the format conversion condition;
相应地, 参见图 6, 该装置还包括: Accordingly, referring to Figure 6, the device further includes:
緩存模块 405 , 用于在判断模块 403判断出每个片段不满足格式转 换条件时, 将未满足格式转换条件的片段进行緩存, 直至满足格式转换 条件。 The cache module 405 is configured to: when the determining module 403 determines that each segment does not satisfy the format conversion condition, cache the segment that does not satisfy the format conversion condition until the format conversion condition is satisfied.
进一步地, 参见图 7 , 该装置还包括: Further, referring to FIG. 7, the apparatus further includes:
确定模块 406, 用于在转换模块 404将每个片段的格式转换成与指 定设备相匹配的格式之前, 确定与指定设备相匹配的转码参数; a determining module 406, configured to determine, after the converting module 404 converts the format of each segment into a format that matches the specified device, determining a transcoding parameter that matches the specified device;
相应地, 转换模块 404, 具体包括: Correspondingly, the conversion module 404 specifically includes:
音视频流分离单元 404a, 用于将每个片段进行音视频流分离, 得到 音频数据流及视频数据流; The audio and video stream separation unit 404a is configured to separate each segment into an audio and video stream to obtain an audio data stream and a video data stream;
解码单元 404b, 用于对音视频流分离单元 404a分离得到的音频数 据流及视频数据流解码, 得到未压缩音频数据流及未压缩视频数据流; 编码单元 404c, 用于将解码单元 404b解码得到的未压缩音频数据 流及未压缩视频数据流按照确定模块确定的与指定设备相匹配的转码 参数进行编码, 得到压缩音频数据流及压缩视频数据流; The decoding unit 404b is configured to decode the audio data stream and the video data stream separated by the audio-video stream separation unit 404a to obtain an uncompressed audio data stream and an uncompressed video data stream. The encoding unit 404c is configured to decode the decoding unit 404b. The uncompressed audio data stream and the uncompressed video data stream are encoded according to a transcoding parameter determined by the determining module and matched with the specified device, to obtain a compressed audio data stream and a compressed video data stream;
音视频流合并单元 404d, 用于将编码单元 404c编码得到的压缩音 频数据流及压缩视频数据流进行合并, 得到格式与指定设备相匹配的影 音文件。 The audio and video stream merging unit 404d is configured to combine the compressed audio data stream and the compressed video data stream obtained by the encoding unit 404c to obtain a video file whose format matches the specified device.
需要说明的是, 为了节省时间, 可以对影音文件的各个片段同时进
行格式转换, 则本实施例提供的装置可以包括多个转换模块 404, 或是 一个转换模块 404中包括多个解码单元 404b和编码单元 404c, 或是采 取其它方式, 本实施例对此不作具体限定。 It should be noted that in order to save time, various segments of the audio and video files can be simultaneously entered. For the line format conversion, the apparatus provided in this embodiment may include multiple conversion modules 404, or one conversion module 404 may include multiple decoding units 404b and coding units 404c, or may adopt other manners. limited.
其中, 确定模块 406, 具体用于提示用户选择指定设备的设备型号, 根据用户选择的设备型号在预先存储的参数数据库中查找与指定设备 相匹配的转码参数; 或, 提示用户设置转码参数, 将用户设置的转码参 数确定为与指定设备相匹配的转码参数。 The determining module 406 is specifically configured to prompt the user to select a device model of the specified device, and search for a transcoding parameter matching the specified device in the pre-stored parameter database according to the device model selected by the user; or, prompt the user to set the transcoding parameter. , the user-set transcoding parameter is determined as a transcoding parameter that matches the specified device.
综上所述, 本实施例提供的影音文件的下载装置, 通过在下载影音 文件时, 同时对其进行格式转换, 使下载的影音文件满足各种设备对影 音文件的格式要求, 从而消除了下载影音文件时存在的格式障碍, 且由 于无需另外下载格式转换工具, 因而能够筒化用户操作。 In summary, the downloading device for video and audio files provided by this embodiment eliminates the download by satisfying the format requirements of the audio and video files of various devices by downloading the video files at the same time. The format barrier exists in video files, and since there is no need to download a separate format conversion tool, user operations can be managed.
需要说明的是, 上述实施例提供的影音文件的下载装置在下载影音 文件时, 仅以上述各功能模块的划分进行举例说明, 实际应用中, 可以 根据需要而将上述功能分配由不同的功能模块完成, 即将装置的内部结 构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外, 上述实施例提供的影音文件的下载装置与影音文件的下载方法实施例 属于同一构思, 其具体实现过程详见方法实施例, 这里不再赘述。 It should be noted that, when downloading a video file, the downloading device of the audio and video file in the foregoing embodiment is only illustrated by the division of each functional module. In actual applications, the function may be assigned to different functional modules according to needs. Upon completion, the internal structure of the device is divided into different functional modules to perform all or part of the functions described above. In addition, the downloading device of the audio-visual file provided by the foregoing embodiment is the same as the embodiment of the method for downloading the audio-visual file. For the specific implementation process, refer to the method embodiment, and details are not described herein again.
上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。 The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本发明实施例中的全部或部分步骤, 可以利用软件实现, 相应的软 件程序可以存储在可读取的存储介质中, 如光盘或硬盘等。 All or part of the steps in the embodiment of the present invention may be implemented by software, and the corresponding software program may be stored in a readable storage medium such as an optical disk or a hard disk.
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本 发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包 含在本发明的保护范围之内。
The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.
Claims
1、 一种影音文件的下载方法, 其特征在于, 所述方法包括: 下载用户选择的影音文件的各个片段, 并对下载的各片段分别进行 结构分析; A method for downloading a video file, the method comprising: downloading each segment of a video file selected by a user, and performing structural analysis on each downloaded segment;
根据分析结果分别判断各所述片段是否满足格式转换条件; 在所述片段满足格式转换条件时, 将所述片段的格式转换成与指定 设备相匹配的格式。 It is judged according to the analysis result whether each of the segments satisfies the format conversion condition; when the segment satisfies the format conversion condition, the format of the segment is converted into a format that matches the specified device.
2、 根据权利要求 1所述的方法, 其特征在于, 所述对下载的各片段 分别进行结构分析, 具体包括: The method according to claim 1, wherein the performing structural analysis on each of the downloaded segments comprises:
根据每个片段识别所述影音文件的文件类型, 并根据识别出的文件 类型对应的结构解析所述每个片段, 得到所述每个片段的结构信息, 将 所述每个片段的结构信息作为所述每个片段的分析结果。 Identifying a file type of the video file according to each segment, and parsing each segment according to a structure corresponding to the identified file type, obtaining structural information of each segment, and using the structure information of each segment as The analysis results of each fragment.
3、 根据权利要求 2所述的方法, 其特征在于, 所述根据分析结果分 别判断各所述片段是否满足格式转换条件, 具体包括: The method according to claim 2, wherein the determining, according to the analysis result, whether each of the segments satisfies a format conversion condition, specifically includes:
根据各所述片段的结构信息判断所述影音文件的文件头和文件尾的 索引数据是否下载成功, 并根据所述文件头和文件尾的索引数据判断各 所述片段是否为当前待转换片段; Determining, according to the structural information of each of the segments, whether the index data of the file header and the file end of the video file is successfully downloaded, and determining, according to the index data of the file header and the file end, whether each segment is a current to-be-converted segment;
如果所述影音文件的文件头和文件尾的索引数据下载成功, 且根据 所述文件头和文件尾的索引数据判断所述片段为当前待转换片段, 则判 断所述片段满足格式转换条件; 否则, 判断所述片段未满足格式转换条 件; If the index data of the file header and the file end of the video file is successfully downloaded, and the segment is determined to be the current to-be-converted segment according to the index data of the file header and the file end, the segment is determined to satisfy the format conversion condition; otherwise , determining that the segment does not satisfy the format conversion condition;
相应地, 判断所述片段未满足格式转换条件之后, 还包括: 将未满足格式转换条件的所述片段进行緩存, 直至满足格式转换条 件。 Correspondingly, after determining that the segment does not satisfy the format conversion condition, the method further includes: buffering the segment that does not satisfy the format conversion condition until the format conversion condition is satisfied.
4、 根据权利要求 1所述的方法, 其特征在于, 所述将所述片段的 格式转换成与指定设备相匹配的格式之前, 还包括: 4. The method according to claim 1, wherein said said segment Before the format is converted to a format that matches the specified device, it also includes:
确定与所述指定设备相匹配的转码参数; Determining a transcoding parameter that matches the specified device;
相应地, 所述将所述片段的格式转换成与指定设备相匹配的格式, 具体包括: Correspondingly, the converting the format of the fragment into a format that matches the specified device includes:
将所述片段进行音视频流分离, 得到音频数据流及视频数据流; 对所述音频数据流及视频数据流解码, 得到未压缩音频数据流及未 压缩视频数据流; And separating the audio and video streams to obtain an audio data stream and a video data stream; and decoding the audio data stream and the video data stream to obtain an uncompressed audio data stream and an uncompressed video data stream;
将所述未压缩音频数据流及未压缩视频数据流按照与所述指定设备 相匹配的转码参数进行编码, 得到压缩音频数据流及压缩视频数据流; 将所述压缩音频数据流及压缩视频数据流进行合并, 得到格式与所 述指定设备相匹配的影音文件。 And compressing the uncompressed audio data stream and the uncompressed video data stream according to a transcoding parameter matched with the specified device to obtain a compressed audio data stream and a compressed video data stream; and the compressed audio data stream and the compressed video The data streams are combined to obtain a video file having a format matching the specified device.
5、 根据权利要求 4所述的方法, 其特征在于, 所述确定与所述指定 设备相匹配的转码参数, 具体包括: The method according to claim 4, wherein the determining the transcoding parameter that matches the specified device comprises:
提示用户选择指定设备的设备型号, 根据所述用户选择的设备型号 在预先存储的参数数据库中查找与所述指定设备相匹配的转码参数; 或, 提示用户设置转码参数, 将所述用户设置的转码参数确定为与 所述指定设备相匹配的转码参数。 Prompting the user to select a device model of the specified device, searching for a transcoding parameter matching the specified device in a pre-stored parameter database according to the device model selected by the user; or prompting the user to set a transcoding parameter, and the user is The set transcoding parameter is determined to be a transcoding parameter that matches the specified device.
6、 一种影音文件的下载装置, 其特征在于, 所述装置包括: 下载模块, 用于下载用户选择的影音文件的各个片段; 6. A device for downloading audio and video files, the device comprising: a downloading module, configured to download each segment of a video file selected by a user;
分析模块,用于对所述下载模块下载的各个片段分别进行结构分析; 判断模块, 用于根据所述分析模块的分析结果分别判断各所述片段 是否满足格式转换条件; An analysis module, configured to perform structural analysis on each segment downloaded by the downloading module, and a determining module, configured to determine, according to the analysis result of the analyzing module, whether each of the segments meets a format conversion condition;
转换模块,用于在所述判断模块判断所述片段满足格式转换条件时, 将所述片段的格式转换成与指定设备相匹配的格式。 And a conversion module, configured to: when the determining module determines that the segment satisfies a format conversion condition, convert the format of the segment into a format that matches a specified device.
7、 根据权利要求 6所述的装置, 其特征在于, 所述分析模块, 具体 用于根据每个片段识别所述影音文件的文件类型 , 并根据识别出的文件 类型对应的结构解析所述每个片段, 得到所述每个片段的结构信息, 将 所述每个片段的结构信息作为所述每个片段的分析结果。 7. The apparatus according to claim 6, wherein the analysis module is specific And identifying a file type of the video file according to each segment, and parsing each segment according to a structure corresponding to the identified file type, obtaining structural information of each segment, and constructing the structure of each segment Information is used as the analysis result of each of the segments.
8、 根据权利要求 7所述的装置, 其特征在于, 所述判断模块, 具体 用于根据各所述片段的结构信息判断所述影音文件的文件头和文件尾 的索引数据是否下载成功, 并根据所述文件头和文件尾的索引数据判断 各所述片段是否为当前待转换片段; 如果所述影音文件的文件头和文件 尾的索引数据下载成功, 且根据所述文件头和文件尾的索引数据判断所 述片段为当前待转换片段, 则判断所述片段满足格式转换条件; 否则, 判断所述片段未满足格式转换条件; The device according to claim 7, wherein the determining module is configured to determine, according to structural information of each segment, whether the index data of the file header and the file tail of the video file is successfully downloaded, and Determining, according to the index data of the file header and the file end, whether each of the segments is a current to-be-converted segment; if the index data of the file header and the file tail of the video file is successfully downloaded, and according to the file header and the file tail The index data determines that the segment is the current to-be-converted segment, and then determines that the segment satisfies the format conversion condition; otherwise, determines that the segment does not satisfy the format conversion condition;
相应地, 所述装置还包括: Correspondingly, the device further includes:
緩存模块, 用于在所述判断模块判断出所述片段未满足格式转换条 件时, 将未满足格式转换条件的所述片段进行緩存, 直至满足格式转换 条件。 The cache module is configured to: when the determining module determines that the segment does not satisfy the format conversion condition, cache the segment that does not satisfy the format conversion condition until the format conversion condition is met.
9、 根据权利要求 6所述的装置, 其特征在于, 所述装置, 还包括: 确定模块, 用于在所述转换模块将各所述片段的格式转换成与指定 设备相匹配的格式之前, 确定与所述指定设备相匹配的转码参数; The device according to claim 6, wherein the device further comprises: a determining module, configured to: before the converting module converts a format of each segment into a format that matches a specified device, Determining a transcoding parameter that matches the specified device;
相应地, 所述转换模块, 具体包括: Correspondingly, the converting module specifically includes:
音视频流分离单元, 用于将所述片段进行音视频流分离, 得到音频 数据流及视频数据流; And an audio and video stream separation unit, configured to separate the audio and video streams, to obtain an audio data stream and a video data stream;
解码单元, 用于对所述音视频流分离单元分离得到的音频数据流及 视频数据流解码, 得到未压缩音频数据流及未压缩视频数据流; a decoding unit, configured to decode the audio data stream and the video data stream separated by the audio and video stream separation unit, to obtain an uncompressed audio data stream and an uncompressed video data stream;
编码单元, 用于将所述解码单元解码得到的未压缩音频数据流及未 压缩视频数据流按照所述确定模块确定的与所述指定设备相匹配的转 码参数进行编码, 得到压缩音频数据流及压缩视频数据流; 音视频流合并单元, 用于将所述编码单元编码得到的压缩音频数据 流及压缩视频数据流进行合并, 得到格式与所述指定设备相匹配的影音 文件。 a coding unit, the uncompressed audio data stream obtained by decoding the decoding unit and the uncompressed video data stream are encoded according to the transcoding parameters determined by the determining module and matched with the designated device, to obtain a compressed audio data stream. And compressing the video data stream; And an audio/video stream merging unit, configured to combine the compressed audio data stream and the compressed video data stream obtained by the coding unit to obtain a video file with a format matching the specified device.
10、 根据权利要求 9所述的装置, 其特征在于, 所述确定模块, 具 体用于提示用户选择指定设备的设备型号, 根据所述用户选择的设备型 号在预先存储的参数数据库中查找与所述指定设备相匹配的转码参数; 或, 提示用户设置转码参数, 将所述用户设置的转码参数确定为与所述 指定设备相匹配的转码参数。 The device according to claim 9, wherein the determining module is specifically configured to prompt the user to select a device model of the designated device, and search for a location in the pre-stored parameter database according to the device model selected by the user. Deriving a transcoding parameter that matches the specified device; or, prompting the user to set a transcoding parameter, and determining the transcoding parameter set by the user as a transcoding parameter that matches the specified device.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010272312.X | 2010-09-01 | ||
CN201010272312.XA CN102387177B (en) | 2010-09-01 | 2010-09-01 | Method and device for downloading audio-visual files |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2012028096A1 true WO2012028096A1 (en) | 2012-03-08 |
Family
ID=45772166
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2011/079149 WO2012028096A1 (en) | 2010-09-01 | 2011-08-31 | Method and apparatus for downloading audio-video file |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102387177B (en) |
WO (1) | WO2012028096A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105573922B (en) * | 2014-11-07 | 2020-07-10 | 中兴通讯股份有限公司 | Method and device for realizing data format conversion |
CN105760376B (en) * | 2014-12-15 | 2019-04-02 | 深圳Tcl数字技术有限公司 | Method and device for extracting meta information of multimedia file |
CN106686443A (en) * | 2015-11-10 | 2017-05-17 | 中兴通讯股份有限公司 | Media playback method, media playback terminal and media playback system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020023081A1 (en) * | 2000-08-15 | 2002-02-21 | Bazan Silvia L. | System and method for providing medical information via the internet without the need for broadband connectivity |
CN1813251A (en) * | 2004-03-22 | 2006-08-02 | 网飞亚技术公司 | A streaming based contents distribution network system and methods for splitting, merging and retrieving files |
CN101299702A (en) * | 2008-06-06 | 2008-11-05 | 厦门时迅信息科技有限公司 | Multimedia information wireless network transmission system and method supporting interaction |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9225761B2 (en) * | 2006-08-04 | 2015-12-29 | The Directv Group, Inc. | Distributed media-aggregation systems and methods to operate the same |
CN101447994B (en) * | 2008-12-30 | 2012-07-04 | 深圳市迅雷网络技术有限公司 | Method for downloading and playing multimedia file and equipment thereof |
CN101741730B (en) * | 2009-12-02 | 2012-05-30 | 成都市华为赛门铁克科技有限公司 | Method and equipment for downloading file and method and system for providing file downloading service |
-
2010
- 2010-09-01 CN CN201010272312.XA patent/CN102387177B/en active Active
-
2011
- 2011-08-31 WO PCT/CN2011/079149 patent/WO2012028096A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020023081A1 (en) * | 2000-08-15 | 2002-02-21 | Bazan Silvia L. | System and method for providing medical information via the internet without the need for broadband connectivity |
CN1813251A (en) * | 2004-03-22 | 2006-08-02 | 网飞亚技术公司 | A streaming based contents distribution network system and methods for splitting, merging and retrieving files |
CN101299702A (en) * | 2008-06-06 | 2008-11-05 | 厦门时迅信息科技有限公司 | Multimedia information wireless network transmission system and method supporting interaction |
Also Published As
Publication number | Publication date |
---|---|
CN102387177A (en) | 2012-03-21 |
CN102387177B (en) | 2015-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6530542B2 (en) | Adaptive processing by multiple media processing nodes | |
US8989259B2 (en) | Method and system for media file compression | |
JP6058677B2 (en) | Signaling segment characteristics for streaming media data over a network | |
WO2017063399A1 (en) | Video playback method and device | |
JP2005327442A5 (en) | ||
CN1300399A (en) | Transmitter, receiver, transmitter/receiver system, transmission method and reception method | |
EP1883887A2 (en) | Media timeline processing infrastructure | |
SG183571A1 (en) | Movie file download device and method | |
JP4875204B2 (en) | Apparatus and method for processing encoded audio data | |
CN103024517A (en) | Method for synchronously playing streaming media audios and videos based on parallel processing | |
WO2013185514A1 (en) | System and method for playing streaming media | |
CN102156734A (en) | Video content management method based on semantic hidden indexing | |
CN112866730B (en) | Streaming media data transmission method, device, system, electronic equipment and storage medium | |
WO2008098441A1 (en) | Network-based program remote editing method | |
WO2012028096A1 (en) | Method and apparatus for downloading audio-video file | |
CN108769830B (en) | Method for caching video and related equipment | |
CN102780728A (en) | Media file transcoding and downloading method and client | |
US8718131B2 (en) | Method and apparatus for generating and processing packet in MPEG-2 transport stream | |
CN110868610B (en) | Streaming media transmission method, device, server and storage medium | |
CN113079386A (en) | Video online playing method and device, electronic equipment and storage medium | |
CN113114968A (en) | Video processing method, device, equipment and storage medium | |
WO2011110117A2 (en) | Method, device and system for positioning playing of multi-code rate based on hypertext transfer protocol | |
CN112350986B (en) | Shaping method and system for audio and video network transmission fragmentation | |
CN113784094B (en) | Video data processing method, gateway, terminal device and storage medium | |
JP2009260643A (en) | Data stream analysis apparatus, decoder, and data stream analysis method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11821122 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 08/05/2013) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 11821122 Country of ref document: EP Kind code of ref document: A1 |