paul o’brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. decoding - use...
TRANSCRIPT
![Page 2: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/2.jpg)
The goal of this project was to develop a system andapplication that will allow a user to securely embed a payload using LSB (Least Significant Bit) Substitution on the Motion Vectors of a MP4 video file.
The system should be able to both embed and extract a covert payload
Project Goal
2
![Page 3: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/3.jpg)
MP4 format:
3
![Page 4: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/4.jpg)
Group of Pictures (GOP)In video coding, The Group of Pictures or GOP structure, specifies the arrangement order of intra-frames and the inter- frames. It is stored Media Data section of the MP4 container.• I-Frame: contain full picture
information.• P-Frame: forward predicted from
the last I-frame and P-frame.• B-Frame: forward and backward
predicted.
4
![Page 5: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/5.jpg)
5
Macroblocks ● Each frame is made up of
blocks. These blocks, consisting of 8px x 8px, are created through the use of 4 smaller blocks (4px x 4px).
● Four of these blocks, 16px x 16px, make a macroblock. Macroblocks can be encoded various ways
![Page 6: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/6.jpg)
Proposed SolutionUse of Macroblocks and Motion Vectors in I,P, and B frames.
6
![Page 7: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/7.jpg)
Our approach (1)
We will use motion vectors to select frames that are acceptableto receive a payload and embed the information.
To select the candidate motion vectors we will use a thresholdmagnitude value approach.
The higher the magnitude, there is less distortion in the MV and thus, less chances of being noticed by an user.Magnitude depends on how far one block moves in the frame.Every MV whose magnitude is greater than the average magnitude of all MV will be eligible to cover the data.
7
![Page 8: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/8.jpg)
Our approach (2)
Calculating the magnitude of the MVs
MV
Src (src_x, src_y).
. Dst (dst_x,
dst_y)
Magnitude(MV) =
8
![Page 9: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/9.jpg)
Our approach (3)
For each eligible vector, we calculate the phase angle (Ө) todetermine
where are we going to embed the information reducing distortion.
If Ө is acute, we modify the horizontal component of MV
If Ө is obtuse, we modify the vertical component of MV
9
𝜭𝜭 = tan-1((dsty- srcy)/(dstx- srcx))
![Page 10: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/10.jpg)
10
Our approach (4)Example of LSB substitution in an eligible MV:
Frame Num. Src_x Src_y Dst_x Dst_y Magnitude
1 240 198 255 210 10
2 145 178 130 170 11
Motion Vector 1𝜭𝜭=tan^-1(210-198)/(255-240)𝜭𝜭= 0.674740942 rad * 180/π𝜭𝜭= 38.7
Motion Vector 2𝜭𝜭=tan^-1(170-178)/(130-145)𝜭𝜭= 0.489957326 rad * 180/π𝜭𝜭= 28.1
𝜭𝜭 = tan-1((dsty- srcy)/(dstx- srcx))
![Page 11: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/11.jpg)
Our approach (5)Example of LSB substitution in an eligible MV:
Frame Num. Src_x Src_y Dst_x Dst_y Magnitude
1 240 198 255 210 10
2 145 178 130 170 11
In binary:255 = 1111 1111130 = 1000 0010
New value for Dst_x:254 = 1111 1110131 = 1000 0011
Covert message in binary:01101000 01101001 00100001
Covert Message: “Hi!”
11
![Page 12: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/12.jpg)
4 Processes Required for MP4 Manipulation
1. Demuxing - read a media file and split it into streams (video, audio, subtitle streams, etc)
2. Decoding - Use decoder to uncompress streams, read data frame by frame
3. Encoding - Compress each frame, convert raw frame data into language readable/playable by specified format
4. Muxing - Join the encoded streams back together and write them the desired file
12
![Page 13: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/13.jpg)
Demuxing and Decoding
13
![Page 14: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/14.jpg)
Encoding and Muxing
14
![Page 15: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/15.jpg)
GUI
15
![Page 16: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/16.jpg)
Accomplished
● Read and analyze an MP4 file● Convert payload into binary● Motion vector insertion algorithm developed
and coded● GUI is created functioning for insertion● Extraction algorithm developed● Encoding the new video stream/maintaining
modified motion vectors
16
![Page 17: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/17.jpg)
In Progress● Create working interface file for SWIG
○ Integrating backend code for program functionality (C++) into functioning GUI buttons (Python)
● Properly encoding video stream without losing data
17
![Page 18: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/18.jpg)
Analysis
● MP4 Videos have a high storage capacity when it comes to embedding payloads on the motion vectors
● Motion vectors are easily accessible and easily modifiable
● Using ffmpeg copying the context of the original video is not a complete copy
18
![Page 19: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/19.jpg)
Analysis
● It is necessary to write new packets of data to a new stream frame by frame rather than cohesively at the end of the process
● Original extraction algorithm may be flawed, may need to come up with another way to perform the extraction
19
![Page 20: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/20.jpg)
Expectations Moving Forward
20
● Combine the GUI with the backend● Produce a fully working MP4 file with the
embedded data● Revise extraction algorithm● Perform extraction
![Page 21: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each](https://reader034.vdocument.in/reader034/viewer/2022042323/5f0d35df7e708231d4393756/html5/thumbnails/21.jpg)
Thank you!
21