CN108419041A - A kind of method and apparatus of video data processing - Google Patents

A kind of method and apparatus of video data processing Download PDF

Info

Publication number
CN108419041A
CN108419041A CN201710071682.9A CN201710071682A CN108419041A CN 108419041 A CN108419041 A CN 108419041A CN 201710071682 A CN201710071682 A CN 201710071682A CN 108419041 A CN108419041 A CN 108419041A
Authority
CN
China
Prior art keywords
abstraction layer
layer unit
network abstraction
code stream
byte code
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.)
Granted
Application number
CN201710071682.9A
Other languages
Chinese (zh)
Other versions
CN108419041B (en
Inventor
秦鹏
李云鹏
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Visionvera International Information Technology Co Ltd
Original Assignee
Beijing Visionvera International Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Visionvera International Information Technology Co Ltd filed Critical Beijing Visionvera International Information Technology Co Ltd
Priority to CN201710071682.9A priority Critical patent/CN108419041B/en
Publication of CN108419041A publication Critical patent/CN108419041A/en
Application granted granted Critical
Publication of CN108419041B publication Critical patent/CN108419041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities

Abstract

An embodiment of the present invention provides a kind of method and apparatus of video data processing, it is applied to regard in networking, the method includes:After the raw bytes code stream for receiving video data, network abstraction layer unit is identified from raw bytes code stream and determines whether the type of network abstraction layer unit is preset kind;When the type of network abstraction layer unit is preset kind, extract network abstraction layer unit, then the network abstraction layer unit of extraction is reconfigured, it obtains target byte code stream and target byte code stream is sent to regarding networking playback terminal, using the embodiment of the present invention, extra or abnormal byte chip segment can be removed from the raw bytes code stream of video data, extra or abnormal byte chip segment is encountered when avoiding the decoding of the hardware decoders such as set-top box, there is blank screen when playing video, interim card, picture loses the problem of shake, it improves the fault-tolerant ability of decoder and improves the fluency of video playing.

Description

A kind of method and apparatus of video data processing
Technical field
The present invention relates to regarding networking technology field, more particularly to a kind of method and apparatus of video data processing.
Background technology
With the fast development of the network technology, the two-way communications such as video conference, video teaching the life of user, work, Study etc. is widely available.
Currently, with the widespread development regarding networking service in China, connection interaction is regarded in portion of government depending on networking high definition Very important effect is played in door and other industries, such as in safety-security area, monitoring remote video passes through monitoring device After acquiring video data, it is sent to after video data is packaged regarding networked server, by being sent to regarding connection depending on networked server It is played out after network termination, such as set-top box decoding, to realize monitoring remote video.
Currently, video data acquiring end is when video data to be packaged, it will usually add useless data or exception Data, this results in the hardware decoders such as set-top box in decoding, the problem of blank screen, interim card, picture loses shake occurs.
Invention content
In view of the above problems, it is proposed that the embodiment of the present invention overcoming the above problem or at least partly in order to provide one kind A kind of method and apparatus of video data processing to solve the above problems.
To solve the above-mentioned problems, the embodiment of the invention discloses a kind of method of video data processing, it is applied to regard connection Net, it is described regard networking include regarding networked server and regarding networking playback terminal, the method includes:
When receiving the raw bytes code stream of video data, network abstract layer is identified from the raw bytes code stream Unit;
Determine whether the type of the network abstraction layer unit is preset kind;
When it is preset kind to determine the type of the network abstraction layer unit, the network abstraction layer unit is extracted;
The network abstraction layer unit of extraction is reconfigured, target byte code stream is obtained;
By the target byte code stream by being sent to regarding networked server depending on networking, the networked server that regards is used to incite somebody to action The target byte code stream is sent to regarding networking playback terminal.
Preferably, the network abstraction layer unit includes initial code, described when the raw bytes code for receiving video data When stream, the step of identifying network abstraction layer unit from the raw bytes code stream, includes:
Receive the raw bytes code stream of video data;
Whether detect in the raw bytes code stream includes the initial code;
If so, by the raw bytes code stream before the initial code to next initial code, it is determined as network abstract layer list Member.
Preferably, the step of whether type of the determination network abstraction layer unit is preset kind include:
Obtain the type-byte code of the network abstraction layer unit;
Judge whether the type-byte code is preset byte code;
If so, determining that the type of the network abstraction layer unit is preset kind.
Preferably, the step of type-byte code for obtaining the network abstraction layer unit includes:
Obtain the bytecode of the designated position of the network abstraction layer unit;
Using the bytecode of the designated position as type-byte code.
Preferably, described the step of reconfiguring the network abstraction layer unit of extraction, obtaining target byte code stream, includes:
Determine the sequencing of network abstraction layer unit each in raw bytes code stream;
The network abstraction layer unit of extraction is ranked up according to the sequencing;
Network abstraction layer unit after sequence is reconfigured, target byte code stream is obtained.
Preferably, described to include depending on the step of networked server by being sent to depending on networking by the target byte code stream:
The target byte code stream is packaged, video data packet is obtained;
The video data packet is sent to described regard by the data link depending on networked server distribution to join Network server.
The embodiment of the present invention additionally provides a kind of device of video data processing, is applied to regard networking, described to regard networking packet It includes regarding networked server and regarding networking playback terminal, described device includes:
Identification module, for when receiving the raw bytes code stream of video data, knowing from the raw bytes code stream Network abstraction layer unit is not gone out;
Preset kind determining module, for determining whether the type of the network abstraction layer unit is preset kind;
Extraction module, for when it is preset kind to determine the type of the network abstraction layer unit, extracting the network Abstraction Layer units;
Target byte code stream composite module obtains target byte for reconfiguring the network abstraction layer unit of extraction Code stream;
Sending module, for, by being sent to regarding networked server depending on networking, described regard to join by the target byte code stream Network server is used to the target byte code stream being sent to regarding networking playback terminal.
Preferably, the network abstraction layer unit includes initial code, and the identification module includes:
Receiving submodule, the raw bytes code stream for receiving video data;
Detection sub-module, for whether detecting in the raw bytes code stream comprising the initial code;
Determination sub-module, for by the raw bytes code stream before the initial code to next initial code, being determined as network Abstraction Layer units.
Preferably, the preset kind determining module includes:
Type-byte code acquisition submodule, the type-byte code for obtaining the network abstraction layer unit;
Preset byte code judging submodule, for judging whether the type-byte code is preset byte code;
Preset kind determination sub-module, for determining that the type of the network abstraction layer unit is preset kind.
Preferably, the type-byte code acquisition submodule includes:
Specified bytes code acquiring unit, the bytecode of the designated position for obtaining the network abstraction layer unit;
Type-byte code determination unit, for using the bytecode of the designated position as type-byte code.
Preferably, the target byte code stream composite module includes:
Sequence determination sub-module, the sequencing for determining network abstraction layer unit each in raw bytes code stream;
Sorting sub-module, for the network abstraction layer unit of extraction to be ranked up according to the sequencing;
Submodule is combined, for reconfiguring the network abstraction layer unit after sequence, obtains target byte code stream.
Preferably, the sending module includes:
Encapsulation submodule obtains video data packet for the target byte code stream to be packaged;
Sending submodule, for the video data packet to be passed through the data link regarding networked server distribution It is sent to described regarding networked server.
The embodiment of the present invention includes following advantages:
In the embodiment of the present invention, after receiving the raw bytes code stream of video data, identified from raw bytes code stream Go out network abstraction layer unit and determines whether the type of network abstraction layer unit is preset kind;When the class of network abstraction layer unit When type is preset kind, network abstraction layer unit is extracted, then the network abstraction layer unit of extraction is reconfigured, obtains target Byte code stream and by target byte code stream be sent to regarding networking playback terminal can be from video data using the embodiment of the present invention Raw bytes code stream in identify type be video data network abstraction layer unit and reconfigured, obtain target word Code stream is saved, the extra or abnormal byte chip segment in raw bytes code stream is eliminated, avoids the decoding of the hardware such as set-top box Device encounters extra or abnormal byte chip segment when decoding, occur blank screen, interim card when playing video, and picture loses shake Problem improves the fault-tolerant ability of decoder and improves the fluency of video playing.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of step flow chart of the embodiment of the method for video data processing of the present invention;
Fig. 2 is a kind of process chart of video data of the present invention;
Fig. 3 is a kind of structure diagram of the device embodiment of video data processing of the present invention;
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Referring to Fig.1, a kind of step flow chart of the embodiment of the method for video data processing of the present invention, this method are shown It can be applied to regard in networking, it is described to regard networking including regarding networked server and regarding networking playback terminal, specifically including following step Suddenly:
Step 101, when receiving the raw bytes code stream of video data, net is identified from the raw bytes code stream Network Abstraction Layer units;
In the embodiment of the present invention, video data can be the data acquired by the monitor terminal (camera) regarding networking, The raw bytes code of video data can be encoded to by H.264 coding standard depending on the video data that the monitor terminal of networking acquires Stream, compared with other existing video encoding standards, H.264 coding can provide more outstanding image under identical bandwidth Quality, and the compression efficiency under same image quality improves 2 times or so than other standards (MPEG2).H.264 it encodes It is bytestream format that mode, which can be by video data encoding, such as is encoded into the byte code stream of 16 systems.
H.264 it is the difference for solving the network transmission in different application.It defines two layers:VCL (video coding layer, Video Coding Layer) it is responsible for efficient video frequency content expressing, NAL (network abstraction layer, Network AbstractionLayer) It is responsible for that data are packaged and are transmitted in a manner of appropriate required by network.NAL is with NALU (network abstraction layer unit, NAL Unit) coded data is supported to be transmitted in based on packet-switch technology network for unit.Therefore, video counts can received According to raw bytes code stream after, network abstraction layer unit is therefrom identified, specifically, step 101 may include following sub-step:
Sub-step 1011 receives the raw bytes code stream of video data;
In the embodiment of the present invention, raw bytes code stream can be hexadecimal byte code stream, such as following bytecode Stream is hexadecimal raw bytes code stream:
00 00 00 01 2C 00 10 32 20 6E 75 6D 20 30 00 80 00 00 00 01 26 05 1A DC……
It is only the example of hexadecimal raw bytes code stream above, naturally it is also possible to be the raw bytes of other systems Code stream, such as can also be binary raw bytes code stream, carried out when implementing the embodiment of the present invention binary system and 16 into The conversion of system, the embodiment of the present invention are not limited the system of raw bytes code stream herein.
Whether sub-step 1012, it includes the initial code to detect in the raw bytes code stream;
In order to enable decoder can very easily detect the boundary of network abstraction layer unit, network abstraction is taken out successively Layer unit is decoded, and H.264 adds initial code before each network abstraction layer unit:" 00000001 " or " 000001 ", On certain form of medium, for the convenience of addressing, it is desirable that byte code stream be aligned in length or some constant it is whole Several times, so " 0 " of several bytes is added before initial code to fill, such as it is 4 bit byte length to require byte code stream, then exists Increase a bit byte " 00 " before bytecode " 000001 ".
In the embodiment of the present invention, detect raw bytes code stream in whether comprising initial code can first detect receive it is original Whether include " 000001 " in byte code stream, if there is " 000001 ", then explanation detects network abstraction layer unit, otherwise after Continuous to detect whether there is " 00000001 ", if there is " 00000001 ", then explanation detects network abstraction layer unit, in this way according to Secondary cycle detection is until raw bytes code stream terminates.It can specifically be recycled and be detected with byte-by-byte, such as detected successively Byte " 00 " when " 00 ", detects whether a following bit byte is " 01 ", if so, detect initial code " 000001 ", if It is no, all it is " 00 " when detecting continuous triplet, then detects whether next bit is " 01 ", if then detecting initial code “00000001”.Certainly can also integrally recycle matched method using initial code, for example, by initial code " 000001 " it is whole with 3 bytes in raw bytes code stream carry out whole matching, specifically, taking the nth byte and N in raw bytes code stream The first, second byte after a byte forms three bytes and is matched with initial code " 000001 ", and N+1 is taken again after the completion of matching Three bytes of the first, second byte composition newly after a byte and the N+1 byte continue to match, in this way with initial code Length (3 or 4) is the period, and byte-by-byte takes the byte section of period word length to be matched with initial code.
In the embodiment of the present invention, by using circulation searching initial code, can effectively it identify in raw bytes code stream Network abstraction layer unit, can subsequently to determine the type of network abstraction layer unit, to further determine that network abstract layer list Whether member is video data.
Raw bytes code stream before the initial code to next initial code is determined as network abstraction by sub-step 1013 Layer unit.
Due to H.264 adding initial code before each network abstraction layer unit:00000001 or 000001 is used as network The beginning of Abstraction Layer units indicates that current network Abstraction Layer units terminate, next network when detecting next initial code Abstraction Layer units start, and therefore, can start initial code to be determined as net to the raw bytes code stream before next initial code Network Abstraction Layer units.
In the embodiment of the present invention, after receiving the raw bytes code stream of video data, cycle detection raw bytes code stream In whether there is initial code, if it is present determine two initial codes between byte code stream be network abstraction layer unit.
Step 102, determine whether the type of the network abstraction layer unit is preset kind;
In the raw bytes code stream of video data, may includes third party and monitor some increased useless numbers of resource According to it is either abnormal when generate and the unrelated byte chip segment of video data, these unrelated byte chip segments also network consisting Abstraction Layer units.In the h .264 standard, each network abstraction layer unit is provided with type, therefore can pass through network abstract layer The type of unit determines whether network abstraction layer unit is video data, and specific step 102 may include following sub-step:
Sub-step 1021 obtains the type-byte code of the network abstraction layer unit;
In h .264, the type for defining the first bit byte expression network abstraction layer unit after initial code, if risen Beginning code is nib code " 00 00 00 01 ", then therefore the 5th as type-byte code can obtain network abstraction The bytecode of the designated position of layer unit, using the bytecode of designated position as type-byte code.
For example, in raw bytes code stream below, 2C after 00 00 00 01,26 are type-byte code.
00 00 00 01 2C 00 10 32 20 6E 75 6D 20 30 00 80 00 00 00 01 26 05 1A DC……
Therefore, when recognizing a network abstraction layer unit, the bytecode that can obtain designated position is taken out as network As the type-byte code of layer unit.
Sub-step 1022 judges whether the type-byte code is preset byte code;
In practical applications, video is made of the static image of multiframe, so for the little video of one section of variation, In coding, a complete picture frame A can be first encoded out, subsequent picture frame B is only encoded and the difference of picture frame A, this The size of sampled images frame B just only has a part of full frame images frame A, if the picture frame C variations after picture frame B are little, It can continue the encoded image frame C in a manner of picture frame B, cycle is gone down in this way, this section of video is known as a sequence, and (sequence is exactly Have the one piece of data of same characteristics), when some image and image change before are very big, the picture frame next life of front can not be referred to At then terminating a upper sequence, start next section of sequence, that is, regenerate a complete image frame A1, subsequent image Frame just refers to complete image frame A1 and generates, only the difference content of write-in and complete image frame A1, in h .264, complete image Frame definition is I frames, and remaining image frame definition is that P frames also define parameter set, parameter in order to make decoder accurately decode Collection is one group and seldom changes, and provides the data of decoded information, including sequence parameter set and picture parameter set, wherein sequential parameter Collection acts on a series of continuous coded images, and picture parameter set act on it is one or more independent in encoded video sequence Image.
In h .264, it is as follows that sequence parameter set, picture parameter set, I frames, the value of P frames are defined:
0x67:Sequence parameter set (SPS)
0x68:Picture parameter set (PPS)
0x65:I frames (IDR)
0x61:P frames (non-IDR Slice)
Therefore, it is 0x67,0x68,0x65,0x61 that preset byte code, which can be arranged, obtains the type of network abstraction layer unit After bytecode, it can be determined that whether type-byte code is one in above-mentioned setting preset byte code, if so, executing sub-step 1023, it otherwise, then jumps out, continues the type for judging next network abstraction layer unit.
Certainly, above-mentioned sequence parameter set, picture parameter set, I frames, P frames value can also be metric numerical value, example Such as:
7:Sequence parameter set (SPS)
8:Picture parameter set (PPS)
5:I frames (IDR)
1:P frames (non-IDR Slice)
Above-mentioned value 7,8,5,1 is that 0x67,0x68,0x65,0x61 are obtained after hexadecimal is converted to the decimal system, certainly It can also be indicated with other systems, such as binary system etc., the embodiment of the present invention is to sequence parameter set, picture parameter set, I Frame, P frames value mode be not limited.
Sub-step 1023 determines that the type of the network abstraction layer unit is preset kind.
When the type-byte code of network abstraction layer unit is preset byte code, for example, the type of network abstraction layer unit It when bytecode is one in 0x67,0x68,0x65,0x61, determines that the type of network abstraction layer unit is preset kind, i.e., should Network abstraction layer unit is one in sequence parameter set, picture parameter set, I frames, P frames, is and the relevant network of video data Abstraction Layer units.If not preset kind, then illustrate the data that network abstraction layer unit is extra or abnormal.
In the embodiment of the present invention, after identifying network abstraction layer unit, the type-byte code of network abstraction layer unit is obtained, The type of network abstraction layer unit is determined by type-byte code, it can be from raw bytes code stream, it is determined that video data Byte code stream and non-video data byte code stream, to remove the byte code stream of non-video data.
Step 103, when it is preset kind to determine the type of the network abstraction layer unit, the network abstract layer is extracted Unit;
When it is preset kind to determine the type of network abstraction layer unit, network abstraction layer unit is extracted, is stored to caching In.
In the embodiment of the present invention, preset kind be with the relevant sequence parameter set of video, picture parameter set, I frames, P frames, because This network abstraction layer unit extracted must be video data.
Step 104, the network abstraction layer unit of extraction is reconfigured, obtains target byte code stream.
In practical applications, can be extracted a frame data network abstraction layer unit after, reconfigure a frame data, Specific step 104 may include following sub-step:
Sub-step 1041 determines the sequencing of network abstraction layer unit each in raw bytes code stream;
The network abstraction layer unit of extraction is ranked up by sub-step 1042 according to the sequencing;
Sub-step 1043 reconfigures the network abstraction layer unit after sequence, obtains target byte code stream.
In the embodiment of the present invention, the sequence that each network abstraction layer unit can be extracted as sequencing, then according to Sequencing reconfigures again after being ranked up, and obtains target byte code stream.
The network abstraction layer unit for being combined into target byte code stream is entirely video data, therefore, in target byte code stream There is no the extra extra bytecode flow sections unrelated with video data, can promote quality and the playback terminal decoding of video The fault-tolerant ability of device, decoding efficiency.
Step 105, described to regard the Internet services by the target byte code stream by being sent to regarding networked server depending on networking Device is used to the target byte code stream being sent to regarding networking playback terminal.
In one preferred embodiment of the invention, step 105 includes following sub-step:
The target byte code stream is packaged, obtains video data packet by sub-step 1051;
In the embodiment of the present invention, after being combined into a frame target byte code stream, need to be packaged to carry out data transmission.Example It is encapsulated as carried out H.264 video data PS.In target byte code stream, sequence parameter set, picture parameter set usually before I frames, Therefore the network abstraction layer unit of sequence parameter set, picture parameter set and I frames can be packaged into a PS packet, including PS packets Head and the packet header PES then directly can add the packet header PS for P frames and the packet header PES is packaged into PS packets.
Sub-step 1052 sends the video data packet by the data link regarding networked server distribution Networked server is regarded to described.
In practical applications, video data can be acquired, handle in the monitor terminal of Ethernet, encapsulate after be sent to Depending on networked server, can also be acquired, handle depending on networked terminals, encapsulate after be sent to regarding networked server.
Networking is regarded as the network with centralized control functions, including main control server and undernet equipment, subordinate's net Network equipment includes terminal, and one of the core idea depending on networking is, by notifying switching equipment to be directed to when secondary by main control server The downstream communications link of service matches table, and the table for being then based on the configuration carries out the transmission of data packet, that is, regards the communication party in networking Method includes:
Depending on networked server configuration when time downlink data communication link of service:
By source terminal (such as ethernet terminal or regard networked terminals) send when time data packet of service, according to lower line number Target terminal is sent to according to communication link (as regarded networked server).
In embodiments of the present invention, it configures when time downlink data communication link of service includes:Notice is when under time service Switching equipment involved by row data communication link matches table;
Furthermore, include according to the transmission of downlink data communication link:The configured table of inquiry, switching equipment is to being connect The data packet of receipts is transmitted by corresponding port.
Specific in the embodiment of the present invention, ethernet terminal or video data packet is sent to regarding networking clothes depending on networked terminals Before business, with regarding networking connect during, regard networked server according to ethernet terminal or regarding connection terminal address, be with Too network termination or the data communication regarding networked terminals distribution ethernet terminal or regarding networked terminals and between networked server Link, the data link information include the equipment (such as ethernet gateway or interchanger) that transmit process is related to and end Mouthful, therefore, the video data packet after encapsulation can be sent to regarding networked server, specifically according to data link information , by taking ethernet terminal as an example, video data packet is sent to therewith according to Ethernet protocol by video data packet in ethernet networks The ethernet gateway of connection, in ethernet gateway after protocol conversion, according to data link information, by video data packet It is sent to next equipment according to specified port, networked server is regarded until reaching, video data is received depending on networked server Bao Hou, what video data packet can be sent to order request regards networked terminals, is played out after being decoded depending on networked terminals.
In the embodiment of the present invention, after the extra byte chip segment removal in the raw bytes code stream of video data, weight Combination nova is sent to after encapsulation regarding networked server, at target byte code stream by being sent to regarding networked terminals depending on networked server Decoding plays, such as set-top box etc. is decoded, and improves the fault-tolerant ability of set-top box, decoding efficiency and improves video Play quality.
Embodiment in order to better illustrate the present invention illustrates the embodiment of the present invention with one below:
With reference to shown in Fig. 2, for an exemplary flow chart of video data of the present invention processing, video data process flow packet It includes:
S1:Receive the hexadecimal raw bytes code stream of H.264 video data;
S2:00 00 01 are searched in the raw bytes code stream, are such as found, are then executed S3;Otherwise S4 is executed;
S3:Obtain quintet code (if initial code is 00 00 01, a byte 00 is mended in front);
S4:00 00 00 01 are searched in the raw bytes code stream, are such as found and are executed S3, otherwise return to S1;
S5:Judge whether the value of quintet code is equal to 5 or 7 or 8 or 1, if so, S6 is executed, if it is not, executing S7.
S6 is combined into target byte code stream;
S7 is jumped out.
In this example, one section of hexadecimal raw bytes code stream is received, such as:
00 00 00 01 2C 00 10 32 20 6E 75 6D 20 30 00 80 00 00 00 01 26 05 1A DC 36 31 31 46 52 41 4D 45
" 000001 " is first looked in raw bytes code stream, and " 00000001 " is searched if searching less than " 000001 ", If there is " 000001 " or " 00000001 ", then its latter position is judged, " 2C " such as among the above turns hexadecimal " 2C " After being changed to the decimal system, whether metric value is 5 or 7 or 8 or 1, if it is will be after " 000001 " or " 00000001 " Until the raw bytes code stream before next " 000001 " or " 00000001 " extracts, target byte code is recombined Stream, in this manner it is possible to remove byte chip segment extra in raw bytes code stream (" 000001 " or " 00000001 " latter position The value of byte is not 5 or 7 or 8 or 1), ensures that target byte code stream is entirely video data.
In the embodiment of the present invention, after receiving the raw bytes code stream of video data, identified from raw bytes code stream Go out network abstraction layer unit and determines whether the type of network abstraction layer unit is preset kind;When the class of network abstraction layer unit When type is preset kind, network abstraction layer unit is extracted, then the network abstraction layer unit of extraction is reconfigured, obtains target Byte code stream and by target byte code stream be sent to regarding networking playback terminal can be from video data using the embodiment of the present invention Raw bytes code stream in identify type be video data network abstraction layer unit and reconfigured, obtain target word Code stream is saved, byte chip segment extra or abnormal in raw bytes code stream is eliminated, is avoided regarding networking set-top box decoding When encounter extra or abnormal byte chip segment, occur the problem of blank screen, interim card, picture loses shake when playing video, It improves the decoded fault-tolerant ability of set-top box and improves the fluency of video playing.
It should be noted that for embodiment of the method, for simple description, therefore it is all expressed as a series of action group It closes, but those skilled in the art should understand that, the embodiment of the present invention is not limited by the described action sequence, because according to According to the embodiment of the present invention, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, and the involved action not necessarily present invention is implemented Necessary to example.
With reference to Fig. 3, show that a kind of structure diagram of the device embodiment of video data processing of the present invention, the device are answered It networks for regarding, described to regard networking including regarding networked server and regarding networking playback terminal, described device includes:
Identification module 201, for when receiving the raw bytes code stream of video data, from the raw bytes code stream Identify network abstraction layer unit;
Preset kind determining module 202, for determining whether the type of the network abstraction layer unit is preset kind;
Extraction module 203, for when it is preset kind to determine the type of the network abstraction layer unit, extracting the net Network Abstraction Layer units;
Target byte code stream composite module 204 obtains target word for reconfiguring the network abstraction layer unit of extraction Save code stream;
Sending module 205, for by the target byte code stream by being sent to regarding networked server depending on networking, it is described to regard Networked server is used to the target byte code stream being sent to regarding networking playback terminal.
In one preferred embodiment of the invention, the network abstraction layer unit includes initial code, the identification module 201 include:
Receiving submodule, the raw bytes code stream for receiving video data;
Detection sub-module, for whether detecting in the raw bytes code stream comprising the initial code;
Determination sub-module, for by the raw bytes code stream before the initial code to next initial code, being determined as network Abstraction Layer units.
In one preferred embodiment of the invention, the preset kind determining module 202 includes:
Type-byte code acquisition submodule, the type-byte code for obtaining the network abstraction layer unit;
Preset byte code judging submodule, for judging whether the type-byte code is preset byte code;
Preset kind determination sub-module, for determining that the type of the network abstraction layer unit is preset kind.
The type-byte code acquisition submodule includes:
Specified bytes code acquiring unit, the bytecode of the designated position for obtaining the network abstraction layer unit;
Type-byte code determination unit, for using the bytecode of the designated position as type-byte code.
In one preferred embodiment of the invention, the target byte code stream composite module 204 includes:
Sequence determination sub-module, the sequencing for determining network abstraction layer unit each in raw bytes code stream;
Sorting sub-module, for the network abstraction layer unit of extraction to be ranked up according to the sequencing;
Submodule is combined, for reconfiguring the network abstraction layer unit after sequence, obtains target byte code stream.
In one preferred embodiment of the invention, the sending module 205 includes:
Encapsulation submodule obtains video data packet for the target byte code stream to be packaged;
Sending submodule, for the video data packet to be passed through the data link regarding networked server distribution It is sent to described regarding networked server.
For device embodiments, since it is basically similar to the method embodiment, so fairly simple, the correlation of description Place illustrates referring to the part of embodiment of the method.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with The difference of other embodiment, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can be provided as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be with reference to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in flow and/or box combination.These can be provided Computer program instructions are set to all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine so that is held by the processor of computer or other programmable data processing terminal equipments Capable instruction generates for realizing in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes The device of specified function.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing terminal equipments In computer-readable memory operate in a specific manner so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one flow of flow chart or multiple flows and/or one side of block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing terminal equipments so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one flow of flow chart or multiple flows And/or in one box of block diagram or multiple boxes specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also include other elements that are not explicitly listed, or further include for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device including the element.
Above to a kind of method and apparatus of video data processing provided by the present invention, it is described in detail, herein In apply specific case principle and implementation of the present invention are described, the explanation of above example is only intended to sides Assistant solves the method and its core concept of the present invention;Meanwhile for those of ordinary skill in the art, think of according to the present invention Think, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as pair The limitation of the present invention.

Claims (12)

1. a kind of method of video data processing, which is characterized in that it networks applied to regarding, it is described to regard networking including regarding the Internet services Device and regarding networking playback terminal, the method includes:
When receiving the raw bytes code stream of video data, network abstract layer list is identified from the raw bytes code stream Member;
Determine whether the type of the network abstraction layer unit is preset kind;
When it is preset kind to determine the type of the network abstraction layer unit, the network abstraction layer unit is extracted;
The network abstraction layer unit of extraction is reconfigured, target byte code stream is obtained;
By the target byte code stream by being sent to regarding networked server depending on networking, it is described depending on networked server for will be described Target byte code stream is sent to regarding networking playback terminal.
2. described to work as according to the method described in claim 1, it is characterized in that, the network abstraction layer unit includes initial code When receiving the raw bytes code stream of video data, the step of identifying network abstraction layer unit from the raw bytes code stream Including:
Receive the raw bytes code stream of video data;
Whether detect in the raw bytes code stream includes the initial code;
If so, by the raw bytes code stream before the initial code to next initial code, it is determined as network abstraction layer unit.
3. according to the method described in claim 1, it is characterized in that, the type of the determination network abstraction layer unit whether Include for the step of preset kind:
Obtain the type-byte code of the network abstraction layer unit;
Judge whether the type-byte code is preset byte code;
If so, determining that the type of the network abstraction layer unit is preset kind.
4. according to the method described in claim 3, it is characterized in that, the type-byte for obtaining the network abstraction layer unit Code the step of include:
Obtain the bytecode of the designated position of the network abstraction layer unit;
Using the bytecode of the designated position as type-byte code.
5. method according to claim 1 or 3, which is characterized in that the network abstraction layer unit by extraction group again It closes, the step of obtaining target byte code stream includes:
Determine the sequencing of network abstraction layer unit each in raw bytes code stream;
The network abstraction layer unit of extraction is ranked up according to the sequencing;
Network abstraction layer unit after sequence is reconfigured, target byte code stream is obtained.
6. according to the method described in claim 1, it is characterized in that, described send the target byte code stream by regarding networking Extremely include depending on the step of networked server:
The target byte code stream is packaged, video data packet is obtained;
The video data packet is sent to by the data link regarding networked server distribution and described regard networking and takes Business device.
7. a kind of device of video data processing, which is characterized in that it networks applied to regarding, it is described to regard networking including regarding the Internet services Device and regarding networking playback terminal, described device includes:
Identification module, for when receiving the raw bytes code stream of video data, being identified from the raw bytes code stream Network abstraction layer unit;
Preset kind determining module, for determining whether the type of the network abstraction layer unit is preset kind;
Extraction module, for when it is preset kind to determine the type of the network abstraction layer unit, extracting the network abstraction Layer unit;
Target byte code stream composite module obtains target byte code stream for reconfiguring the network abstraction layer unit of extraction;
Sending module, for by the target byte code stream by being sent to regarding networked server depending on networking, it is described regard networking clothes Business device is used to the target byte code stream being sent to regarding networking playback terminal.
8. device according to claim 7, which is characterized in that the network abstraction layer unit includes initial code, the knowledge Other module includes:
Receiving submodule, the raw bytes code stream for receiving video data;
Detection sub-module, for whether detecting in the raw bytes code stream comprising the initial code;
Determination sub-module, for by the raw bytes code stream before the initial code to next initial code, being determined as network abstraction Layer unit.
9. device according to claim 7, which is characterized in that the preset kind determining module includes:
Type-byte code acquisition submodule, the type-byte code for obtaining the network abstraction layer unit;
Preset byte code judging submodule, for judging whether the type-byte code is preset byte code;
Preset kind determination sub-module, for determining that the type of the network abstraction layer unit is preset kind.
10. device according to claim 9, which is characterized in that the type-byte code acquisition submodule includes:
Specified bytes code acquiring unit, the bytecode of the designated position for obtaining the network abstraction layer unit;
Type-byte code determination unit, for using the bytecode of the designated position as type-byte code.
11. the device according to claim 7 or 9, which is characterized in that the target byte code stream composite module includes:
Sequence determination sub-module, the sequencing for determining network abstraction layer unit each in raw bytes code stream;
Sorting sub-module, for the network abstraction layer unit of extraction to be ranked up according to the sequencing;
Submodule is combined, for reconfiguring the network abstraction layer unit after sequence, obtains target byte code stream.
12. device according to claim 7, which is characterized in that the sending module includes:
Encapsulation submodule obtains video data packet for the target byte code stream to be packaged;
Sending submodule, for sending the video data packet by the data link regarding networked server distribution Networked server is regarded to described.
CN201710071682.9A 2017-02-09 2017-02-09 Video data processing method and device Active CN108419041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710071682.9A CN108419041B (en) 2017-02-09 2017-02-09 Video data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710071682.9A CN108419041B (en) 2017-02-09 2017-02-09 Video data processing method and device

Publications (2)

Publication Number Publication Date
CN108419041A true CN108419041A (en) 2018-08-17
CN108419041B CN108419041B (en) 2021-07-30

Family

ID=63125075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710071682.9A Active CN108419041B (en) 2017-02-09 2017-02-09 Video data processing method and device

Country Status (1)

Country Link
CN (1) CN108419041B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660595A (en) * 2018-11-08 2019-04-19 视联动力信息技术股份有限公司 A kind of remote operation method and device of real-time street view
CN109982020A (en) * 2019-02-26 2019-07-05 南京邮电大学 A kind of storage of video and search method
CN110149497A (en) * 2019-04-09 2019-08-20 视联动力信息技术股份有限公司 A kind of view networked data transmission method, apparatus, system and readable storage medium storing program for executing
CN114339408A (en) * 2021-11-26 2022-04-12 惠州华阳通用电子有限公司 Video decoding method
CN114466225A (en) * 2022-02-10 2022-05-10 北京沃东天骏信息技术有限公司 Video data playing method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325717A (en) * 2008-07-11 2008-12-17 清华大学 H.264/SVC code flow regrouping method for OFDM protection
CN102868939A (en) * 2012-09-10 2013-01-09 杭州电子科技大学 Method for synchronizing audio/video data in real-time video monitoring system
US20150110118A1 (en) * 2013-10-22 2015-04-23 Canon Kabushiki Kaisha Method of processing disordered frame portion data units
CN104796765A (en) * 2015-04-23 2015-07-22 天脉聚源(北京)教育科技有限公司 Method and device for extracting SPS (standard positioning services) and PPS (precise positioning services) from H264 frames

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325717A (en) * 2008-07-11 2008-12-17 清华大学 H.264/SVC code flow regrouping method for OFDM protection
CN102868939A (en) * 2012-09-10 2013-01-09 杭州电子科技大学 Method for synchronizing audio/video data in real-time video monitoring system
US20150110118A1 (en) * 2013-10-22 2015-04-23 Canon Kabushiki Kaisha Method of processing disordered frame portion data units
CN104796765A (en) * 2015-04-23 2015-07-22 天脉聚源(北京)教育科技有限公司 Method and device for extracting SPS (standard positioning services) and PPS (precise positioning services) from H264 frames

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘路: "基于TI Davinci平台的高清网络数字摄像机软件设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660595A (en) * 2018-11-08 2019-04-19 视联动力信息技术股份有限公司 A kind of remote operation method and device of real-time street view
CN109660595B (en) * 2018-11-08 2021-08-13 视联动力信息技术股份有限公司 Remote operation method and device for real-time street view
CN109982020A (en) * 2019-02-26 2019-07-05 南京邮电大学 A kind of storage of video and search method
CN110149497A (en) * 2019-04-09 2019-08-20 视联动力信息技术股份有限公司 A kind of view networked data transmission method, apparatus, system and readable storage medium storing program for executing
CN114339408A (en) * 2021-11-26 2022-04-12 惠州华阳通用电子有限公司 Video decoding method
CN114466225A (en) * 2022-02-10 2022-05-10 北京沃东天骏信息技术有限公司 Video data playing method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN108419041B (en) 2021-07-30

Similar Documents

Publication Publication Date Title
CN108419041A (en) A kind of method and apparatus of video data processing
KR100651486B1 (en) Apparatus and Method for transporting MPEG contents through Internet Protocol Network
CN108880926B (en) Server monitoring method and device
US8649278B2 (en) Method and system of multimedia service performance monitoring
KR20130040090A (en) Apparatus and method for delivering multimedia data in hybrid network
CN109756789B (en) Method and system for processing packet loss of audio and video data packet
CN109462761A (en) A kind of video encoding/decoding method and device
WO2014183478A1 (en) Video encoding method and apparatus
CN108881958B (en) Multimedia data stream packaging method and device
US9936266B2 (en) Video encoding method and apparatus
US20060215711A1 (en) Apparatus for receiving packet stream
CN108632679A (en) A kind of method of multi-medium data transmission and a kind of regarding networked terminals
CN109743555B (en) Information processing method and system based on video network
CN103339930A (en) Method and apparatus for managing content distribution over multiple terminal devices in collaborative media system
CN109905729A (en) The method and apparatus for sending multi-medium data package using cross-layer optimizing
KR102392888B1 (en) Method and Apparatus for Improving Packet Loss Recovery
US10298975B2 (en) Communication apparatus, communication data generation method, and communication data processing method
CN110661992A (en) Data processing method and device
CN110086773B (en) Audio and video data processing method and system
CN110570614B (en) Video monitoring system and intelligent camera
CN103517027B (en) Video data processing method and electronic equipment
CN111355927B (en) Monitoring equipment determining method, device, equipment and storage medium based on visual networking
CN110795008B (en) Picture transmission method and device and computer readable storage medium
CN110474956B (en) Method and device for sealing number of video networking equipment, electronic equipment and readable storage medium
CN109714641B (en) Data processing method and device based on video network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100000 Dongcheng District, Beijing, Qinglong Hutong 1, 1103 house of Ge Hua building.

Applicant after: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd.

Address before: A1103-1113, Gehua building, Dongcheng District, Beijing

Applicant before: BEIJING VISIONVERA INTERNATIONAL INFORMATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant