Chapter 4 Copyright Protection of H.264/AVC Videos by Watermarking and Display
4.3 Recovery of Original H.264/AVC Videos by Removing Visible
Watermarks
In this section, the process of recovery of watermarked I and P frames will be described. The activation of the recovery process depends on whether the player is able to get the right secret key and the right information of the local computer. The main task is to find out the watermarked blocks and to remove the watermark pixels
by using the secret key and received the information of the local computer. A flowchart of the recovery process is shown in Figure 4.6 and the detailed algorithm is described in the following.
Algorithm 4.2: the process for recovery of I and P frames.
Input: a watermarked I or P frame F', a secret key R, the information of the local computer C, and a random number generator f.
Output: a recovered I or P frame F.
Steps:
1. For each 16×16 macroblock Mij of F', combine the information of the local computer C, the secret key R, and the position P of Mij to form a seed for the random number generator f to generate a random number I.
2. Check the slice group number Nij of Mij and modify the DC coefficient Db of
The proposed watermarking algorithm has been integrated into the H.264 reference software JM12.4. The most important configuration parameters of the JM12.4 are shown in Table 4.1; other parameters are kept to retain their default values.
An H.264/AVC video in the CIF (352×288 pixels) format was used to embed a watermark image with size 16×16 in our experiments.
The binary watermark image is shown in Figure 4.7. Six frames of the original video are shown in Figure 4.8. The corresponding six frames of the watermarked video are shown in Figure 4.9. The corresponding six frames of the recovered video
are shown in Figure 4.10. If the secret key or the information of the local computer is wrong, the watermarked video will be shown in Figure 4.11.
Figure 4.6 Flowchart of the recovery process for I and P frames.
Table 4.1 Configuration parameters
Profille baseline
Number of frames to be coded 6
num_slice_groups_minus1 1
slice_group_map_type 6
Figure 4.7 A watermark binary image with size 16×16
(a) (b)
(c) (d)
Figure 4.8 Six frames of the original video. (a) The first frame (I frame). (b) The second frame (P frame). (c) The third frame (P frame). (d) The 4th frame (P frame). (e) The 5th frame (P frame). (f) The 6th frame (P frame).
(e) (f)
Figure 4.8 Six frames of the original video. (a) The first frame (I frame). (b) The second frame (P frame). (c) The third frame (P frame). (d) The 4th frame (P frame).
(e) The 5th frame (P frame). (f) The 6th frame (P frame). (continued)
(a) (b)
(c) (d)
Figure 4.9 Six frames of the watermarked video. (a) The first frame (I frame). (b) The second frame (P frame). (c) The third frame (P frame). (d) The 4th frame (P frame). (e) The 5th frame (P frame). (f) The 6th frame (P frame).
(e) (f)
Figure 4.9 Six frames of the watermarked video. (a) The first frame (I frame). (b) The second frame (P frame). (c) The third frame (P frame). (d) The 4th frame (P frame). (e) The 5th frame (P frame). (f) The 6th frame (P frame). (continued)
(a) (b)
(c) (d)
Figure 4.10 Six frames of the recovered video. (a) The first frame (I frame). (b) The second frame (P frame). (c) The third frame (P frame). (d) The 4th frame (P frame). (e) The 5th frame (P frame). (f) The 6th frame (P frame).
(e) (f)
Figure 4.10 Six frames of the recovered video. (a) The first frame (I frame). (b) The second frame (P frame). (c) The third frame (P frame). (d) The 4th frame (P frame). (e) The 5th frame (P frame). (f) The 6th frame (P frame). (continued)
Figure 4.11 A watermarked frame played with wrong the secret key or the information of the local computer.
4.5 Discussions and Summary
In this chapter, we have proposed a scheme to protect the copyright of H.264/AVC videos by display control on specified computers through the information of the local computer. And we embed a visible watermark in a different way from the traditional method which not only claims the copyright but also prevents a video from being illegally distributed. The feasibility of the proposed method has been proved by our experimental results.
Chapter 5
Secret H.264-AVC Video Sharing with Steganographic Effects
5.1 Introduction
With the advance of computer and digital camera technologies, more and more videos are transformed into digital versions and transmitted on the Internet. Some of them are important secret or personal videos, such as video conferencing or surveillance videos of companies or governmental organizations. These videos should not be exposed to the public. So we need a method which is systematic and secure to keep them. The use of the secret sharing technique is a good solution. In this study, a technique of secret sharing with steganographic effects is proposed for H.264/AVC video sharing and is described in this chapter.
In Section 5.1.1, some relevant definitions are given, and in Section 5.1.2 the basic idea of the proposed scheme is presented. In Section 5.2, the proposed process of secret video sharing with steganographic effects is described, and the proposed corresponding process of recovery of secret videos is presented in Section 5.3. In Section 5.4, several experimental results of the proposed method will be shown.
Finally, some discussions and a summary will be made in the last section of this chapter.
5.1.1 Problem Definition
It often needs a systematic and secure method to protect secret videos, and a solution, as mentioned previously, is to use the secret sharing method to conduct systematic management of secret videos. For this aim, a problem is how to hide each meaningful part of a secret file in other cover media files, better with steganographic effects. And a corresponding problem is how to recover the secret video from the shares kept by the participants.
5.1.2 Proposed Ideas
Our idea is briefly described here. First, we extract prediction modes from given cover videos and the secret video. Then, we share the intra-prediction modes of the secret video based on the exclusive-OR (XOR) operation, and hide the resulting share data into the prediction modes of the cover videos, yielding some stego-videos. We allow the user to select a secret key to randomize of the content of the secret video before it is shared. Finally, the stego-videos and the randomized secret video are regarded as share videos and distributed to the participants for them to keep.
When recovery of the secret video is desired, after getting the secret key and collecting all the share videos from the participants, we can extract the hidden data from them. We then use the hidden data to recover the prediction modes, and construct accordingly the secret video finally. An illustration of the proposed idea is shown in Figure 5.1.
5.2 Proposed Scheme for Secret Video Sharing with Steganographic Effects
In this section, the proposed scheme of sharing the secret H.264/AVC video with steganographic effects will be described in detail. The process contains two parts:
creation of share data and creation of steganographic effects. In Section 5.2.1, the process for creating share data will be described. In Section 5.2.2, the process of creating steganographic effects is presented.
Figure 5.1 An illustration of the proposed idea.
5.2.1 Process for Share Data Creation
In the process of creating share data, we divide the cover videos into two groups G1 and G2. We extract the prediction modes from the upper half parts of the frames of G1 and G2, and extract the prediction modes from the entire frames of the secret video.
To generate the share data, we apply the XOR operation to the prediction modes of the upper half part of the odd number frames of G1 and G2 as well as the prediction modes of the upper half part of each frame of the secret video. Symmetrically, we apply the XOR operation to the prediction modes of the upper half part of the even number frames of G1 and G2 as well as the prediction modes of the lower half part of each frame of the secret video. An illustration of the secret sharing method is shown in Figure 5.2. Finally, we use the prediction modes of the secret video and a user secret key to form a seed for a random number generator to generate random numbers.
We subtract the random numbers from the quantized frequency coefficients of the frames of the secret video to randomize the content of the secret video. A detailed algorithm of the proposed secret video sharing method is described in the following.
Algorithm 5.1: the process of creating share data from the secret video.
Input: a secret video S, two cover video groups G1 = {V11, V12, ..., V1n1} and G2 = {V21, V22, ..., V2n2} including n1 and n2 videos, respectively, a secret key K, and a random number generator f.
Output: a randomized video S', and a set of share data D.
Steps:
1. Extract the prediction modes M1i and M2i of the upper half part of each block of each frame of the n1 and n2 cover videos of G1 and G2, respectively.
Extract also the prediction modes Ms from each corresponding 4×4 block of each frame of S. And then compute four bits Dshare = d0d1d2d3 of the share
data D by part of the share data D, whose embedding will be carried out by Algorithm 5.2 described next.
2. Combine Ms and the secret key K to form a seed for the random number generator f to generate three random numbers Ra, Rc, and Rd.
3. Randomize the content of the secret video S by modifying each of the DC coefficient and the AC coefficients, denoted as C, of each block of the luma frame and the chroma frame of S by the following rules.
[1] When C is the DC coefficient of the luma frame,
[2] When C is the DC coefficient of the chroma frame,
if 1, set ;
[4] When C is the AC coefficient of the chroma frame,
if 1, set ;
Figure 5.2 Illustration of the secret sharing method.
5.2.2 Process for Creating Steganographic Effects
The previous algorithm produces the share data which are yet to be embedded for later recovery. Embedding of the share data is again accomplished by the use of the prediction modes in the videos. It is desired also that after the data are embedded, the resulting stego-videos, called share videos, are still observable as normal videos.
Due to this aim, it is undesirable for the data embedding process to cause the resulting prediction modes erroneous for video display. This prediction error problem might occur when the sample values in a luma block are computed in terms of the sample values of some preceding blocks which actually do not exist. A case of this occurs when the current block is the leftmost one in a frame so that its horizontally preceding block is nonexistent. An illustration of the prediction error problem is shown in Figure 5.3.
Figure 5.3 Illustration of the prediction error problem.
To avoid this problem, instead of skipping the leftmost blocks in the video, which is not applicable in our study here, we utilize only those prediction modes which do not refer to the sample values of its left neighboring block. Such prediction modes are M0, M2, M3, M7. There are totally four of them, which can be used to encode two bits of the share data. Note that we do not skip prediction modes which refer to the upper preceding block contents because, as will be clear in the sequel, we embed the share data into the lower half of each frame of the cover videos such that reference to upper neighboring blocks is no problem.
Recall that for each block, four bits of share data are to be embedded. But only two bits can be encoded using the four modes M0, M2, M3 and M7 in each block. So we divide the cover videos into two groups G1 = {V11, V12, ..., V1n1} and G2 = {V21, V22, ..., V2n2} including n1 and n2 videos, respectively, and embed the first two bits, denoted as FTB, of every 4-bit share data segment into G1 and the last two bits, denoted as LTB, of the segment into G2, respectively. Furthermore, it is desired that the share data can be kept by all the cover videos of the group uniformly. Due to this aim, we embed the share data according to the following rules.
(1) If n1 (or n2) is one, then we set FTB (or LTB) as the data-to-be-hidden in the corresponding block of the cover video V (or V ) directly.
(2)If n1 (or n2) is larger than one, then we set respectively a random number,which is data-to-be-hidden as 112 for the first cover video V21.
Finally, we encode all the data-to-be-hidden by the corresponding prediction modes of the lower half part of each frame of the cover videos in G1 and G2 according to Table 5.1. A detailed algorithm of the steganographic effect creation process is described in the following.
Table 5.1 Relation between the data-to-be-hidden and the prediction mode data-to-be-hidden Prediction mode
00 0
01 7
10 2
11 3
Algorithm 5.2: the process of creating steganographic effects.
Input: two cover video groups G1 = {V11, V12, ..., V1n1} and G2 = {V21, V22, ..., V2n2} including n1 and n2 videos, respectively, and a set of share data, D.
Output: two share video groups G1' = {V11', V12', ..., V1n1'} and G2' = {V21', V22', .., V2n2'}.
Steps: For each block of a frame of a video, perform the following steps.
1. Get in order four bits D4 of the share data D and denote the first two bits of D4 as FTB and the last two bits as LTB.
2. If n1 (or n2) is one, go to Step 3; if n1 (or n2) is larger than one, perform the following steps.
2.1 Set respectively a random number, which is from 0 to 3, as the data-to-be-hidden N1i (or N2i) to the corresponding block of each of the n1 (or n2) cover videos V12, V13, .., V1n1 (or V22, V23, ..., V2n2) except the
A flowchart of the steganography process is shown in Figure 5.4.
Figure 5.4 Flowchart of the process of creating steganographic effects.
5.3 Recovery of Secret Videos
In this section, the process of recovery of the secret video will be described. The success of the recovery process depends on whether we can get all the share videos and the right secret key. The tasks of the process are to extract the share data from the stego-videos, then to recover the prediction modes of the secret video based on the XOR operation, and finally to use the secret key and the prediction modes to recover the secret video. The detailed algorithm is described in the following.
Algorithm 5.3: the process of recovery of the secret video.
Input: two share video groups G1' = {V11', V12', ..., V1n1'} and G2' = {V21', V22', .., V2n2'}
including n1 and n2 videos, respectively, a randomized video S', a secret key K, and a random number generator f as that used in algorithm 5.1.
Output: a secret video S.
Steps: For each block of a frame of a video, perform the following steps.
1. Extract every two bits of the hidden data N1i and N2i by the prediction modes M of the corresponding block of the lower half part of each frame of the n1 and n2 cover videos of G1' and G2' according to the following rules:
1f 11 12 ... 1n1 prediction mode P of the corresponding block of the secret video by
1 2
11 12 ... 1n 21 22 ... 2n 4.
P = M ⊕ M ⊕ ⊕M ⊕M ⊕M ⊕ ⊕M ⊕ D (5.10)
5. Combine P and the secret key K to form a seed for the random number generator f to generate three random numbers Ra, Rc, and Rd.
6. Recover of the secret video by modifying each of the DC coefficient and the AC coefficients, denoted as C, of the luma frame and the chroma frame of S' to by performing following rules.
[2] When C is the DC coefficient of the chroma frame, if 1, set - ;
[4] When C is the AC coefficient of the chroma frame, if 1, set - ;
A flowchart of the recovery process for the secret video is shown in Figure 5.5
Exclusive-OR
Share data Extract hidden data G1' G2'
only a cover video?
Exclusive-OR
Recover secret video Randomized
secret video
User's key
Secret video
No
Yes
Figure 5.5 Flowchart of the recovering process.
5.4 Experimental Results
The proposed video sharing algorithm has been integrated into the H.264 reference software JM12.4 in our experiments. An H.264/AVC video in CIF (352×288 pixels) format was used in our experiments.
Four frames of the secret video and the resulting randomized video are shown in Figure 5.6. Four frames of two cover videos and the resulting share videos are shown in Figure 5.7 and Figure 5.8, respectively. And corresponding four frames of the recovered secret video are shown in Figure 5.9. If the secret key or share videos are wrong, we cannot recover the secret video. A result of such cases is shown in Figure 5.10.
5.5 Discussions and Summary
In this chapter, we have proposed a scheme to protect secret H.264/AVC videos systematically and securely by using secret sharing and steganography techniques. By this scheme, we can transform secret data into multiple share videos to be kept by participants of the secret sharing activity. Therefore, the method is suitable for use for multiple people or an organization to manage the secret video. The feasibility of the proposed method has been proved by our experimental results.
Figure 5.6 The four frames of the original video (left) and randomized video (right).
Figure 5.7 The four frames of the first cover video (left) and the share video (right).
Figure 5.8 The four frames of the second cover video (left) and the share video (right).
(1) (2)
(3) (4)
Figure 5.9 The four frames of the recovered secret video.
Figure 5.10 Erroneous recovery result when the secret key is wrong.
Chapter 6
Conclusions and Suggestions for Future Works
6.1 Conclusions
In this study, we have proposed several methods for a variety of data hiding application purposes, such as covert communication, copyright protection, and video sharing using H.264/AVC videos as cover data.
For covert communication, a large-volume data hiding method and two optimal data hiding methods based on some properties of H.264/AVC have been proposed.
For I macroblocks, data are hidden based on the use of the intra-prediction modes. For P macroblocks, data are hidden based on the use of the tree structured motion compensation. Both the intra-prediction mode and the tree structured motion compensation are used properly to hide data in order to maintain the imperceptibly of the hidden data. Since not only I macroblocks but also P macroblocks are used to hide data in the proposed method, the data hiding capacity is increased substantially.
For copyright protection, a removable visible watermarking method with a scheme for video display control on specified computers has been proposed.
Multimedia providers can protect, with the proposed method, their H.264/AVC videos downloaded to the client site by display control on the specified computer. When users sent the video to others who are not unauthorized, a visible watermark will appear actively to claim the ownership of this video by the video provider.
For video sharing, a method of video sharing with steganographic effects has been proposed for protecting secret videos systematically and securely. A secret video
is transformed into multiple share videos by distributing the prediction mode information of the secret video into the shares. Each share video contains part of the meaningful content of the secret video imperceptibly and is then kept by a participant of the secret sharing activity. By collecting all share videos, the content of the original secret video can be recovered.
Experimental results show the feasibility and practicality of the proposed methods for covert communication, copyright protection, and secret sharing.
6.2 Suggestions for Future Works
Several suggestions for future research works are listed as follows.
1. The proposed ideas in this study may be extended to handle digital videos of other profiles of the H.264/AVC standard.
2. It is interesting to add the user’s information into the visible watermarking method proposed in this study.
3. The visible watermarking method proposed in this study may be extended to create semi-transparent effects.
4. It is interesting to extend the data hiding method proposed in this study to handle video authentication problems.
5. The video sharing method proposed in this study may be integrated with a video authentication method to provide the ability of verifying the integrity and fidelity of the share videos.
6. It is also interesting to extend the proposed ideas in this study to handle problems using audio data as the cover files. The protection of secret audio data is also an important topic.
References
[1] M. Yang and N. Bourbakis, “A High Bitrate Information Hiding Algorithm for Digital Video Content under H.264/AVC Compression,” Proceedings of IEEE International Conference on Image Processing Midwest Symposium on Circuits and Systems, Cincinnati, OH, USA, vol. 2, pp. 935- 938, Aug., 2005.
[2] Y. Hu, et al., “Information hiding based on intra prediction modes for H.264/AVC,” Proceedings of IEEE International Conference on Multimedia and Expo, Beijing, China, pp. 1231-1234, Jul., 2007.
[3] S. K. Kapotas, et al., “Data hiding in H.264 encoded video sequences,”
Proceedings of International Workshop on Multimedia Signal Processing, Chania, Crete, Greece, pp. 373-376, Oct., 2007.
[4] J. Meng and S. F. Chang, “Embedding visible video watermarks in the compressed domain,” Proceedings of IEEE International Conference on Image Processing, Chicago, IL, USA, vol. 1, pp. 474-477, Oct. 1998.
[5] S. Bhattacharya et al. “A survey on different video watermarking techniques and comparative analysis with reference to H.264/AVC,” Proceedings of 2006 IEEE Tenth International Symposium on Consumer Electronics (ISCE 2006), St.
[5] S. Bhattacharya et al. “A survey on different video watermarking techniques and comparative analysis with reference to H.264/AVC,” Proceedings of 2006 IEEE Tenth International Symposium on Consumer Electronics (ISCE 2006), St.