Internet and video coding technologies have grown significantly. With Internet-based multimedia applications, digital rights management and security are extremely important for authentication and copyright management. So a variety of watermarking techniques have come to market, and at the same time many attacks have been developed to destroy any hidden information in terms of watermarking embedded into the video stream.
Among different video codecs, H.264 has proven to be one of the best because of its reduced bandwidth, better image quality and network friendliness. In this article we shall discuss a novel technique for adding watermarking to H.264 video that resists attacks.
To be able to report the quality of a watermarking scheme in terms of its robustness against attacks, we have also developed a measurement system that can evaluate an attack by comparing the attacked video with the original watermarked video stream. At the conclusion of this article we present the results of this watermarking evaluation for the different attacks performed against this H.264 based watermarking scheme.
What is watermarking?
Watermarking is a process that embeds data, called a watermark or digital signature, into a multimedia object so that the watermark can be detected or extracted at later times to make an assertion about the object.
Information that can be included in the Watermark
- A serial number or pseudo random number sequence
- Ownership identifiers
- Copyright messages
- Control signals
- Transaction dates
- Information about the creators of the work
- Bi-level or gray level images
- Text or other digital data formats
Requirements of digital watermark
- Should convey as much information as possible
- Should be secret and accessible by authorized parties only
- Should withstand any signal processing and hostile attacks, i.e. robustness
- Should be imperceptible
Proposed watermarking algorithm
A basic description of the watermark module and its interaction with the H.264 codec is described in the block diagram. The overall process of H.264 codec is shown in Figure 1. Here the gray colored blocks are the addition for embedding the watermark.

View full size
Figure 1: Process of H.264 codec
In the proposed watermarking method, watermarking in the H.264 encoder is achieved in two folds: in even numbered Independent Decoder Refresh (IDR) frames, three different messages are embedded; and in odd numbered frames the bitstream is obtained by hashing the last Group of Picture (GOP) to ensure integrity. The process is described in details as follows:
The algorithm for watermark embedding is described below. It is also depicted pictorially in Figure 2.
Is the frame an even numbered IDR?
- If Yes,
- embed logo, timestamp and IP address or key.
- Else
- Hash the last GOP and embed the number.
 Figure 2
View full size
Figure 2: Sub-blocks of the algorithm
The various sub-blocks of the algorithm in Figure 2 are described in detail below.
Test for watermarking message size:
This process of checking the size is depicted in Figure 3.

Figure 3: Process of checking the size
Find the location for embedding Watermark:
Selection of the position of DCT coefficient to be modified is based on our following observations:
- DCT coefficients are zero in most cases
- Most significant information lies in top and left
- Modification of diagonal elements at right and bottom results in insignificant artifacts
- Coefficients in diagonal positions are more stable than the others.
Embed one watermarking bit in one diagonal coefficient of diagonal sub-block
For Binary image like Logo:
- Find whether the sub-block is diagonal
- Every sub-block has 16 coefficients (4x4)
- Embed the watermark in 10th or 15th coefficients only
- If the bit number to be embedded is odd add it in 10th coefficient
- Else in 15th Coefficient
For text message like Timestamp and IP address:
- Find whether the sub-block is ab-diagonal
- Embed the watermark in 10th or 15th coefficients only
- If the bit number to be embedded is odd add it in 10th coefficient
- Else in 15th Coefficient
This process is described in Figure 4 and Figure 5.

Figure 4: Process of watermarking

Figure 5: Process of watermarking
Watermark embedding technique:
- The image (24x16) used as Watermark embedding information is in binary format, i.e. it contains only 0 (for black) or 1(for white).
- The Text used as Watermark embedding information contains 64 bit.
- Total number of bits to embed is 24*16 + 64 = 384 + 64 = 448.
- Store this information in a 448 byte array (we call it wn) whose each byte is 0/1.
- Quantize wn using the same quantization parameter (QP) as used in the video.
- Store the quantized values in another array (wqn of size 448)
- For each wqn , find the location of embedding (already discussed)
- If wn is 1
- Find MAX(quantized video coefficient, wqn ) and replace the video coeff by Max value
- else
- Make the video coefficient 0.
- Mode Selection (No. of bits, Distortion) should be done on the Modified Video Coefficient
Next: The watermarking algorithm
|