CN106454368B - Method and device for superposing watermarks in video image - Google Patents

Method and device for superposing watermarks in video image Download PDF

Info

Publication number
CN106454368B
CN106454368B CN201610919875.0A CN201610919875A CN106454368B CN 106454368 B CN106454368 B CN 106454368B CN 201610919875 A CN201610919875 A CN 201610919875A CN 106454368 B CN106454368 B CN 106454368B
Authority
CN
China
Prior art keywords
watermark
video
nal unit
video image
code stream
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
Application number
CN201610919875.0A
Other languages
Chinese (zh)
Other versions
CN106454368A (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201610919875.0A priority Critical patent/CN106454368B/en
Publication of CN106454368A publication Critical patent/CN106454368A/en
Application granted granted Critical
Publication of CN106454368B publication Critical patent/CN106454368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/467Embedding additional information in the video signal during the compression process characterised by the embedded information being invisible, e.g. watermarking
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses a method and a device for superposing watermarks in video images.A media forwarding server searches a NAL unit comprising a superposed watermark identifier from a video code stream after receiving the video code stream requested by a decoding end; decoding the NAL unit including the superimposed watermark identification, performing watermark superimposition on the video image obtained by decoding, then recoding the video image after completing the watermark superimposition into a new NAL unit and forwarding the new NAL unit to a decoding end. The device comprises a searching module and a watermark superposition module. The method and the device can effectively trace and stop leakage when the video image flows outwards, and can prevent the correct decoding of the video code stream intercepted illegally due to the arrangement of the superposed watermark mark.

Description

Method and device for superposing watermarks in video image
Technical Field
The invention belongs to the field of video monitoring, and particularly relates to a method and a device for superimposing watermarks in video images.
Background
With the development of video monitoring technology, video monitoring is widely applied in various industries, in some special video monitoring fields, people pay more and more attention to the security of video images, and in a common way, watermarks of operator names are superposed in video images, so that people in charge can be traced through the watermark information of the operator names in the video images when the video images are streamed externally, and the people in charge are prevented from overflowing the sensitive video images.
In the prior art, a method for superimposing watermarks in a video image is to superimpose watermarks after decoding the video image in a software decoding mode at a decoding end, that is, after receiving a video code stream sent by an encoding end, the decoding end firstly performs packet unpacking, frame splicing and decoding on the received video code stream, then superimposes watermarks on the decoded video image, and then sends the video image superimposed with the watermarks to a display device for display.
Although the prior art can overlay watermarks in video images, the prior art can overlay watermarks in the video images by software decoding, so that the watermarks cannot be overlaid in the video images when the video images are subjected to hard decoding and are put on the wall. In addition, if the decoding end directly intercepts the video code stream through other software and then decodes the video code stream, the video image obtained through decoding is the original video image generated by the encoding end, and no watermark is superposed, so that the safety of the video image cannot be completely ensured in the prior art.
Disclosure of Invention
The invention aims to provide a method and a device for superimposing watermarks in a video image, which aim to solve the problems that in the prior art, when the video image is subjected to hard decoding and is put on the wall, the watermarks cannot be superimposed in the video image, and the video code stream sent by an encoding end is directly intercepted by a decoding end and then is decoded, so that the obtained video image has no superimposed watermarks.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a method for superposing watermarks in video monitoring images is applied to a video monitoring system, the video monitoring system comprises a media forwarding server and a decoding end, and the method for superposing watermarks in the video monitoring images comprises the following steps:
after a media forwarding server receives a video code stream requested by a decoding end, searching a NAL unit comprising a superposed watermark identifier from the video code stream;
decoding the NAL unit including the superimposed watermark identification, performing watermark superimposition on the video image obtained by decoding, then recoding the video image after completing the watermark superimposition into a new NAL unit and forwarding the new NAL unit to a decoding end.
Further, the media forwarding server establishes a watermark information mapping relation table, and performs watermark superposition on the decoded video image, including:
inquiring a watermark information mapping relation table according to a source IP address/port number and a destination IP address/port of the video code stream, and acquiring watermark information corresponding to a decoding end;
and performing watermark superposition on the video image obtained by decoding by adopting the watermark information corresponding to the decoding end.
Further, the video monitoring system includes a video management server, and the media forwarding server establishes a watermark information mapping relationship table, including:
acquiring an IP address and a port number of a video code stream received by a decoding end and watermark information of a user at the decoding end from an INVITE message sent by a video management server;
acquiring an IP address and a port number of a video code stream sent by a coding end from an ACK message sent by a video server;
and generating a mapping relation table containing the IP addresses and the port numbers of the encoding end and the decoding end and the watermark information of the decoding end user according to the acquired IP address and the port number of the encoding end sending video code stream, the IP address and the port number of the decoding end receiving video code stream and the watermark information of the decoding end user.
Preferably, the NAL unit with the superimposed watermark identifier encapsulates a video image at a position where a watermark needs to be superimposed, where the superimposed watermark identifier is disposed at a header of the NAL unit, and the searching for the NAL unit including the superimposed watermark identifier includes:
detecting an NRI field in a NAL unit header, and if the value of the NRI field is the superposition watermark identification, judging that the NAL unit is the NAL unit including the superposition watermark identification in the header.
Preferably, the NAL unit with the superimposed watermark identifier encapsulates a video image at a position where a watermark needs to be superimposed, where the superimposed watermark identifier is disposed at a header of the NAL unit, and the searching for the NAL unit including the superimposed watermark identifier includes:
and detecting a TYPE field in the NAL unit header, and if the value of the TYPE field is the superposition watermark identification, judging that the NAL unit is the NAL unit with the header including the superposition watermark identification.
The invention also provides a device for superimposing watermarks in video monitoring images, which is applied to a video monitoring system, wherein the video monitoring system comprises a media forwarding server and a decoding end, and the device for superimposing watermarks in video monitoring images comprises:
the system comprises a searching module, a decoding module and a decoding module, wherein the searching module is used for searching a NAL unit comprising an overlapped watermark identifier from a video code stream after the media forwarding server receives the video code stream requested by a decoding end;
and the watermark superposition module is used for decoding the NAL unit including the superposed watermark identifier, carrying out watermark superposition on the video image obtained by decoding, and then recoding the video image after the watermark superposition into a new NAL unit and forwarding the new NAL unit to the decoding end.
Further, the media forwarding server establishes a watermark information mapping relation table, and the watermark superposition module performs watermark superposition on the decoded video image, and executes the following operations:
inquiring a watermark information mapping relation table according to a source IP address/port number and a destination IP address/port of the video code stream, and acquiring watermark information corresponding to a decoding end;
and performing watermark superposition on the video image obtained by decoding by adopting the watermark information corresponding to the decoding end.
Further, the video monitoring system includes a video management server, and the media forwarding server establishes a watermark information mapping relationship table, including:
acquiring an IP address and a port number of a video code stream received by a decoding end and watermark information of a user at the decoding end from an INVITE message sent by a video management server;
acquiring an IP address and a port number of a video code stream sent by a coding end from an ACK message sent by a video server;
and generating a mapping relation table containing the IP addresses and the port numbers of the encoding end and the decoding end and the watermark information of the decoding end user according to the acquired IP address and the port number of the encoding end sending video code stream, the IP address and the port number of the decoding end receiving video code stream and the watermark information of the decoding end user.
Preferably, the NAL unit with the superimposed watermark identifier encapsulates a video image at a position where a watermark needs to be superimposed, the superimposed watermark identifier is disposed at a header of the NAL unit, and the searching module searches for the NAL unit including the superimposed watermark identifier, and performs the following operations:
detecting an NRI field in a NAL unit header, and if the value of the NRI field is the superposition watermark identification, judging that the NAL unit is the NAL unit including the superposition watermark identification in the header.
Preferably, the NAL unit with the superimposed watermark identifier encapsulates a video image at a position where a watermark needs to be superimposed, the superimposed watermark identifier is disposed at a header of the NAL unit, and the searching module searches for the NAL unit including the superimposed watermark identifier, and performs the following operations:
and detecting a TYPE field in the NAL unit header, and if the value of the TYPE field is the superposition watermark identification, judging that the NAL unit is the NAL unit with the header including the superposition watermark identification.
The invention provides a method and a device for superposing watermarks in video images, wherein when an IPC is used for coding the video images, the video images at positions needing to be superposed with the watermarks are independently encapsulated into a NAL unit, a media forwarding server decodes the NAL unit and then superposes watermark information of a decoding end user, and then the video images superposed with the watermarks are recoded and sent to a decoding end, so that the decoding end directly decodes after receiving a video code stream, and the obtained video images are superposed with the watermark information containing the user names of video clients. The method solves the problems that in the prior art, when the video image is subjected to hard decoding and is put on the wall, the watermark cannot be superposed in the video image, and the video code stream is directly intercepted at a decoding end and then decoded, so that the obtained video image is not superposed with the watermark. When the encoding end encodes, the video image of the position where the watermark needs to be superimposed is independently encapsulated, the superimposed watermark identifier is set, the watermark is superimposed when the media forwarding server forwards the video code stream, when the video image flows outwards, the tracing and leaking stoppage can be effectively carried out, and the correct decoding of the video code stream intercepted illegally can be prevented due to the superimposed watermark identifier.
Drawings
Fig. 1 is a schematic structural diagram of a video monitoring system according to the present embodiment;
fig. 2 is a flowchart of a method for superimposing a watermark in a video image according to the present invention;
FIG. 3 is a diagram illustrating the NAL unit header format according to the present embodiment;
fig. 4 is a protocol flowchart in the video connection establishment process according to this embodiment.
Detailed Description
The technical solutions of the present invention are further described in detail below with reference to the drawings and examples, which should not be construed as limiting the present invention.
The schematic structural diagram of the video monitoring system of this embodiment is shown in fig. 1, and includes an encoding end, a video management server VM, a media forwarding server MS, and a decoding end. The encoding end equipment of the embodiment can be a network camera IPC or an analog camera and an encoder; the decoding-side device comprises a decoder DC and a video client PC. When a video monitoring client needs to acquire a video image of a certain camera IPC, a request is sent to a video management server, the video management server carries out protocol negotiation for establishing video connection with the corresponding camera IPC, a media forwarding server and a decoder, after the protocol negotiation is completed, the camera IPC sends a video code stream obtained by encoding the video image to the media forwarding server, the media forwarding server forwards the video code stream to the decoder corresponding to the video client, and the decoder decodes the received video code stream to obtain the required video image which is displayed on the video client.
When the media forwarding server forwards the video code stream, the media forwarding server firstly decodes, performs watermark superposition on the area of the view image where the watermark is required to be superposed, and then re-encodes and sends the video code stream. According to the technical scheme, the video code stream corresponding to the area needing to be superposed with the watermark in the video image is marked and then sent, so that the media forwarding server can identify the corresponding video code stream, decode the video code stream and then superpose the watermark. The video code stream corresponding to the area needing to be added with the watermark in the video image is marked, and the marking method can mark in the NAL head or mark in the initial position of the load data in the NAL.
The detailed description will be given below by taking a flag in the NAL header as an example.
In this embodiment, a method for superimposing a watermark in a video image, as shown in fig. 2, includes:
and step S1, receiving the video code stream requested by the decoding end, and reading the head of the NAL unit of the video code stream.
The method for superimposing a watermark in a video image in this embodiment is not limited by a specific video encoding method, and may be applied to multiple video encoding methods such as h.263, h.264, h.265, MPEG2, and MPEG 4.
In h.264, syntax elements are organized into five levels of sequence (frame group), picture (frame), slice (slice), macroblock (Block), and sub-macroblock. The h.264 functions are divided into two layers, namely a Video Coding Layer (VCL) and a Network Abstraction Layer (NAL), wherein the VCL is responsible for effectively representing the content of video data, and the NAL is responsible for formatting the video data and providing header information to ensure that the video data is suitable for transmission on various channels and storage media, that is, the VCL data is a compressed and coded video data sequence, the VCL data can be used for transmission or storage after being encapsulated into NAL units, and the VCL data is encapsulated into the NAL in units of slices.
Each NAL unit consists of one byte NAL header (NALHeader) and several bytes of payload data (RBSP), where the format of the NAL header is shown in fig. 3, and F (forbidden _ zero _ bit) is a forbidden bit, which can be set to 1 when the network recognizes that there is a bit error in this unit, so that the receiver drops the unit. NRI (NAL _ ref _ idc) is a significance level indicator for indicating the significance level of the NAL unit, and the larger the value, the more significant the current NAL unit is. TYPE is a TYPE identifier for indicating the TYPE of payload data in the NAL unit.
The encoding end of this embodiment separately encapsulates the video image at the set position of the superimposed watermark in an NAL unit, that is, a slice composed of a plurality of macroblocks where the video image at the position of the superimposed watermark is located is separately encapsulated in an NAL unit, and a superimposed watermark identifier is set at the head of the NAL unit, so as to identify the NAL unit in the subsequent steps for performing watermark superimposition.
Specifically, the superposition watermark identification may be set using an NRI field or a TYPE field in the NAL unit header. Setting 11, for example, an NRI field in a NAL unit header, indicating that the NAL is a NAL that separately encapsulates a video image of the superimposed watermark position; or set TYPE field to 11000, indicating that the NAL is a NAL that separately encapsulates the video image of the superimposed watermark location.
When recording the video image, the encoding end IPC of this embodiment may default to directly and individually encapsulate the video image at the overlapping and watermarking position, or may determine whether to individually encapsulate the video image at the overlapping and watermarking position according to the message carried in the process of establishing the video connection.
In practical applications, there are two cases in which a video client requests a video stream of IPC, one case is live, and the other case is playback. In any case, a process of establishing a video connection is required, and after the video connection is established, the media forwarding server acquires a video code stream of the encoding end requested by the decoding end, and then can read the head of the NAL unit of the video code stream.
It is easy to understand that, if the overlay watermark identifier is set at the start position of the payload data, the start position of the payload data in the NAL unit of the video code stream needs to be read in this step, and the NAL unit in which the start position of the payload data in the NAL unit includes the overlay watermark identifier is searched in step S2, which can also achieve the same technical effect and is not described in detail below.
Step S2, find NAL unit with overlay watermark identification in header.
Because the video image at the position of the superposition watermark is separately encapsulated in a NAL unit, and the header of the NAL unit comprises the superposition watermark identifier, whether the NAL unit header contains the superposition watermark identifier can be judged by reading the video stream NAL unit header.
Namely, the NRI field or TYPE field of the NAL unit header is checked, and if the overlay watermark identifier is found, it is determined that the NAL unit is the NAL unit of the video image separately encapsulating the overlay watermark position, and it needs to be decoded to perform the operation of overlay watermark.
And for NAL units without the superimposed watermark identification in the header, directly forwarding the NAL units according to a normal flow.
Step S3, decoding the NAL unit with the watermark superposition mark in the header, performing watermark superposition on the decoded video image, recoding the video image after completing the watermark superposition into a new NAL unit, and transmitting the new NAL unit to the decoding end.
In this embodiment, each frame of video image forwarded by the media forwarding server MS decodes a NAL unit including the superimposed watermark identifier in the header, performs watermark superimposition on the decoded video image, then re-encodes the video image after completing the watermark superimposition into a new NAL unit, and forwards the new NAL unit to the decoding end.
And the decoding end directly decodes after receiving the video code stream, and the watermark information containing the user name of the video client is superposed in the obtained video image.
The method of the present invention is further elaborated below by taking a live application as an example, as shown in fig. 4, a specific protocol flow is:
when the video client PC needs to acquire the video image of the IPC, a video request message carrying the IPC number is sent to the video management server VM.
The video management server VM finds out the decoder DC corresponding to the video client PC according to a preset corresponding relation table of the video client PC and the decoder DC, and then sends an Invite message to the decoder DC to request for establishing video connection.
The decoder DC replies a 200OK message to the video management server VM, and an SDP field of the 200OK message carries an IP address and a port number of the decoder DC receiving the video stream.
The video management server VM sends an INVITE request message to the media forwarding server MS, and carries watermark information in an SDP field and an IP address and a port number of a decoder DC for receiving a video code stream. The watermark information in this embodiment is a user name when the video client PC logs in the video management server VM, and may also be uniform watermark information set arbitrarily, for example, a LOGO in a use unit. The specific information in the SDP field is as follows:
v=0
o=H3C 0 0 IN IP4 192.168.254.46
i admin-watermark information, i.e. the name of the operator
c-IN IP4192.168.254.46-IP address of DC received video code stream
m-video 16244 udp 105-port number of DC receiving video stream
a=fmtp:105 H264-TS/90000 resolution=D1 DecoderTag=h3c-v3
a=recvonly
m=audio 16244 udp 0
a=fmtp:0 G711U-TS/8000
a=recvonly
The media forwarding server MS responds 200OK information to the video management server VM, and carries the address and the port number of the video code stream received and sent by the media forwarding server MS in the SDP field.
The video management server VM sends an INVITE request message to the IPC, and a watermark flag bit is carried in an SDP field. After detecting the watermark flag bit, the IPC enables the watermark, and separately encapsulates the video image at the watermark position in a NAL unit. The specific information of the SDP field is:
v=0
o=H3C 0 0 IN IP4 192.168.254.46
f 1-1 represents that the watermark is started, and the image at the watermark position needs to be coded separately
c=IN IP4 192.168.254.46
m=video 16244 udp 105
a=fmtp:105 H264-TS/90000 resolution=D1 DecoderTag=h3c-v3
a=recvonly
m=audio 16244 udp 0
a=fmtp:0 G711U-TS/8000
a=recvonly
The IPC sends a 200OK response message to the video management server VM, and the IP address and the port number of the IPC sending video code stream are carried in the SDP field.
The video management server VM respectively responds to the decoder DC, the media forwarding server MS and the IPC with an ACK message, and an SDP field of the ACK message which is responded to the media forwarding server MS carries an IP address and a port number of the IPC sending video code stream.
The media forwarding server MS generates a mapping relation table of the IP address and the port number of the IPC sending video code stream, the IP address and the port number of the decoder DC receiving video code stream, and the watermark information between the IP address and the port number of the decoder DC receiving video code stream, according to the watermark information carried in the SDP field of the INVITE message sent by the video management server VM and the IP address and the port number of the decoder DC receiving video code stream, which are shown in the following table:
Figure BDA0001136184420000091
TABLE 1
The source address is an IP address of the IPC, the source port number is a port number of the IPC for sending the video code stream, the destination address is an IP address of the DC, the destination port number is a port number of the DC for receiving the video code stream, and the watermark information is a user name when the video client logs in the video management server and can be other marks. When the uniform watermark information is used, the NAL unit with the watermark identifier superimposed can be decoded without setting a watermark information mapping relation table, and the video image obtained by decoding is subjected to uniform watermark superimposition. The user name is used as the watermark information, so that the user name is favorable for tracing the user from which the leaked video image is leaked (because the video image is provided with the watermark of the user).
It should be noted that, the media forwarding server may obtain specific watermark information to be superimposed according to the watermark information carried in the SDP field of the INVITE request message of the video management server, and establish the mapping table in table 1; the mapping table of table 1 may also be established by directly querying the video management server for the username to establish the video connection. Meanwhile, the mapping relation table of the watermark information is not necessarily established by the media forwarding server, and a device can be separately additionally arranged to establish the mapping table, and only corresponding information needs to be acquired from the media forwarding server and the video management server. Through the protocol flow, the video connection between the IPC and the media forwarding server MS and the decoder is established, and the media forwarding server MS generates a mapping relationship table between the IP address and the port number of the IPC sending the video stream, the IP address and the port number of the decoder DC receiving the video stream, and the watermark information.
In this embodiment, after the video connection is established, the IPC starts watermarking according to the detected watermark flag bit, separately encapsulates a slice composed of a plurality of macro blocks where the video image at the set position of the superimposed watermark is located in an NAL unit, and sets the mark of the superimposed watermark in the header of the NAL unit. This NAL unit is then sent to the media forwarding server MS. In the embodiment, the position of the superimposed watermark is set when the video management server VM configures the IPC, and can be changed by the video management server VM as required after the setting is finished.
It should be noted that, if the encoding method is not h.264, but other encoding methods, the embodiment may set the value of the specific field in the header of the video stream to the overlay watermark identifier by a similar method, but the difference is that different specific fields in the header of the video stream are set. For example, when the encoding mode is h.265, the NAL unit header of h.265 is composed of two bytes, where the second bit to the 7 th bit of the first byte are TYPE fields, and this embodiment may set the TYPE field as the overlay watermark identifier, for example, set the TYPE field as the overlay watermark identifier 110000. By the method, the embodiment can realize the watermark superposition of the video code streams adopting different coding modes.
In this embodiment, after receiving a video code stream sent by an IPC, a media forwarding server MS detects an NRI or TYPE field in a NAL unit header, if the value of the NRI or TYPE field is a watermark superposition identifier, analyzes a source IP address/port number and a destination IP address/port number from an IP header of the video code stream, matches a mapping relationship table between the analyzed IP address/port number and destination IP address/port number and a generated IP address and port number of the IPC-sent video code stream, an IP address and port number of a decoder DC-received video code stream, and watermark information, performs watermark superposition on a video image decoded from the NAL unit using the matched watermark information, and then re-encodes the video image after completing the watermark superposition into a new NAL unit and sends the new NAL unit to a corresponding decoder DC.
By the method, the media forwarding server MS decodes the video code stream sent by the IPC, then superimposes the watermark information of the video client user name on the decoded video code stream, re-encodes the decoded video code stream and forwards the re-encoded video code stream to the decoder DC, the decoder DC directly decodes the decoded video code stream after receiving the video code stream, and the obtained video image superimposes the watermark information containing the video client user name on the obtained video image. The problem that in the prior art, when a video image passes through hard decoding and is mounted on a wall, watermarks cannot be superposed in the video image, and the video code stream cannot be directly intercepted at a decoding end and then decoded, so that the obtained video image is an original video image generated by an encoding end and does not have the superposed watermarks is solved, and outflow of the video image can be effectively prevented.
It should be noted that, when multiple video clients request video images of the same IPC, the media forwarding server MS only needs to decode the NAL unit that needs to be superimposed with the watermark once, and then superimposes different watermarks according to each different video client user, and then re-encodes the watermarks and forwards the encoded watermarks to different decoders DC, so as to superimpose different watermarks on each different video client user, and only superimpose the watermark of the user in the video image acquired by each video client user.
The above embodiment has been described by taking a live example, when practical use is playback, since the encoding end defaults to adopt the method of the present invention to set the superimposed watermark identifier in the NAL header, the media forwarding server will read the header of the NAL unit of the video stream, search for the NAL unit including the superimposed watermark identifier in the header, decode the NAL unit including the superimposed watermark identifier in the header, perform watermark superimposition on the video image obtained by decoding, and then re-encode the video image after completing the watermark superimposition into a new NAL unit and forward the new NAL unit to the decoding end. The specific implementation process is not described herein.
Correspondingly to the foregoing method, this embodiment of a device for superimposing a watermark in a video surveillance image is applied to a video surveillance system, where the video surveillance system includes a media forwarding server and a decoding end, and the device for superimposing a watermark in a video surveillance image includes:
the system comprises a searching module, a decoding module and a decoding module, wherein the searching module is used for searching a NAL unit comprising an overlapped watermark identifier from a video code stream after the media forwarding server receives the video code stream requested by a decoding end;
and the watermark superposition module is used for decoding the NAL unit including the superposed watermark identifier, carrying out watermark superposition on the video image obtained by decoding, and then recoding the video image after the watermark superposition into a new NAL unit and forwarding the new NAL unit to the decoding end.
The device for superimposing a watermark in a video surveillance image in this embodiment may be a separate hardware device or a part of a media forwarding server, which is not described herein again.
In this embodiment, the media forwarding server establishes a watermark information mapping relation table, and the watermark superposition module performs watermark superposition on the decoded video image, and executes the following operations:
inquiring a watermark information mapping relation table according to a source IP address/port number and a destination IP address/port of the video code stream, and acquiring watermark information corresponding to a decoding end;
and performing watermark superposition on the video image obtained by decoding by adopting the watermark information corresponding to the decoding end.
Corresponding to the above method, the media forwarding server in this embodiment establishes a watermark information mapping relationship table, including:
acquiring an IP address and a port number of a video code stream received by a decoding end and watermark information of a user at the decoding end from an INVITE message sent by a video management server;
acquiring an IP address and a port number of a video code stream sent by a coding end from an ACK message sent by a video server;
and generating a mapping relation table containing the IP addresses and the port numbers of the encoding end and the decoding end and the watermark information of the decoding end user according to the acquired IP address and the port number of the encoding end sending video code stream, the IP address and the port number of the decoding end receiving video code stream and the watermark information of the decoding end user.
It should be noted that the watermark information mapping relation table in this embodiment is established in the media forwarding server, or a separate device may be separately provided to establish the mapping table, for example, the mapping table is established in a lookup module of the device, and the lookup module only needs to acquire corresponding information from the media forwarding server and the video management server to establish the mapping table.
In this embodiment, the NAL unit with the superimposed watermark identifier encapsulates the video image at the position where the watermark needs to be superimposed, and the superimposed watermark identifier may be set at the header of the NAL unit, or may be set at the start position of the payload data, and is preferably set at the header of the NAL unit.
When the search module is arranged at the head of the NAL unit, the search module respectively corresponds to the following two working modes:
in a first mode, the searching module searches for a NAL unit including an overlay watermark identifier, and performs the following operations:
detecting an NRI field in a NAL unit header, and if the value of the NRI field is the superposition watermark identification, judging that the NAL unit is the NAL unit including the superposition watermark identification in the header.
In a second mode, the searching module searches for the NAL unit including the superimposed watermark identifier, and performs the following operations:
and detecting a TYPE field in the NAL unit header, and if the value of the TYPE field is the superposition watermark identification, judging that the NAL unit is the NAL unit with the header including the superposition watermark identification.
The above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and those skilled in the art can make various corresponding changes and modifications according to the present invention without departing from the spirit and the essence of the present invention, but these corresponding changes and modifications should fall within the protection scope of the appended claims.

Claims (10)

1. A method for superposing watermarks in video images is applied to a video monitoring system, the video monitoring system comprises a media forwarding server and a decoding end, and the method for superposing watermarks in the video images comprises the following steps:
after a media forwarding server receives a video code stream requested by a decoding end, searching an NAL unit comprising an overlay watermark identifier from the video code stream, and individually encapsulating a slice consisting of a plurality of macro blocks of a video image at the position of the overlay watermark in the NAL unit;
decoding the NAL unit including the superimposed watermark identifier, performing watermark superposition on the video image at the position of the superimposed watermark obtained by decoding, and then recoding the video image after completing the watermark superposition into a new NAL unit and forwarding the new NAL unit to a decoding end.
2. The method according to claim 1, wherein the media relay server establishes a watermark information mapping relationship table, and the performing watermark superposition on the decoded video image at the position where the watermark is superimposed includes:
inquiring a watermark information mapping relation table according to a source IP address/port number and a destination IP address/port of the video code stream, and acquiring watermark information corresponding to a decoding end;
and performing watermark superposition on the video image at the position of the superposed watermark obtained by decoding by adopting the watermark information corresponding to the decoding end.
3. The method according to claim 2, wherein the video monitoring system includes a video management server, and the media forwarding server establishes a watermark information mapping table, including:
acquiring an IP address and a port number of a video code stream received by a decoding end and watermark information of a user at the decoding end from an INVITE message sent by a video management server;
acquiring an IP address and a port number of a video code stream sent by a coding end from an ACK message sent by a video server;
and generating a mapping relation table containing the IP addresses and the port numbers of the encoding end and the decoding end and the watermark information of the decoding end user according to the acquired IP address and the port number of the encoding end sending video code stream, the IP address and the port number of the decoding end receiving video code stream and the watermark information of the decoding end user.
4. The method for superimposing watermark in video image according to claim 1, wherein the NAL unit of the superimposition watermark identifier encapsulates the video image where the superimposition watermark is needed, the superimposition watermark identifier is disposed in a header of the NAL unit, and the searching for the NAL unit including the superimposition watermark identifier includes:
detecting an NRI field in a NAL unit header, and if the value of the NRI field is the superposition watermark identification, judging that the NAL unit is the NAL unit including the superposition watermark identification in the header.
5. The method for superimposing watermark in video image according to claim 1, wherein the NAL unit of the superimposition watermark identifier encapsulates the video image where the superimposition watermark is needed, the superimposition watermark identifier is disposed in a header of the NAL unit, and the searching for the NAL unit including the superimposition watermark identifier includes:
and detecting a TYPE field in the NAL unit header, and if the value of the TYPE field is the superposition watermark identification, judging that the NAL unit is the NAL unit with the header including the superposition watermark identification.
6. A device for superposing watermarks in video images is applied to a video monitoring system, the video monitoring system comprises a media forwarding server and a decoding end, and the device for superposing watermarks in video images comprises:
the media forwarding server is used for receiving a video code stream requested by a decoding end, searching a NAL unit comprising an overlay watermark identifier from the video code stream, and encapsulating a slice consisting of a plurality of macro blocks of a video image at the position of the overlay watermark in the NAL unit;
and the watermark superposition module is used for decoding the NAL unit comprising the superimposed watermark identifier, performing watermark superposition on the video image at the position of the superimposed watermark obtained by decoding, and then recoding the video image after the watermark superposition into a new NAL unit and forwarding the new NAL unit to the decoding end.
7. The apparatus for superimposing watermark on a video image according to claim 6, wherein the media relay server establishes a watermark information mapping relationship table, and the watermark superimposing module performs watermark superimposing on the decoded video image at the position where the watermark is superimposed, and performs the following operations:
inquiring a watermark information mapping relation table according to a source IP address/port number and a destination IP address/port of the video code stream, and acquiring watermark information corresponding to a decoding end;
and performing watermark superposition on the video image at the position of the superposed watermark obtained by decoding by adopting the watermark information corresponding to the decoding end.
8. The apparatus for superimposing watermark on video image according to claim 7, wherein the video monitoring system includes a video management server, and the media forwarding server establishes a watermark information mapping relationship table, including:
acquiring an IP address and a port number of a video code stream received by a decoding end and watermark information of a user at the decoding end from an INVITE message sent by a video management server;
acquiring an IP address and a port number of a video code stream sent by a coding end from an ACK message sent by a video server;
and generating a mapping relation table containing the IP addresses and the port numbers of the encoding end and the decoding end and the watermark information of the decoding end user according to the acquired IP address and the port number of the encoding end sending video code stream, the IP address and the port number of the decoding end receiving video code stream and the watermark information of the decoding end user.
9. The apparatus for superimposing watermark in video image according to claim 6, wherein the NAL unit of the superimposed watermark identifier encapsulates the video image at the position where the watermark needs to be superimposed, the superimposed watermark identifier is disposed at the header of the NAL unit, and the lookup module searches for the NAL unit including the superimposed watermark identifier, and performs the following operations:
detecting an NRI field in a NAL unit header, and if the value of the NRI field is the superposition watermark identification, judging that the NAL unit is the NAL unit including the superposition watermark identification in the header.
10. The apparatus for superimposing watermark in video image according to claim 6, wherein the NAL unit of the superimposed watermark identifier encapsulates the video image at the position where the watermark needs to be superimposed, the superimposed watermark identifier is disposed at the header of the NAL unit, and the lookup module searches for the NAL unit including the superimposed watermark identifier, and performs the following operations:
and detecting a TYPE field in the NAL unit header, and if the value of the TYPE field is the superposition watermark identification, judging that the NAL unit is the NAL unit with the header including the superposition watermark identification.
CN201610919875.0A 2016-10-21 2016-10-21 Method and device for superposing watermarks in video image Active CN106454368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610919875.0A CN106454368B (en) 2016-10-21 2016-10-21 Method and device for superposing watermarks in video image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610919875.0A CN106454368B (en) 2016-10-21 2016-10-21 Method and device for superposing watermarks in video image

Publications (2)

Publication Number Publication Date
CN106454368A CN106454368A (en) 2017-02-22
CN106454368B true CN106454368B (en) 2020-02-18

Family

ID=58176580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610919875.0A Active CN106454368B (en) 2016-10-21 2016-10-21 Method and device for superposing watermarks in video image

Country Status (1)

Country Link
CN (1) CN106454368B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107690052B (en) * 2017-08-14 2020-07-28 浙江宇视科技有限公司 Method and device for overlaying watermark on video monitoring image
CN108174137A (en) * 2017-12-28 2018-06-15 浙江宇视科技有限公司 The method and device taken on the sly is prevented in a kind of overlay video watermark
CN109996028A (en) * 2017-12-29 2019-07-09 浙江宇视科技有限公司 Monitoring display equipment and watermark adding method
CN110874456B (en) * 2018-08-31 2022-04-26 浙江大学 Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and data processing method
CN111131654B (en) * 2018-10-30 2022-07-19 浙江宇视科技有限公司 Watermark embedding method and device and coder-decoder
CN111200762B (en) * 2018-11-20 2022-10-21 慧盾信息安全科技(苏州)股份有限公司 Watermarking and tracing system and method based on real-time online video sharing and browsing
CN110012296B (en) * 2018-11-21 2021-08-17 杭州基尔区块链科技有限公司 Rapid information embedding method for MP4 video code stream
CN110337045B (en) * 2019-06-04 2021-12-14 海信集团有限公司 System for adding two-dimensional code to video source and two-dimensional code adding method
CN112153237A (en) * 2019-06-27 2020-12-29 山东华软金盾软件股份有限公司 Protection method and system for watermark gateway
CN110619590A (en) * 2019-08-22 2019-12-27 杭州名淘教育科技有限公司 Online education resource recommendation system based on social media
CN111586361B (en) * 2020-05-19 2021-10-15 浙江大华技术股份有限公司 Image processing method and related device
CN112383836B (en) * 2020-10-19 2022-11-11 深圳市九洲电器有限公司 Video verification system and method
CN114553452B (en) * 2020-11-25 2023-06-02 华为技术有限公司 Attack defense method and protection equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022550A (en) * 2006-12-26 2007-08-22 北京闪动科技有限公司 Flow media digital watermark information embedding method
CN101325702A (en) * 2008-07-25 2008-12-17 清华大学 System for real time embedding visible watermark into flow medium as well as server terminal and client terminal thereof
CN102685470A (en) * 2011-03-07 2012-09-19 航天信息股份有限公司 Video digital watermark embedding method and video digital water embedding device directing at AVS (audio video standard) video format
CN103152578A (en) * 2013-03-25 2013-06-12 中国传媒大学 H.264 video watermark embedding and extraction method based on mixed coding/decoding

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120119793A (en) * 2011-04-22 2012-10-31 삼성전자주식회사 Method and apparatus for watermarking for tracing hacked contents, and method and apparatus for blocking hacked contents

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022550A (en) * 2006-12-26 2007-08-22 北京闪动科技有限公司 Flow media digital watermark information embedding method
CN101325702A (en) * 2008-07-25 2008-12-17 清华大学 System for real time embedding visible watermark into flow medium as well as server terminal and client terminal thereof
CN102685470A (en) * 2011-03-07 2012-09-19 航天信息股份有限公司 Video digital watermark embedding method and video digital water embedding device directing at AVS (audio video standard) video format
CN103152578A (en) * 2013-03-25 2013-06-12 中国传媒大学 H.264 video watermark embedding and extraction method based on mixed coding/decoding

Also Published As

Publication number Publication date
CN106454368A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106454368B (en) Method and device for superposing watermarks in video image
US10587883B2 (en) Region-wise packing, content coverage, and signaling frame packing for media content
CN107690052B (en) Method and device for overlaying watermark on video monitoring image
JP5993453B2 (en) Encoder and method for assigning bottom layer identification information to clean random access images
WO2019070870A1 (en) Content source description for immersive media data
EP3050300B1 (en) Hybrid codec scalable video
KR20190014501A (en) Advanced signaling of the region of most interest in the image
CN106982355B (en) A kind of video monitoring system and anti-leak server of anti-image leakage
US10044508B2 (en) Embedding digital watermark at the receiver end to keep track of digital content source and intended legal subscriber
EP3504878B1 (en) System level signaling of sei tracks for media data streaming
CN113766317A (en) Video transmission method, video transmission device, electronic equipment and storage medium
WO2020109154A1 (en) Method, device, and computer program for encapsulating media data into a media file
US20090219987A1 (en) Method and Device for Generating a Marked Data Flow, Method and Device for Inserting a Watermark Into a Marked Data Flow, and Marked Data Flow
AU2018301313B2 (en) Processing media data using an omnidirectional media format
EP4416929A1 (en) A method, an apparatus and a computer program product for video coding
KR102350570B1 (en) Set-Top Box for Measuring Frame Loss in a Video Stream and Method for Operating Same
CN117099375A (en) Transmitting HEIF formatted images via real-time transport protocol
US20240235816A1 (en) Protecting augmented reality call content
US20240146994A1 (en) Identifying and marking video data units for network transport of video data
US20230239453A1 (en) Method, an apparatus and a computer program product for spatial computing service session description for volumetric extended reality conversation
US20240098307A1 (en) Automatic generation of video content in response to network interruption
US20240273833A1 (en) Signaling pose information to a split rendering server for augmented reality communication sessions
WO2024151732A1 (en) Protecting augmented reality call content
TW202435616A (en) Protecting augmented reality call content
WO2024194520A1 (en) A method, an apparatus and a computer program product for video coding

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant