CN103686205B - Method and device for code stream transfer on basis of open network video interface forum (ONVIF) protocol - Google Patents
Method and device for code stream transfer on basis of open network video interface forum (ONVIF) protocol Download PDFInfo
- Publication number
- CN103686205B CN103686205B CN201310750612.8A CN201310750612A CN103686205B CN 103686205 B CN103686205 B CN 103686205B CN 201310750612 A CN201310750612 A CN 201310750612A CN 103686205 B CN103686205 B CN 103686205B
- Authority
- CN
- China
- Prior art keywords
- code stream
- decoding
- coding side
- decoding parametric
- packet
- 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.)
- Active
Links
Abstract
The invention provides a method and device for code stream transfer on the basis of the open network video interface forum (ONVIF) protocol. The method and the device are applied to a media forwarding server. The method comprises the steps of receiving RTSP DESCRIBE answering messages of a coding end in the RTSP negotiation process, obtaining decoding parameters PPS/SPS from the messages, and storing corresponding relations of the decoding parameters and the coding end; when receiving code stream data of the coding end, judging whether the decoding parameters exist in front of a first frame first packet in the code stream data; if the decoding parameters do not exist in front of the first frame first packet in the code stream data, querying the decoding parameters corresponding to the coding end, performing encapsulation treatment on the decoding parameters, adding the decoding parameters to the front of the first frame first packet, and modifying serial numbers of the first frame first packet and follow-up data packets; and performing no treatment if the decoding parameters exist in front of the first frame first packet in the code stream data. According to the method and the device for code stream transfer, standardization of code streams is achieved, what a decoding end receives is all standard code streams, and accordingly various networking schemes are supported to the largest extent and the requirements of interconnection of video products are met.
Description
Technical field
The present invention relates to Streaming Media field, more particularly to a kind of code stream conversion method and device based on ONVIF agreements.
Background technology
As the full speed of security protection industry develops, ONVIF obtains in recent years higher concern, and each producer supports one after another ONVIF
Agreement is interconnected.In any networking, decoding end is required for knowing the decoding parametric PPS of code stream(Picture
Parameter Sets, picture parameter set)And SPS(Sequence Parameter Sets, sequence parameter set), can be right
Code stream is decoded.The decoding parametric of ONVIF protocol definitions code stream can carry the DESCRIBE response reports consulted in RTSP
Wen Zhong, it is also possible to carry in code stream H.264, or all carry in both.
Different manufacturers realizes difference, and part manufacturer does not carry decoding parametric in code stream, only in RTSP negotiations
Carry, this requires that decoding end needs direct-connected with coding side and supports that RTSP agreements, decoding end can just get decoding ginseng
Number is decoded.If a decoding end does not support RTSP agreements, or when not can determine that the concrete condition of decoding end, it is desirable to have
The intervention of intermediate module is assisting.
Media forwarding server(MS, Media Server)As intermediate module, solution is carried generally in RTP extended fields
Code parameter PPS/SPS, the decoding parametric includes coded format, code level, the high information of image width.This kind of mode is to extension
A kind of privately owned definition of field, needs decoding end according to certain agreement to parse the parameter in these fields, so not
It is general.In addition, need the code stream type Payload Type for using to need also exist for being carried in RTP extended fields during decoding, by
Different Payload Type may be defined in different vendor, accordingly, it would be desirable to decoding end also parses this parameter according to agreement, so
Equally exist uncurrent problem.
The content of the invention
In view of this, the present invention provides a kind of code stream conversion method based on ONVIF agreements, is applied to media forwarding service
Device, it is characterised in that the method is comprised the following steps:
Step A, in RTSP negotiations processes, receives the RTSP DESCRIBE response messages of coding side, obtains from the message
Decoding parametric PPS/SPS is taken, and preserves the corresponding relation of the decoding parametric and the coding side;
Step B, when the bit stream data of coding side is received, judges to whether there is before the I frame first packets in the bit stream data
Decoding parametric, if not existing, inquires about the corresponding decoding parametric of the coding side, and the decoding parametric is carried out into package process, addition
To before I frame first packets, and change the sequence number of I frames first packet and follow-up data bag;If existing, do not deal with.
The present invention also provides a kind of code stream conversion equipment based on ONVIF agreements, is applied to media forwarding server, and it is special
Levy and be, the device includes:
Control negotiation element, in RTSP negotiations processes, receiving the RTSP DESCRIBE response messages of coding side,
Decoding parametric PPS/SPS is obtained from the message, and preserves the corresponding relation of the decoding parametric and the coding side;
Code stream converting unit, for when the bit stream data of coding side is received, judging the I frame first packets in the bit stream data
It is front, if not existing, to inquire about the corresponding decoding parametric of the coding side with the presence or absence of decoding parametric, the decoding parametric is carried out into package
Process, before being added to I frame first packets, and change the sequence number of I frames first packet and follow-up data bag;If existing, do not deal with.
The present invention solves the standardization issue of code stream, and make that decoding end receives is all standard code stream, so as to maximum journey
The various networking plans of support of degree and realize the demand that video product interconnects.
Description of the drawings
Fig. 1 is the logical construction and its base of the code stream conversion equipment in one embodiment of the present invention based on ONVIF networkings
The schematic diagram of plinth hardware environment.
Fig. 2 is the flow chart of the code stream conversion method in one embodiment of the present invention based on ONVIF networkings.
Fig. 3 is the basic structure schematic diagram of network video monitor and control system networking in one embodiment of the present invention.
Fig. 4 is sequence number rearrangement schematic diagram in one embodiment of the present invention.
Specific embodiment
The present invention provides a kind of code stream conversion equipment based on ONVIF agreements, and the device is applied in media forwarding server
On, it is implemented in software below as a example by illustrate, but the present invention is not precluded from other realities such as hardware or logical device
Existing mode.As shown in figure 1, the media forwarding server generally includes CPU, internal memory, nonvolatile memory and other hardware.
The virtual bench of the code stream conversion equipment as a logic level of ONVIF agreements should be based on, it is run by CPU.The dress
Put including control negotiation element and code stream converting unit.Refer to the specific implementation steps of Fig. 2.
Step 101, in RTSP negotiations processes, receives the RTSP DESCRIBE response messages of coding side, from the message
Decoding parametric PPS/SPS is obtained, and preserves the corresponding relation of the decoding parametric and the coding side;
Step 102, when the bit stream data of coding side is received, judges whether deposited before the I frame first packets in the bit stream data
In decoding parametric, if not existing, the corresponding decoding parametric of the coding side is inquired about, the decoding parametric is carried out into package process, added
Before being added to I frame first packets, and change the sequence number of I frames first packet and follow-up data bag;If existing, do not deal with.
ONVIF as a kind of opening Internet video interface standard, in having been widely used for various network video devices, with
Just the network video device that different vendor is produced is capable of achieving to interconnect.System for network video transmission mainly include coding side and
Decoding end, coding side is monitoring frontend, and for example, web camera IPC, decoding end is hard including wall in pc client, fact
Solution and Video data storage etc..Coding side is compressed coding according to the coded format of standard to the video for collecting.Decoding
End is when bit stream data is received, it must be understood that the coding parameter of the bit stream data, and the bit stream data could be decoded.
The decoding parametric of ONVIF protocol definitions code stream can be carried in the DESCRIBE response messages that RTSP consults, it is also possible to taken
Band is in code stream H.264, or all carries in both.Because different manufacturers realizes difference, although be in compliance with ONVIF associations
View, but the carrying mode of decoding parametric is different.If decoding parametric is only carried in the DESCRIBE response messages that RTSP consults,
Need decoding end equally to support RTSP agreements, can just get decoding parametric and be decoded.
In existing network video monitor and control system, it is often necessary to multiple decoding ends of code stream correspondence all the way, and coding side is sent out
The encoding device for sending limited in one's ability, many manufacturers is only capable of transmission all the way or two-way code stream.In general network video monitor and control system
Generally can all there is the media forwarding server MS for carrying out forwarding media stream.The present invention changes to the media forwarding server
Enter, media stream data is decoded with sharp decoding end.
The present invention carries out code stream conversion by media forwarding server, and for decoding end discernible standard H.264 code is provided
Stream, specific embodiment is as follows.
Coding side supports ONVIF agreements with media forwarding server, in RTSP negotiations processes, media forwarding server
Send RTSP DESCRIBE to ask to coding side, coding side is received after the request, to media forwarding server RTSP is sent
DESCRIBE response messages, media forwarding server is received after the response message, and decoding parametric PPS/ is obtained from the message
SPS, and preserve the corresponding relation of the decoding parametric and the coding side.The decoding parametric is used to define image width height and code level
The parameter such as not, when decoding end receives above-mentioned decoding parametric, you can the code stream to receiving is decoded.
Because media forwarding server would generally be connected with multiple coding sides, consulted RTSP is carried out with multiple coding sides
Cheng Zhong, can receive the RTSP DESCRIBE response messages at different coding end, and then obtain multiple decoding parametrics.In order to ensure
During subsequent operation, decoding parametric is added in its correspondence coding side transmitted stream, media forwarding server needs to protect
Deposit the corresponding relation of decoding parametric and the coding side for sending the decoding parametric.
After coding side and media forwarding server carry out RTSP negotiations, coding side to media forwarding server sends code stream
Data.Whether media forwarding server judges before each the I frame first packet in the bit stream data after the bit stream data is received
There is decoding parametric, if not existing, inquire about the corresponding decoding parametric of the coding side, the decoding parametric is carried out into package process,
Before being added to I frame first packets, the sequence number of I frames first packet and follow-up data bag is changed.Preferably, media forwarding server is received
Bit stream data coded format for H.264.Specify in ONVIF agreements, decoding parametric H.264 can be carried in code stream, also may be used
Not carry decoding parametric, therefore, although the coding end equipment of different vendor's production is in compliance with ONVIF agreements, but the code for exporting
Flow structure is different.For the H.264 bit stream data for not carrying decoding parametric, decoding end cannot carry out video decoding, because
This, in media forwarding server, needs the H.264 code stream to not carrying decoding parametric to add decoding parametric, will be through matchmaker
All code streams of body forwarding server are all converted to the H.264 code stream of the standard with decoding parametric.
Above-mentioned code stream transfer process specifically, media forwarding server is after the bit stream data for receiving coding side, inquiry
Whether there is decoding parametric in the bit stream data before all I frames first packets, if there is no decoding parametric, continue to inquire about sending the code
The corresponding decoding parametric that the coding side of flow data is preserved on the media forwarding server, by the decoding parametric agreement is transmitted
Package, the host-host protocol is UDP or TCP transmission agreement, and the selection of host-host protocol is determined by upper-layer service.In decoding parametric package
Afterwards, the package is added to before I frame first packets, and changes the sequence number of I frames first packet and follow-up data bag.Referring to Fig. 4, in this reality
In applying example, after decoding parametric PPS/SPS packages, it is added to the position of former I frames first packet, Serial No. 200, I frames first packet and follow-up
Move after data order, I frame first packets Serial No. 201, the sequence number of follow-up data is by that analogy.
Media forwarding server is in code stream transfer process is carried out, in addition it is also necessary to which code stream type PayloadType is repaiied
Change.It is different that this is the definition due to different vendor to code stream type, therefore, carry out code stream conversion in media forwarding server
During, needing for code stream type to be revised as standard H.264 definition value, normal video definition value H.264 is 96.It is concrete real
Apply process as follows:When media forwarding server receives bit stream data, each bag data is parsed, if in current bag
Code stream type is non-standard H.264 video definition value, then it is standard H.264 video definition value to change the code stream types value.
After above-mentioned process, by the standard for carrying decoding parametric, H.264 code stream sends decoding end, all of decoding to
End can recognize that the standard H.264 code stream.
In the above-described embodiments, conversion is standardized to code stream by media forwarding server, so that decoding termination
Receive code stream and be standard code stream, therefore, farthest realize the support to various networking plans and video product interconnection
The demand of intercommunication.
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention
Within god and principle, any modification, equivalent substitution and improvements done etc. should be included within the scope of protection of the invention.
Claims (4)
1. a kind of code stream conversion method based on ONVIF agreements, the method is applied to media forwarding server, it is characterised in that
The method is comprised the following steps:
Step A, in RTSP negotiations processes, receives the RTSP DESCRIBE response messages of coding side, and solution is obtained from the message
Code parameter PPS and SPS, and preserve the corresponding relation of the decoding parametric and the coding side;
Step B, when the bit stream data of coding side is received, judges before the I frame first packets in the bit stream data with the presence or absence of decoding
Parameter, if not existing, inquires about the corresponding decoding parametric of the coding side, and the decoding parametric is carried out into package process, is added to I frames
Before first packet, and change the sequence number of I frames first packet and follow-up data bag;If existing, do not deal with.
2. the method for claim 1, it is characterised in that:Step B is further included:
Non-standard Payload Type values in the bit stream data are revised as into standard H.264 definition value.
3. a kind of code stream conversion equipment based on ONVIF agreements, the device is applied to media forwarding server, it is characterised in that
The device includes:
Control negotiation element, in RTSP negotiations processes, the RTSP DESCRIBE response messages of coding side being received, from this
Decoding parametric PPS and SPS are obtained in message, and preserves the corresponding relation of the decoding parametric and the coding side;
Code stream converting unit, for when the bit stream data of coding side is received, judging the I frame first packets in the bit stream data before be
It is no to there is decoding parametric, if not existing, the corresponding decoding parametric of the coding side is inquired about, the decoding parametric is carried out at package
Reason, before being added to I frame first packets, and changes the sequence number of I frames first packet and follow-up data bag;If existing, do not deal with.
4. device as claimed in claim 3, it is characterised in that:
The code stream converting unit is further used for for the non-standard Payload Type values in the bit stream data being revised as mark
Accurate H.264 definition value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310750612.8A CN103686205B (en) | 2013-12-30 | 2013-12-30 | Method and device for code stream transfer on basis of open network video interface forum (ONVIF) protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310750612.8A CN103686205B (en) | 2013-12-30 | 2013-12-30 | Method and device for code stream transfer on basis of open network video interface forum (ONVIF) protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103686205A CN103686205A (en) | 2014-03-26 |
CN103686205B true CN103686205B (en) | 2017-04-19 |
Family
ID=50322287
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310750612.8A Active CN103686205B (en) | 2013-12-30 | 2013-12-30 | Method and device for code stream transfer on basis of open network video interface forum (ONVIF) protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103686205B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109218756A (en) * | 2018-09-28 | 2019-01-15 | 广州市协衡网络科技有限公司 | A kind of order method of camera shooting and video, device, server and storage medium |
CN111327924B (en) * | 2019-07-30 | 2022-08-05 | 杭州海康威视系统技术有限公司 | Code stream screening method and device and access equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101895737A (en) * | 2010-07-13 | 2010-11-24 | 中兴通讯股份有限公司 | Multimedia decoding method and device as well as video monitoring method and system |
CN102014284A (en) * | 2010-12-10 | 2011-04-13 | 中兴通讯股份有限公司 | Method, system and device for acquiring parameter set value of video code stream in transcoding business |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7586924B2 (en) * | 2004-02-27 | 2009-09-08 | Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. | Apparatus and method for coding an information signal into a data stream, converting the data stream and decoding the data stream |
JP2007318615A (en) * | 2006-05-29 | 2007-12-06 | Toshiba Corp | Moving image reproducing device, moving image reproduction method and program |
-
2013
- 2013-12-30 CN CN201310750612.8A patent/CN103686205B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101895737A (en) * | 2010-07-13 | 2010-11-24 | 中兴通讯股份有限公司 | Multimedia decoding method and device as well as video monitoring method and system |
CN102014284A (en) * | 2010-12-10 | 2011-04-13 | 中兴通讯股份有限公司 | Method, system and device for acquiring parameter set value of video code stream in transcoding business |
Also Published As
Publication number | Publication date |
---|---|
CN103686205A (en) | 2014-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11902090B2 (en) | Data packaging protocols for communications between IoT devices | |
FI107000B (en) | Title compression in real-time services | |
US8862766B2 (en) | Customized data delivery and network configuration via aggregation of device attributes | |
JP2015512172A (en) | Bidirectional tunneling via user input back channel for wireless display | |
EP1486039B1 (en) | Method and apparatus for header compression in a wireless lan | |
CN111083161A (en) | Data transmission processing method and device and Internet of things equipment | |
HUE034267T2 (en) | Data processing device, data processing method, and program | |
JP2013514011A5 (en) | Wireless communication signaling for integrated data units | |
CN103647706A (en) | Self-adaptation protocol communication gateway and communication platform | |
CN109327493A (en) | A kind of remote medical monitoring system based on cloud and monitoring method | |
US9332049B1 (en) | Media compression for tunneled real-time communications | |
KR20140124255A (en) | Gateway and Method for delivering Message thereof | |
CN104993979A (en) | Network connection monitoring method, terminal equipment and communication system | |
CN103686205B (en) | Method and device for code stream transfer on basis of open network video interface forum (ONVIF) protocol | |
Karaagac et al. | Light-weight streaming protocol for the Internet of Multimedia Things: Voice streaming over NB-IoT | |
CN109962762A (en) | A kind of data transmission method, sending device and reception device | |
CN105119969B (en) | A kind of exchange method for putting inspection data format and point inspection data | |
US20180131609A1 (en) | Protocol frame transmission method, apparatus, and system, and node device | |
CN114422845A (en) | Method for transceiving audio and video data and transfer equipment | |
CN107995297A (en) | A kind of internet of things data transmission method and internet-of-things terminal | |
MX2011013412A (en) | Method and apparatus for providing interoperability between a first protocol and a second protocol. | |
US20140219291A1 (en) | Implementing a protocol adaptation layer over an internet protocol | |
WO2017008401A1 (en) | Protocol frame transmission method and device, node equipment and system | |
CN101267432A (en) | Real time interaction method for multimedia attribute | |
TW201132081A (en) | Techniques for supporting multiple protocols in wireless networks |
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 |