TextStream is a project designed to encode textual data into a visual representation within a video file and decode it back to its original form. This project aims to demonstrate a method of embedding text data visually into a video stream using pixel blocks.
- Text-to-Video Encoding: Convert text data into a visual representation embedded in a video file.
- Video-to-Text Decoding: Extract text data from the encoded video back to its original form.
- Visual Representation: Binary data represented through pixel block patterns.
- Python
- OpenCV library
- Numpy
- Clone this repository.
- Install the required dependencies using
pip install -r requirements.txt
.
To encode text into a video:
- Place the text in the
input/input_text
or replace txt doc with same directory. - Run the encoding script:
python encode.py
- you will find encoded video in
output/decoded_video.mp4
directory.
To decode a video back to text:
- Place the video file in the
input_video/encoded_video.mp4
directory, replace with same name or change in code. - Run the decoding script:
python decode.py input_video.mp4
Provide a brief example demonstrating the encoding and decoding process using a sample text file and video.
- input/input_text.txt
- input_video/encoded_video.mp4
- output/decoded_text.txt
- encode.py
- decode.py
- README.md
Acknowledge any external libraries, resources, or inspirations used in the project.
Specify guidelines for contributors and how they can contribute to the project.
This project is licensed under the MIT License.