Audio frequency and video compiles transcoding issues fast-check method and system
Technical field
The invention belongs to field of video processing, more particularly to a kind of audio frequency and video volume transcoding issues fast-check method and system.
Background technology
Compile in trans-coding system in audio frequency and video, investigation problem common method is generally by the crawl input of operation maintenance personnel scene
Output signal and system operation daily record carry out positioning problems, and are further used for by improvement part module after positioning problems
Export more detailed information or take and further test with orientation problem.Following method:
Data are read from file or stream;
The data for reading are decapsulated, the voice data isolated is sent to audio decoder, the video counts isolated
According to being sent to Video Decoder;
The voice data for receiving is decoded as audio data decoder by audio decoder;
The video data decoding for receiving is view data by Video Decoder;
By view data according to target call up conversion or down conversion for target size image;
Image after conversion is required to be encoded to corresponding video data encoder according to video encoding target;
Audio data decoder is encoded to into corresponding coded audio data according to audio coding target call;
Video data encoder and being interleaved of coded audio data are processed;
By the data write file destination after intertexture or according to target agreement transmission.
In above-mentioned normal Video coding activity, often there is the unremitting coding of 7x24 hours(Such as television channel is straight
Broadcast coding), when being investigated after going wrong, because the data from file or stream have not often all been present, cause
Investigation is extremely difficult, often can only be analyzed according to substantial amounts of daily record, and the various data during entirely compiling transcoding
Change is not often recorded and causes only to verify very much the reason for finding final by log analysis.Said method is often led
Cause problem resolution time long, it is necessary to introduce a kind of further method to improve the efficiency of problem diagnosis.
The content of the invention
In view of this, it is an object of the invention to provide a kind of carry out data and internal shape by data efficiently, frame by frame
State variable is contrasted, so as to the audio frequency and video that position occurs in quick positioning question compiles transcoding issues fast-check method and system.
For reaching above-mentioned purpose, the invention provides a kind of audio frequency and video compiles transcoding issues fast-check method, including following step
Suddenly:
Data are read from file or stream, the first process is carried out and is obtained the first result, the write of the first result is referred to
Determine store path;
First result is carried out into second processing, second processing result is obtained, storage road is specified in the write of second processing result
Footpath;
Second processing result is carried out into the 3rd process, the 3rd result is obtained, storage road is specified in the write of the 3rd result
Footpath;
3rd result is carried out into fourth process, fourth process result is obtained, storage road is specified in the write of fourth process result
Footpath;
Wherein, the first process, second processing, the 3rd are processed and there is fourth process fixed content to include the cycle and common examine
Disconnected to include interface, the result in nearest a cycle is recorded in storage medium.
Preferably, it is described to read data from file or stream, carry out the first process and obtain the first result, by first
During store path is specified in result write, first is processed as the data to reading decapsulates, the audio frequency number isolated
According to audio decoder is sent to, the video data isolated is sent to Video Decoder;First result include voice data,
Video data, and video file head and media protocol head is recorded all the time in processing first.
Preferably, it is described that first result is carried out into second processing, second processing result is obtained, by second processing result
Write specifies store path, second processing that the voice data for receiving is decoded as audio data decoder, video for audio decoder
The video data decoding for receiving is view data by decoder;Audio data decoder that second processing result includes decoding out,
View data and media information.
Preferably, it is described that second processing result is carried out into the 3rd process, the 3rd result is obtained, by the 3rd result
Write specify store path, the 3rd be processed as Video Decoder by the video data decoding for receiving be view data, by picture number
According to being the image of target size according to target call up conversion or down conversion, the image after conversion is wanted according to video encoding target
Ask and be encoded to corresponding video data encoder;Audio data decoder is encoded to into corresponding audio frequency according to audio coding target call
Coded data;3rd result includes regarding after the image after the view data for decoding out, up conversion or down conversion, coding
Coded audio data and media information after frequency coded data, coding.
Preferably, it is described that 3rd result is carried out into fourth process, fourth process result is obtained, by fourth process result
Store path is specified in write, and fourth process is to process video data encoder and being interleaved of coded audio data, will be interweaved
Data write file destination afterwards or according to target agreement transmission;Fourth process result includes the data after intertextureization process and matchmaker
Body information.
Preferably, the media information at least includes timestamp, size of data and data form.
Based on above-mentioned purpose, present invention also offers a kind of audio frequency and video compiles transcoding issues quick checking system, it is characterised in that
Including reader, demultiplexer, Video Decoder, audio decoder, video converter, video encoder, audio coder, many
Path multiplexer and write device, wherein:
The output of the reader is connected with the input of the demultiplexer, and the output of the demultiplexer is decoded with the video
The input of device and the input of the audio decoder connect respectively, the output of the Video Decoder and the video converter
Input connection, the output of the video converter are connected with the input of the video encoder, the output of the audio decoder
Input with the audio coder is connected, the video encoder output and the audio coder output with it is described
The input connection of multiplexer, the output of the multiplexer are connected with the input of said write device;
The reader, for reading data from file or stream;The demultiplexer, obtains for carrying out the first process
The write of first result is specified store path by one result;
The Video Decoder and audio decoder, for the first result is carried out second processing, obtain second processing knot
Really, store path is specified in the write of second processing result;
The video converter, video encoder and audio coder, for second processing result is carried out the 3rd process, obtain
The write of 3rd result is specified store path by the 3rd result;
The multiplexer and write device, for the 3rd result is carried out fourth process, obtain fourth process result, will
Store path is specified in the write of fourth process result;
Wherein, the first process, second processing, the 3rd are processed and there is fourth process fixed content to include the cycle and common examine
Disconnected to include interface, the result in nearest a cycle is recorded in storage medium.
Preferably, described first the data to reading are processed as decapsulate, the voice data isolated is sent to
Audio decoder, the video data isolated are sent to Video Decoder;First result includes voice data, video counts
According to, and video file head and media protocol head is recorded all the time in processing first.
Preferably, the voice data for receiving is decoded as audio data decoder for audio decoder by the second processing, depending on
The video data decoding for receiving is view data by frequency decoder;Second processing result includes the audio decoder number for decoding out
According to, view data and media information.
Preferably, the described 3rd be processed as Video Decoder by the video data decoding for receiving be view data, by image
Data according to target call up conversion or down conversion for target size image, by the image after conversion according to video encoding target
Requirement is encoded to corresponding video data encoder;Audio data decoder is encoded to into corresponding sound according to audio coding target call
Frequency coded data;After 3rd result includes the image after view data, up conversion or the down conversion for decoding out, coding
Coded audio data and media information after video data encoder, coding.
Preferably, the fourth process is to process video data encoder and being interleaved of coded audio data, will be handed over
Data write file destination or according to target agreement transmission after knitting;Fourth process result include intertextureization process after data and
Media information.
Preferably, the media information at least includes timestamp, size of data and data form.
The beneficial effects of the present invention is:Compile in transcoding activity in general audio frequency and video, often there is 7x24 hours continuously
Disconnected coding(Such as the live coding of television channel), when being investigated after going wrong, because the data from file or stream are past
Toward all not existing, cause investigation extremely difficult, often can only be analyzed according to substantial amounts of daily record, and entirely compile transcoding
During the change of various data be not often recorded and cause only to verify very much by log analysis and find finally
The reason for.Therefore, using the method for the present invention and system, the data and metadata of each several part in system are stored, with reference to
Daily record can carry out very efficient analysis, and then improve client response speed.
Description of the drawings
In order that the purpose of the present invention, technical scheme and beneficial effect are clearer, the present invention provides drawings described below and carries out
Explanation:
Fig. 1 compiles transcoding issues fast-check method flow chart of steps for the audio frequency and video of the inventive method embodiment 1;
Fig. 2 compiles transcoding issues fast-check method flow chart of steps for the audio frequency and video of the inventive method embodiment 2;
Fig. 3 compiles transcoding issues quick checking system structure diagram for the audio frequency and video of present system embodiment.
Specific embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described in detail.
Embodiment 1
Referring to Fig. 1, the audio frequency and video for showing the inventive method embodiment 1 compiles transcoding issues fast-check method flow chart of steps, bag
Include following steps:
S101, reads data from file or stream, carries out the first process and obtains the first result, and the first result is write
Enter specified store path;
First result is carried out second processing by S102, obtains second processing result, the write of second processing result is specified and is deposited
Storage path;
Second processing result is carried out the 3rd process by S103, obtains the 3rd result, the write of the 3rd result is specified and is deposited
Storage path;
3rd result is carried out fourth process by S104, obtains fourth process result, the write of fourth process result is specified and is deposited
Storage path;
Wherein, the first process, second processing, the 3rd are processed and there is fourth process fixed content to include the cycle and common examine
Disconnected to include interface, the result in nearest a cycle is recorded in storage medium.
Embodiment 2
Referring to Fig. 2, the audio frequency and video for showing the inventive method embodiment 2 compiles transcoding issues fast-check method flow chart of steps, bag
Include following steps:
S201, reads data from file or stream, and the data for reading are decapsulated, and the voice data isolated is sent to
Audio decoder, the video data isolated are sent to Video Decoder, the data for reading and will isolate voice data, regard
Store path is specified in the media information of frequency evidence and media data write, and records video file head and media protocol all the time
Head;
The voice data for receiving is decoded as audio data decoder by S202, audio decoder, will decoding after audio data decoder and
Store path is specified in media information write;
The video data decoding for receiving is view data by S203, Video Decoder, and view data and media information write are referred to
Determine store path;
S204, by view data according to target call up conversion or down conversion for target size image, by up conversion or lower change
Store path is specified in image after changing and media information write;
S205, the image after conversion is required to be encoded to corresponding video data encoder according to video encoding target, after encoding
Video data encoder and media information write specify store path;
Audio data decoder is encoded to corresponding coded audio data according to audio coding target call by S206, after encoding
Coded audio data and media information write specify store path;
S207, video data encoder and being interleaved of coded audio data are processed, by the data write target text after intertexture
Part or according to target agreement send, and the data after intertextureization process and media information write are specified store path;
Image data format includes yuv format and rgb format;Audio data decoder form includes PCM format;Video encoding target
H.264 and H.265 require to include;Coded audio data form includes AAC and AC3 forms.
Target call refers to the parameter limited by the final video file for needing of user, such as video format, image resolution
Rate, code check, coding parameter, audio format, audio sample rate, code check etc..By said method, when audio frequency and video compiles trans-coding system
When going wrong, it is not required to substantial amounts of daily record is analyzed and is investigated, only need to be by the data of each component in above-mentioned each step
And metadata is stored, when problem needs occurs and diagnosed, data and internal state variable is carried out by data frame by frame
Contrast, and then quick positioning goes wrong and where occurs in, so as to reach problem investigation effect rapidly and efficiently.
Said method has fixed content to include the cycle, can set recovery time, such as specifies and includes one minute, then has one
Individual circle queue mechanism, it is ensured that the data for always having each component of nearest one minute are recorded in storage medium.Oldest
When will be automatically cleared, such as specify time of receipt to be one minute, from 10:00:00 starts to store diagnostic data, when 10:01:
When 01 second, 10:00:The data of 00 second are deleted;When 10:01:When 02 second, 10:00:The data of 01 second are deleted;
By that analogy..Each component is voluntarily responsible for data storage and is eliminated, and so can conveniently carry out compiling the extension of transcoding flow process, carry
High flexibility for example, in some cases need introduce audio resampling component, it is only necessary to this component also meets this machine
System.Above-mentioned each component includes but are not limited to reader, demultiplexer, Video Decoder, audio decoder, video conversion
Device, video encoder, audio coder, multiplexer and write device.Storage medium can be but be not limited only to local disc
Or external storage(Such as disk array, NAS etc.).
For meeting mechanism above, specifically, each component follows common diagnosis and includes interface:
Start content to include:Data it are write herein by specified store path, component, and Method of Data Organization can be by component
Decide in its sole discretion.
Stop content including:Data storage is not being carried out.
Media information at least includes timestamp, size of data, data form etc., and different components may carry more auxiliary
Help media information.Each component is when data storage, it is also necessary to which its internal all corresponding state variable is carried out sequence
Rowization are stored, and certainly, the intermediate data that the internal logic of each of which is produced can also also be write storage by each component.
Concrete how quick positioning question, by taking Video Decoder as an example, by the media information of each input, media data
(Such as H.264 encoded data)And the built-in variable before and after decoding is stored.When regarding for the media information being input into
Frequency division resolution is 1920x1080,10:00:00 moment is to 10:00:When 05 moment solution image out is 1920x1080, meaning
Taste to have no problem, but 10:00:When finding when 06 that this variable sports 640x480, this point is exactly problem points, this
When further diagnose, the digital independent of this frame at this moment for having stored can be come in by component, being debugged just can be with
It is that concrete which place code is wrongly write to be found to bottom.
It is corresponding with above-mentioned audio frequency and video volume transcoding issues fast-check method, present invention also offers a kind of audio frequency and video is compiled turning
Code problem quick checking system, its structural representation referring to Fig. 3, including reader 10, demultiplexer 20, Video Decoder 40, audio frequency
Decoder 30, video converter 60, video encoder, audio coder 70, multiplexer 80 and write device 90, wherein,
The output of the reader 10 is connected with the input of the demultiplexer 20, and the output of the demultiplexer 20 is regarded with described
The input of frequency decoder 40 and the input of the audio decoder 30 connect respectively, the output of the Video Decoder 40 with it is described
The input connection of video converter 60, the output of the video converter 60 is connected with the input of the video encoder, described
The output of audio decoder 30 is connected with the input of the audio coder 70, the output of the video encoder and the audio frequency
The output of encoder 70 is connected with the input of the multiplexer 80, the output of the multiplexer 80 and said write
The input connection of device 90,
The reader 10, for reading data from file or stream;The demultiplexer 20, obtains for carrying out the first process
To the first result, store path is specified in the write of the first result;
The Video Decoder 40 and audio decoder 30, for the first result is carried out second processing, obtain at second
The write of second processing result is specified store path by reason result;
The video converter 50, video encoder 60 and audio coder 70, for second processing result is carried out at the 3rd
Reason, obtains the 3rd result, and the write of the 3rd result is specified store path;
The multiplexer 80 and write device 90, for the 3rd result is carried out fourth process, obtain fourth process knot
Really, store path is specified in the write of fourth process result;
Wherein, the first process, second processing, the 3rd are processed and there is fourth process fixed content to include the cycle and common examine
Disconnected to include interface, the result in nearest a cycle is recorded in storage medium.
Specific embodiment will not be described here with reference to said method embodiment.
Finally illustrate, preferred embodiment above is only unrestricted to illustrate technical scheme, although logical
Cross above preferred embodiment to be described in detail the present invention, it is to be understood by those skilled in the art that can be
Various changes are made in form and to which in details, without departing from claims of the present invention limited range.