CN103647977B - Detection method and apparatus used before video packaging - Google Patents
Detection method and apparatus used before video packaging Download PDFInfo
- Publication number
- CN103647977B CN103647977B CN201310573822.4A CN201310573822A CN103647977B CN 103647977 B CN103647977 B CN 103647977B CN 201310573822 A CN201310573822 A CN 201310573822A CN 103647977 B CN103647977 B CN 103647977B
- Authority
- CN
- China
- Prior art keywords
- gop
- audio pack
- memory mapping
- sequence number
- mapping table
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The embodiments of the invention provide a detection method used before video packaging. The method comprises: creating a memory mapping table of a video group of pictures (GOP) and a memory mapping table of an audio package; receiving the GOP, extracting the sequence number of the GOP, and writing the sequence number of the GOP into the memory mapping table of the GOP; receiving the audio packet, extracting the sequence number of the audio packet, and writing the sequence number of the audio packet into the memory mapping table of the audio packet; and determining the GOP and whether the audio packet is completely received successfully. The embodiments of the invention also provide a detection apparatus used before video packaging, which is capable of determining whether the GOP and the audio packet are lost through the recording situations of the memory mapping tables before the video packaging so as to prevent unsuccessful video packaging caused by loss of the GOP and the audio packet to the maximum.
Description
Technical field
The present invention relates to field of computer technology, particularly relate to the detection method before a kind of video encapsulation and device.
Background technology
When there being multitude of video to need to carry out format transformation, the transcoding software of multiple stage uniprocessor version can be used to carry out transcoding;And highly efficient way is to design a distributed trans-coding system to carry out transcoding.Video code conversion generally can be divided into four steps to be carried out: a, decapsulation, b, video decoding coding, and c, audio decoder encode, d, encapsulation.In these four steps, video decoding this step of coding to expend the time of whole transcoding process 80%-90%.In order to improve transcoding speed, the minimizing video that is intended to that the overall time of minimizing transcoding is most crucial decodes the process time of coding.
The thought of distributed trans-coding is to utilize multiple servers the most parallel to entering GOP(Group of Pictures, picture group) decoding coded treatment, the server of parallel processing GOP is the most, and whole transcoding process is the fewest.Being typically designed as this distributed trans-coding system: a station server is responsible for decapsulation, multiple servers is responsible for processing GOP, and a station server is responsible for processing audio pack, and a station server is responsible for encapsulation and exports target video file.The system schematic of distributed trans-coding it is shown in Fig. 1.
According to existing distributed trans-coding system, the number of servers that GOP and audio pack carry out transcoding simultaneously is the most, and the efficiency of transcoding is the highest, but number of servers is the most more easily causes the loss of GOP or audio pack, thus causes the failure of video encapsulation.While ensureing transcoding efficiency, how to guarantee the complete transmission of GOP and audio pack, be that prior art suffers from a problem that.
Summary of the invention
For the problem solving prior art video code conversion GOP and audio packet transmission is easily lost, the embodiment of the present invention proposes the detection method before a kind of video encapsulation and device.
One aspect of the present invention, it is provided that the detection method before a kind of video encapsulation, including: create memory mapping table and the memory mapping table of audio pack of video pictures group GOP;
Receive described GOP, extract the sequence number of described GOP, and extract the sum of described GOP and preserve, the sequence number of described GOP is write the memory mapping table of described GOP;
Receive described audio pack, extract the sequence number of described audio pack, and extract the sum of described audio pack and preserve, the sequence number of described audio pack is write the memory mapping table of described audio pack;
Judge described GOP, and described audio pack the most all receives successfully.
Another aspect of the present invention, it is provided that the detection device before a kind of video encapsulation, including:
Creating unit, for creating the memory mapping table of video pictures group GOP and the memory mapping table of audio pack;
GOP internal memory writing unit, is used for receiving described GOP, extracts the sequence number of described GOP, and the sequence number of described GOP writes the memory mapping table of described GOP;
Described GOP internal memory writing unit, after receiving described GOP, is additionally operable to extract the sum of described GOP and preserve;
Audio pack internal memory writing unit, is used for receiving described audio pack, extracts the sequence number of described audio pack, and the sequence number of described audio pack writes the memory mapping table of described audio pack;
Described audio pack internal memory writing unit, after receiving described audio pack, is additionally operable to extract the sum of described audio pack and preserve;
Judging unit, is used for judging described GOP, and described audio pack the most all receives successfully.
Use the detection method before video encapsulation disclosed in the embodiment of the present invention and device, first server is GOP and audio pack establishment memory mapping table, along with GOP and the reception of audio pack, their reception condition is recorded in memory mapping table, so before video is packaged, can judge whether GOP and audio pack are lost by the record case of memory mapping table such that it is able to farthest avoid the unsuccessful situation of video encapsulation caused due to the loss of GOP or audio pack.
Accompanying drawing explanation
It it is the system schematic of a kind of distributed trans-coding shown in Fig. 1;
It it is the schematic diagram of detection method before a kind of video encapsulation of providing of the embodiment of the present invention shown in Fig. 2;
It it is the structural representation detecting device before a kind of video encapsulation of embodiment of the present invention offer shown in Fig. 3;
It it is the structural representation detecting device before the another kind of video encapsulation of embodiment of the present invention offer shown in Fig. 4.
Detailed description of the invention
In embodiments of the present invention, first server is GOP and audio pack establishment memory mapping table, along with GOP and the reception of audio pack, their reception condition is recorded in memory mapping table, so before video is packaged, can judge whether GOP and audio pack are lost by the record case of memory mapping table such that it is able to farthest avoid the unsuccessful situation of video encapsulation caused due to the loss of GOP or audio pack.
Detection method before the video encapsulation that the embodiment of the present invention described further below provides.
Fig. 2 show the detection method schematic diagram before the video encapsulation that one embodiment of the invention provides, and according to this figure, each step is described in detail in detail as follows:
Step 201, the memory mapping table creating video pictures group GOP and the memory mapping table of audio pack;
Step 202, receive described GOP, extract the sequence number of described GOP, and extract the sum of described GOP and preserve, the sequence number of described GOP is write the memory mapping table of described GOP;
Step 203, receive described audio pack, extract the sequence number of described audio pack, and extract the sum of described audio pack and preserve, the sequence number of described audio pack is write the memory mapping table of described audio pack;
Specifically, the embodiment of the present invention provides a kind of algorithm that the sequence number of GOP and audio pack is write memory mapping table.
Use following algorithm that the sequence number of described GOP writes the memory mapping table of described GOP, and the sequence number of described audio pack write the memory mapping table of described audio pack:
Int N
Char Table[M]
If(N%8==0)
Table[N/8]=0x01|Table[N/8];
If(N%8==1)
Table[N/8]=0x02|Table[N/8];
If(N%8==2)
Table[N/8]=0x04|Table[N/8];
If(N%8==3)
Table[N/8]=0x08|Table[N/8];
If(N%8==4)
Table[N/8]=0x10|Table[N/8];
If(N%8==5)
Table[N/8]=0x20|Table[N/8];
If(N%8==6)
Table[N/8]=0x40|Table[N/8];
If(N%8==7)
Table[N/8]=0x80|Table[N/8];
Wherein, N represents the sequence number of described GOP or audio pack;
Table M represents the memory mapping table of described GOP or audio pack.
Step 204, judge described GOP, and described audio pack the most all receives successfully.
Wherein, if described GOP or described audio pack the most all receive successfully, then obtain GOP or the audio pack of described disappearance of described disappearance.
How following example introduction judges that GOP the most all receives successfully.
Abovementioned steps 204 judges that described GOP the most all receives successfully, including:
According to the total of described GOP and the memory mapping table of described GOP, described GOP the most all receives successfully to use specific algorithm to judge;
If described GOP the most all receives successfully, and obtain the sequence number of the GOP of disappearance.
Specifically, the specific algorithm of described use judges that described GOP the most all receives successfully, including:
Described GOP the most all receives successfully to use following algorithm to judge, if described GOP the most all receives successfully, then obtains the sequence number of the GOP of described disappearance;
Int N
Char Table[M]
For(int i=0;i<N;i++)
{
If(i%8==0)
result=0x01&Table[i/8];
If(i%8==1)
result=(0x02&Table[i/8])>>1;
If(i%8==2)
result=(0x04&Table[i/8])>>2;
If(i%8==3)
result=(0x08&Table[i/8])>>3;
If(i%8==4)
result=(0x10&Table[i/8])>>4;
If(i%8==5)
result=(0x20&Table[i/8])>>5;
If(i%8==6)
result=(0x40&Table[i/8])>>6;
If(i%8==7)
result=(0x80&Table[i/8])>>7;
if(result==0)
return i;//
}
if(i==N)//
Wherein, N represents the sum of described GOP;
Table M represents the memory mapping table of described GOP;
I represents the sequence number of described GOP.
Abovementioned steps 204 judging, described audio pack the most all receives successfully, including:
According to the total of described audio pack and the memory mapping table of described audio pack, described audio pack the most all receives successfully to use specific algorithm to judge;
If described audio pack the most all receives successfully, obtain the sequence number of the audio pack of disappearance.
The specific algorithm of described use judges that described audio pack the most all receives successfully, including:
Described audio pack the most all receives successfully to use following algorithm to judge, if described audio pack the most all receives successfully, then obtains the sequence number of the audio pack of disappearance;
Int N
Char Table[M]
For(int i=0;i<N;i++)
{
If(i%8==0)
result=0x01&Table[i/8];
If(i%8==1)
result=(0x02&Table[i/8])>>1;
If(i%8==2)
result=(0x04&Table[i/8])>>2;
If(i%8==3)
result=(0x08&Table[i/8])>>3;
If(i%8==4)
result=(0x10&Table[i/8])>>4;
If(i%8==5)
result=(0x20&Table[i/8])>>5;
If(i%8==6)
result=(0x40&Table[i/8])>>6;
If(i%8==7)
result=(0x80&Table[i/8])>>7;
if(result==0)
return i;//
}
if(i==N)//
Wherein, N represents the sum of described audio pack;
Table M represents the memory mapping table of described audio pack;
I represents the sequence number of described audio pack.
Use the detection method before video encapsulation disclosed in the embodiment of the present invention, first server is GOP and audio pack establishment memory mapping table, along with GOP and the reception of audio pack, their reception condition is recorded in memory mapping table, so before video is packaged, can judge whether GOP and audio pack are lost by the record case of memory mapping table such that it is able to farthest avoid the unsuccessful situation of video encapsulation caused due to the loss of GOP or audio pack.
Detection device before a kind of video encapsulation of following discloses, in order to perform the method disclosed in previous embodiment.
Fig. 3 show the structural representation of the detection device before a kind of video encapsulation that one embodiment of the invention provides.According to this figure, the most each ingredient is described in detail in detail as follows:
Creating unit 301, for creating the memory mapping table of video pictures group GOP and the memory mapping table of audio pack;
GOP internal memory writing unit 302, is used for receiving described GOP, extracts the sequence number of described GOP, and the sequence number of described GOP writes the memory mapping table of described GOP;
Wherein, described GOP internal memory writing unit 302, after receiving described GOP, is additionally operable to extract the sum of described GOP and preserve.
Audio pack internal memory writing unit 303, is used for receiving described audio pack, extracts the sequence number of described audio pack, and the sequence number of described audio pack writes the memory mapping table of described audio pack;
Wherein, described audio pack internal memory writing unit 303, after receiving described audio pack, is additionally operable to extract the sum of described audio pack and preserve.
Judging unit 304, is used for judging described GOP, and described audio pack the most all receives successfully.
Wherein, the structural representation of the detection device before Fig. 4 show another video encapsulation that one embodiment of the invention provides.By this figure it can be seen that this device can also include:
Acquiring unit 305, for when described judging unit judges described GOP or described audio pack the most all receives successfully, then obtains GOP or the audio pack of described disappearance of described disappearance.
Use the detection method before video encapsulation disclosed in the embodiment of the present invention and device, first server is GOP and audio pack establishment memory mapping table, along with GOP and the reception of audio pack, their reception condition is recorded in memory mapping table, so before video is packaged, can judge whether GOP and audio pack are lost by the record case of memory mapping table such that it is able to farthest avoid the unsuccessful situation of video encapsulation caused due to the loss of GOP or audio pack.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can be completed by the hardware that programmed instruction is relevant, aforesaid program can be stored in read/write memory medium, this program upon execution, performs to include the step of said method embodiment;And aforesaid storage medium includes: the various media that can store program code such as ROM, RAM, magnetic disc, CD, network node, schedulers.
Last it is noted that these are only the preferred embodiments of the present invention, it is not limited to the present invention, although the present invention being described in detail with reference to previous embodiment, for a person skilled in the art, technical scheme described in foregoing embodiments still can be modified by it, or wherein portion of techniques feature is carried out equivalent.All within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.
Claims (9)
1. the detection method before a video encapsulation, it is characterised in that including:
Create memory mapping table and the memory mapping table of audio pack of video pictures group GOP;
Receive described GOP, extract the sequence number of described GOP, and extract the sum of described GOP and preserve, the sequence number of described GOP is write the memory mapping table of described GOP;
Receive described audio pack, extract the sequence number of described audio pack, and extract the sum of described audio pack and preserve, the sequence number of described audio pack is write the memory mapping table of described audio pack;
According to the total of described GOP and the memory mapping table of described GOP, and according to the total of described audio pack and the memory mapping table of described audio pack, use specific algorithm to judge described GOP, and described audio pack the most all receives successfully.
Method the most according to claim 1, it is characterised in that the described memory mapping table that the sequence number of described GOP is write described GOP, and the sequence number of described audio pack is write the memory mapping table of described audio pack, including:
Use following algorithm that the sequence number of described GOP writes the memory mapping table of described GOP, and the sequence number of described audio pack write the memory mapping table of described audio pack:
Int N
Char Table[M]
If (N%8==0)
Table [N/8]=0x01 | Table [N/8];
If (N%8==1)
Table [N/8]=0x02 | Table [N/8];
If (N%8==2)
Table [N/8]=0x04 | Table [N/8];
If (N%8==3)
Table [N/8]=0x08 | Table [N/8];
If (N%8==4)
Table [N/8]=0x10 | Table [N/8];
If (N%8==5)
Table [N/8]=0x20 | Table [N/8];
If (N%8==6)
Table [N/8]=0x40 | Table [N/8];
If (N%8==7)
Table [N/8]=0x80 | Table [N/8];
Wherein, N represents the sequence number of described GOP or audio pack;
Table M represents the memory mapping table of described GOP or audio pack.
Method the most according to claim 1 and 2, it is characterised in that if described GOP or described audio pack the most all receive successfully, then obtain the GOP of disappearance or the audio pack of disappearance.
Method the most according to claim 3, it is characterised in that described judge that described GOP the most all receives successfully, including:
According to the total of described GOP and the memory mapping table of described GOP, described GOP the most all receives successfully to use specific algorithm to judge;
If described GOP the most all receives successfully, and obtain the sequence number of the GOP of disappearance.
Method the most according to claim 4, it is characterised in that the specific algorithm of described use judges that described GOP the most all receives successfully, including:
Described GOP the most all receives successfully to use following algorithm to judge, if described GOP the most all receives successfully, then obtains the sequence number of the GOP of described disappearance;
Int N
Char Table[M]
For(int i=0;i<N;i++)
{
If(i%8==0)
result=0x01&Table[i/8];
If(i%8==1)
result=(0x02&Table[i/8])>>1;
If(i%8==2)
result=(0x04&Table[i/8])>>2;
If(i%8==3)
result=(0x08&Table[i/8])>>3;
If(i%8==4)
result=(0x10&Table[i/8])>>4;
If(i%8==5)
result=(0x20&Table[i/8])>>5;
If(i%8==6)
result=(0x40&Table[i/8])>>6;
If(i%8==7)
result=(0x80&Table[i/8])>>7;
if(result==0)
return i;//
}
if(i==N)//
Wherein, N represents the sum of described GOP;
Table M represents the memory mapping table of described GOP;
I represents the sequence number of described GOP.
Method the most according to claim 3, it is characterised in that described judge that described audio pack the most all receives successfully, including:
According to the total of described audio pack and the memory mapping table of described audio pack, described audio pack the most all receives successfully to use specific algorithm to judge;
If described audio pack the most all receives successfully, obtain the sequence number of the audio pack of disappearance.
Method the most according to claim 6, it is characterised in that the specific algorithm of described use judges that described audio pack the most all receives successfully, including:
Described audio pack the most all receives successfully to use following algorithm to judge, if described audio pack the most all receives successfully, then obtains the sequence number of the audio pack of disappearance;
Int N
Char Table[M]
For(int i=0;i<N;i++)
{
If(i%8==0)
result=0x01&Table[i/8];
If(i%8==1)
result=(0x02&Table[i/8])>>1;
If(i%8==2)
result=(0x04&Table[i/8])>>2;
If(i%8==3)
result=(0x08&Table[i/8])>>3;
If(i%8==4)
result=(0x10&Table[i/8])>>4;
If(i%8==5)
result=(0x20&Table[i/8])>>5;
If(i%8==6)
result=(0x40&Table[i/8])>>6;
If(i%8==7)
result=(0x80&Table[i/8])>>7;
if(result==0)
return i;//
}
if(i==N)//
Wherein, N represents the sum of described audio pack;
Table M represents the memory mapping table of described audio pack;
I represents the sequence number of described audio pack.
8. the detection device before a video encapsulation, it is characterised in that including:
Creating unit, for creating the memory mapping table of video pictures group GOP and the memory mapping table of audio pack;
GOP internal memory writing unit, is used for receiving described GOP, extracts the sequence number of described GOP, and the sequence number of described GOP writes the memory mapping table of described GOP;
Described GOP internal memory writing unit, after receiving described GOP, is additionally operable to extract the sum of described GOP and preserve;
Audio pack internal memory writing unit, is used for receiving described audio pack, extracts the sequence number of described audio pack, and the sequence number of described audio pack writes the memory mapping table of described audio pack;
Described audio pack internal memory writing unit, after receiving described audio pack, is additionally operable to extract the sum of described audio pack and preserve;
Judging unit, for the memory mapping table according to the total of described GOP and described GOP, and according to the total of described audio pack and the memory mapping table of described audio pack, use specific algorithm to judge described GOP, and described audio pack the most all receives successfully.
Device the most according to claim 8, it is characterised in that also include:
Acquiring unit, for when described judging unit judges described GOP or described audio pack the most all receives successfully, then obtains the GOP of disappearance or the audio pack of disappearance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310573822.4A CN103647977B (en) | 2013-11-13 | 2013-11-13 | Detection method and apparatus used before video packaging |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310573822.4A CN103647977B (en) | 2013-11-13 | 2013-11-13 | Detection method and apparatus used before video packaging |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103647977A CN103647977A (en) | 2014-03-19 |
CN103647977B true CN103647977B (en) | 2017-01-11 |
Family
ID=50253118
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310573822.4A Expired - Fee Related CN103647977B (en) | 2013-11-13 | 2013-11-13 | Detection method and apparatus used before video packaging |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103647977B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101420619A (en) * | 2008-11-20 | 2009-04-29 | 四川长虹电器股份有限公司 | Distributed media format code transferring method |
CN101917606A (en) * | 2009-12-08 | 2010-12-15 | 新奥特(北京)视频技术有限公司 | Control method and device for transcoding system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI262660B (en) * | 2003-11-19 | 2006-09-21 | Inst Information Industry | Video transcoder adaptively reducing frame rate |
-
2013
- 2013-11-13 CN CN201310573822.4A patent/CN103647977B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101420619A (en) * | 2008-11-20 | 2009-04-29 | 四川长虹电器股份有限公司 | Distributed media format code transferring method |
CN101917606A (en) * | 2009-12-08 | 2010-12-15 | 新奥特(北京)视频技术有限公司 | Control method and device for transcoding system |
Also Published As
Publication number | Publication date |
---|---|
CN103647977A (en) | 2014-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10469915B2 (en) | Apparatus and method for delivering and receiving multimedia data in hybrid network | |
JP2005141650A (en) | Structured document encoding device, structured document encoding method and program thereof | |
CN106034252B (en) | A kind of Streaming Media processing method and processing device | |
CN1193602C (en) | Image processing method and image processing apparatus | |
CN102402542A (en) | Video tagging method and system | |
CN103179435B (en) | A kind of multi-path video data multiplexing method and device | |
US20180131974A1 (en) | Method and system for supporting random access of mpeg data | |
EP1521472A3 (en) | URI pointer system and method for the carriage of MPEG-4 data in an MPEG-2 transport stream | |
US10178418B2 (en) | Method and system for processing MPEG data | |
CN103647977B (en) | Detection method and apparatus used before video packaging | |
CN103618902B (en) | Transcoding method, device and system for video file | |
KR20080095726A (en) | Method and apparatus for packet creating and precessing | |
CN102740063A (en) | Video image transmission method, system and terminal | |
CN111010534A (en) | Real-time asynchronous video analysis method and system | |
JP5138037B2 (en) | Metadata generation method, access method and apparatus in media file format | |
CN114257879B (en) | Method and system for playing video | |
CN104506966B (en) | The coding/decoding method and device of audio, video data | |
CN113784094A (en) | Video data processing method, gateway, terminal device and storage medium | |
US10158888B2 (en) | Method and apparatus for reproducing video data | |
WO2019120004A1 (en) | Method and device for generating dynamic qr code | |
CN115866162B (en) | Video stream generation method and device, electronic equipment and storage medium | |
CN105163058A (en) | Novel video storage method | |
CN103634578B (en) | A kind of error correction method of distributed video transcoding and system | |
CN105100820B (en) | Coding method, coding/decoding method, code device and the decoding apparatus of digital media file | |
CN104363402B (en) | A kind of method and apparatus of quick display video |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A detection method and device before video packaging Effective date of registration: 20210104 Granted publication date: 20170111 Pledgee: Inner Mongolia Huipu Energy Co.,Ltd. Pledgor: TVMINING (BEIJING) MEDIA TECHNOLOGY Co.,Ltd. Registration number: Y2020990001527 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170111 Termination date: 20211113 |
|
CF01 | Termination of patent right due to non-payment of annual fee |