Embodiment
By reference to the accompanying drawings the present invention is described in further detail below by embodiment.
Execution mode one:
As shown in Figure 1, the multi-media transcoding device that provides of present embodiment comprises: pre-transcoding module 110, parameter modification module 130 and normal transcoding module 150; Wherein, pre-transcoding module 110 is used for after the prerotation pattern is triggered, and according to initial transcoding parameter, treats the pre-transcoding processing that the transcoding multimedia source files is carried out scheduled duration, obtains pre-transcoding and processes file; Parameter modification module 130 is used for revising described transcoding parameter, and amended transcoding parameter being sent to described pre-transcoding module when the broadcast of described pre-transcoding processing file is undesired; When normal transcoding module 150 is normal for the broadcast of processing file when described pre-transcoding, according to the transcoding parameter of the current use of pre-transcoding module, the described transcoding multimedia source files for the treatment of is carried out transcoding.
Multimedia source files wants to carry out the multimedia file of transcoding for the user, can be any one file formats in digital terminal equipment such as audio file, video file or audio-video document, such as AVI, MPEG, ASF, RM, WMV etc.
For pre-transcoding module 110, pre-transcoding module 110 comprises separative element 111, transcoding units 115 and synthesis unit 117 among a kind of embodiment, and separative element 111 is used for treating the transcoding multimedia source files and carries out the audio/video flow separation, output audio stream and video flowing; Transcoding units 115 is used for audio stream and the video flowing that obtains carried out respectively transcoding according to the transcoding parameter; Synthesis unit 117 is used for the audio stream behind the transcoding of scheduled duration and video flowing are synthesized, and obtains pre-transcoding and processes file.Here, " obtain " word and can be understood as that initiatively to obtain from other unit also can be to receive the data that other unit send.
Among the another kind of embodiment, still as shown in Figure 1, pre-transcoding module 110 comprises separative element 111, decoding unit 113, transcoding units 115 and synthesis unit 117, wherein separative element 111, transcoding units 115 and synthesis unit 117 are with last embodiment, decoding unit 113 is used for audio stream and video flowing that separation obtains are decoded respectively, and decoded audio stream and video flowing output to transcoding units 115 and carry out subsequent treatment.
It will be understood by those skilled in the art that, it is actual when multimedia source files is processed, be not disposable whole source file to be processed, but source file is carried out the divided data piece, process successively by data block, as be divided into piece A, piece B ... wait and process, similar streamline operation, a blocks of data after only after last blocks of data processing finishes, just beginning to process; Therefore, in the multi-media transcoding device of present embodiment, the separative element of pre-transcoding module, decoding unit, transcoding units, synthesis units etc. are all processed successively by piece, to piece A (supposing that the contained duration of piece A is greater than scheduled duration) when processing, after if synthesis unit synthesizes according to scheduled duration (such as 1min), with no longer synthetic data flow except scheduled duration, this moment, synthesis unit finished the processing of piece A, the file of the scheduled duration after output is synthetic (being that pre-transcoding is processed file), in other words, separative element, decoding unit, transcoding units will quit work, and no longer continue to process the remainder data piece.
Among a kind of embodiment, the trigger condition of prerotation pattern can be that the user chooses the prerotation code function, for example, sets a pre-transcoding button or button at human-computer interaction interface, after the user chooses this button or button, triggers the prerotation pattern; Among the another kind of embodiment, the trigger condition of prerotation pattern can be automatic triggering type, for example, in case as treating that the transcoding multimedia source files is imported into transcoder then automatically triggers the prerotation pattern.
Among a kind of embodiment, initial transcoding parameter can be the transcoding parameter of directly being inputted by human-computer interaction interface by the user; This mode is fit to the professional user.Among another embodiment, initial transcoding parameter can be the transcoding parameter corresponding with the device type of being inputted or choosing by human-computer interaction interface by the user, for example, the text box of the type that supplies the user to input digital terminal equipment is provided or provides polytype for user selection at human-computer interaction interface, common a kind of digital terminal equipment acquiescence can be play the multimedia file of at least a form, its acquiescence provides corresponding transcoding parameter, and this transcoding parameter is initial transcoding parameter.Among the another kind of embodiment, initial transcoding parameter is the transcoding parameter of multi-media transcoding device default setting.Here, the transcoding parameter can include but not limited to video resolution, video frame rate, video codes speed, video encoder type, audio sample rate, audio track, audio code speed and audio coder type etc.
After obtaining the pre-transcoding processing file of pre-transcoding module 110, the multi-media transcoding device should be pre-transcoding process file and directly upload terminal equipment and play (or claiming to pilot), determine whether use current transcoding parameter that whole multimedia source files is carried out transcoding according to the result that pilots, if can normal play, then use current transcoding parameter to carry out transcoding, if cannot normal play, then need to revise the transcoding parameter and re-start the preliminary operation code, until find suitable transcoding parameter.
The modification of 130 pairs of transcoding parameters of parameter modification module is among a kind of embodiment: the transcoding parameter that the user who receives according to human-computer interaction interface inputs is made amendment, and this mode is applicable to the professional user; Among the another kind of embodiment, the modification of transcoding parameter is to make amendment according to the transcoding parameter that presets in the transcoding parameter configuration files that arranges in advance; This mode is convenient to domestic consumer's use.
Pre-transcoding module and the normal related concrete transcoding process of transcoding module can adopt any general transcoding technology of those skilled in the art, such as motion vectors mapping, the conversion of DCT territory, residual error revaluation etc., and the embodiment of the invention is not restricted this.Similarly, separative element, decoding unit and synthesis unit all can adopt the general technology of those skilled in the art to realize respectively, and the embodiment of the invention is not done restriction equally to this.
The multi-media transcoding device that each embodiment provides can be used for multimedia play terminal, such as DVD, CD, PC, mobile phone, MP4, MP3, PSP etc.This multi-media transcoding device can be to run on the unit that software unit, hardware cell or software and hardware in these multimedia play terminals combine, and also can be used as independently, suspension member is integrated in these multimedia play terminals or runs in the application system of these multimedia play terminals.
The various embodiments described above are by increasing the prerotation code function in transcoder, with multimedia source files between whole transcodings the file of preliminary operation code scheduled duration pilot, thereby determine to carry out again full text spare transcoding after the suitable transcoding parameter, so that transcoding file out can smooth and easy broadcast on all kinds of portable terminals, both avoided repeatedly revising the loaded down with trivial details of transcoding parameter, also save time and resource, greatly improved transcoding efficiency.
Execution mode two:
As shown in Figure 2, present embodiment provides a kind of multimedia play terminal 10, comprise multi-media transcoding device 100 and player 200, wherein, the pre-transcoding that the multi-media transcoding device that multi-media transcoding device 100 provides for execution mode one, player 200 are used for the pre-transcoding module output of play multimedia transcoder is processed the multimedia source files behind the transcoding of file or normal transcoding module output.Player 200 adopts the general play-back technology of those skilled in the art to realize, present embodiment is not done restriction to this.Similarly, the multimedia play terminal of present embodiment can be such as DVD, CD, PC, mobile phone, MP4, MP3, PSP etc.
Execution mode three:
Present embodiment provides the code-transferring method of multimedia file, comprises the steps:
Pre-transcoding step S1 after the prerotation pattern is triggered, according to initial transcoding parameter, treats the pre-transcoding processing that the transcoding multimedia source files is carried out scheduled duration, obtains pre-transcoding and processes file;
Parameter modification step S2 processes file when pre-transcoding and plays when undesired, revises the transcoding parameter, and amended transcoding parameter is returned pre-transcoding step S1 to re-start pre-transcoding step S1;
Normal transcoding step S3 processes file when pre-transcoding and plays when normal, according to the transcoding parameter of the current use of pre-transcoding step S1, treats the transcoding multimedia source files and carries out transcoding.
Describe the handling process of the code-transferring method of this multimedia file in detail below by embodiment shown in Figure 3.As shown in Figure 3, comprising:
Step S100 triggers the prerotation pattern;
Among a kind of embodiment, the trigger condition of prerotation pattern can be that the user chooses the prerotation code function, for example, sets a pre-transcoding button or button at human-computer interaction interface, after the user chooses this button or button, triggers the prerotation pattern; Among the another kind of embodiment, the trigger condition of prerotation pattern can be automatic triggering type, for example, in case as treating that the transcoding multimedia source files is imported into transcoder then automatically triggers the prerotation pattern.
Step S101 separates and looks audio frequency;
Treat the transcoding multimedia source files and carry out the audio/video flow separation, output audio stream and video flowing, concrete isolation technics adopts the general technology of those skilled in the art to realize, and the embodiment of the invention is not done restriction to this.
Step S103 is depending on audio decoder;
Usually therefore video flowing and audio stream need to decode respectively to it all through coding, just can carry out next step transcoding; Certainly, be the initial data of un-encoded if it will be understood by those skilled in the art that video flowing and audio stream, corresponding decoding step is omissible.
Step S105, the preliminary operation code;
Carry out transcoding according to initial transcoding parameter, concrete transcoding process can adopt any general transcoding technology of those skilled in the art, such as motion vectors mapping, the conversion of DCT territory, residual error revaluation etc., and the embodiment of the invention is not restricted this.Among a kind of embodiment, initial transcoding parameter can be the transcoding parameter of directly being inputted by human-computer interaction interface by the user; This mode is fit to the professional user.Among another embodiment, initial transcoding parameter can be the transcoding parameter corresponding with the device type of being inputted or choosing by human-computer interaction interface by the user, for example, the text box of the type that supplies the user to input digital terminal equipment is provided or provides polytype for user selection at human-computer interaction interface, common a kind of digital terminal equipment acquiescence can be play the multimedia file of at least a form, its acquiescence provides corresponding transcoding parameter, and this transcoding parameter is initial transcoding parameter.Among the another kind of embodiment, initial transcoding parameter is the transcoding parameter of multi-media transcoding device default setting.Here, the transcoding parameter can include but not limited to video resolution, video frame rate, video codes speed, video encoder type, audio sample rate, audio track, audio code speed and audio coder type etc.
Step S107, synthetic video/audio;
Audio stream behind the transcoding of scheduled duration and video flowing are synthesized, obtain pre-transcoding and process file.Concrete synthetic technology adopts the general technology of those skilled in the art to realize, the embodiment of the invention is not done restriction equally to this.It will be understood by those skilled in the art that, it is actual when multimedia source files is processed, be not disposable whole source file to be processed, but source file is carried out the divided data piece, process successively by data block, as be divided into piece A, piece B ... wait and process, similar streamline operation, a blocks of data after only after last blocks of data processing finishes, just beginning to process; Therefore, in the present embodiment, aforesaid separating step, decoding step, the transcoding step, synthesis steps etc. are all processed successively by piece, to piece A (supposing that the contained duration of piece A is greater than scheduled duration) when processing, after if synthesis step synthesizes according to scheduled duration (such as 1min), with no longer synthetic data flow except scheduled duration, this moment, synthesis step finished the processing of piece A, the file of the scheduled duration after output is synthetic (being that pre-transcoding is processed file), in other words, all the other steps will quit work, and no longer continue to process the remainder data piece.
Step S109 uploads synthetic result and pilots;
After obtaining the pre-transcoding processing file of pre-transcoding module 110, should be pre-transcoding process file and directly upload terminal equipment and play (or claiming to pilot), determine whether use current transcoding parameter that whole multimedia source files is carried out transcoding according to the result that pilots, if can normal play, then turning step S113 uses current transcoding parameter to carry out transcoding, if cannot normal play, then turn step S111 the transcoding parameter is made amendment to re-start the preliminary operation code, until find suitable transcoding parameter.
Step S111 if it is undesired to pilot, revises the transcoding parameter;
Among a kind of embodiment to the modification of transcoding parameter be: the transcoding parameter that the user who receives according to human-computer interaction interface inputs is made amendment, and this mode is applicable to the professional user; Among the another kind of embodiment, the modification of transcoding parameter is to make amendment according to the transcoding parameter that presets in the transcoding parameter configuration files that arranges in advance; This mode is convenient to domestic consumer's use.
Step S113 if it is normal to pilot, triggers normal transcoding pattern.
According to the transcoding parameter of the current use of preliminary operation code step S105, treat the transcoding multimedia source files and carry out transcoding, obtain the multi-media objects file.
Certainly, present embodiment can also comprise the step of playing this multi-media objects file after obtaining the multi-media objects file.
The transcoder of embodiment of the present invention or embodiment can be integrated in the player, as broadcasting soon player, enters transcoder by player interface, but the two also independent operating of transcoder and player.Each execution mode is by a bit of video of pre-transcoding scheduled duration, although increased a pre-transcoding process on the flow process, but because pre-transcoding only needs the transcoding video of very short time, this process is very quick, uploading this section small video also can be very quick, therefore compare behind the whole file transcoding time that just discovery can not normal play be wasted, greatly improved transcoding efficiency.
Above content is in conjunction with concrete execution mode further description made for the present invention, can not assert that implementation of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can also make some simple deduction or replace, all should be considered as belonging to protection scope of the present invention.