This repository contains a Python application for compressing and encrypting videos using the AES-CBC (Advanced Encryption Standard - Cipher Block Chaining) algorithm for encryption and the DWT (Discrete Wavelet Transform) algorithm for compression.
- Video compression using DWT algorithm
- Video encryption using AES-CBC algorithm
- Decryption and decompression capabilities
- Simple and modular Python implementation
- Python 3.x
- NumPy
- matplotlib
- OpenCV
- Crypto (for AES encryption)
- pywt (for DWT compression)
-
Clone the repository:
git clone https://github.com/YGTRAY/cryptingCompressingVideo.git
-
Adjust Parameters:
Modify the script files or parameters to customize compression and encryption settings.
The process of compressing and encrypting videos involves the following steps:
Start with a video file (input_video.mp4
) that you want to compress and encrypt.
The video is split into individual frames to process each frame independently.
Apply the Discrete Wavelet Transform (DWT) algorithm to each frame for compression. This reduces the spatial redundancy in the frames.
Encrypt each compressed frame using the Advanced Encryption Standard (AES) algorithm in Cipher Block Chaining (CBC) mode. This step ensures the confidentiality and security of the video data.
Combine all the encrypted frames into a single encrypted video file .
To retrieve the original video:
Split the encrypted video (output_video_encrypted.bin
) back into individual encrypted frames.
Decrypt each encrypted frame using the same AES key and initialization vector (IV) used for encryption.
Apply the inverse Discrete Wavelet Transform to decompress each decrypted frame back to its original state.
Combine all the decrypted frames into a single decrypted video file .
The final result is a decrypted and decompressed video (output_video_decrypted.mp4
) identical to the original input video.