The Encoder-Decoder Tool is a command-line utility that allows you to encode files into a video format and decode them back to their original format. This tool is useful for hiding sensitive files within video frames and protecting them with a password and also upload the file into your youtube account.
[NOTE]: This is available for linux user only for now. Please create support for windows and macos users by contributing to this project.
To get started with the Encoder-Decoder Tool, follow the instructions below.
Before using this tool, make sure you have the following prerequisites installed on your system:
- Python 3.x
- OpenCV
- Pillow (PIL)
- pyminizip
- tqdm
- mpyg321
-
Clone or download this repository to your local machine.
-
Open a terminal and navigate to the project directory.
-
Run the following command to install the required dependencies
sudo sh installation.sh
-
Run the main.py script:
python3 main.py
-
Select "Encode a file" (Option 1) from the menu.
-
Enter the name to the file you want to encode when prompted [Note]: Please keep files in the same directory.
-
Choose a password to protect the ZIP file containing the encoded data.
-
The tool will create a password-protected ZIP file with the encoded data and save it as locked.zip. It will also generate video frames containing the encoded data into encoded_videos folder and fun fact is that you could listen some of my favourite music in parallel.
-
Run the main.py script:
python3 main.py
-
Select "Decode a file" (Option 2) from the menu.
-
Enter the name of the video file that contains the encoded data from encoded_videos folder.
-
The tool will decode the data from the video frames and save it as decoded_file.zip.
-
Enter the password you used to protect the ZIP file during encoding.
-
The tool will extract the original file from decoded_file.zip into decoded_files folder.
-
To choose this option you have to use YOUTUBE v3 API from google cloud. Follow this link to login/signup into your Google Cloud Console
-
If you don't have a Google Cloud project, create one by clicking the project dropdown in the upper left corner and selecting "New Project." Give your project a name and click "Create."
-
In the left sidebar, click on "APIs & Services" and add
+ ENABLE APIS AND SERVICES
. -
Search for YOUTUBE V3 API or similar and Enable it.
-
Now go to "Credentials" in left sidebar and click on
+ CREATE CREDENTIALS
and selectOAuth client ID
. -
Choose "Web application" as the application type. Keep name as Web client or choose as suits you.
-
Add URL
http://localhost:8080
into Authorized redirect URIs and hit Create Button and DOWNLOAD JSON. -
Paste this JSON in Youtube-Upload subfolder and this json to
client_secrets.json
and install all necessary packages withnpm i
-
Now go to
OAuth consent screen
in google cloud and add Test Users.
[NOTE]: Only Tests users gmail can signin to youtube v3 api.
[NOTE]: Make sure you follow this steps to create client_secrets.json file creating YOUTUBE CLIENT SECRETS
-
Run the main.py script:
python3 main.py
-
Select "Upload the file to youtube" (Option 3) from the menu.
-
Enter the name of the file from encoded_videos folder that contains the videos.
-
Enter required data into field such as title, description and then it will automatically start uploading a video into your youtube account.
-
Now for the first time, it will ask you to follow a link
-
Follow the link and signin only with the respective tests users gmail and allow all permissions.
-
Then the server will refuse to connect but you will get your code in url. Copy the code starting after
code=
and finish before&
. -
Paste this code into your terminal and you will sucessfully sign in.
-
Uploading will start.
[Note]: It will keep your video as private because youtube terms of services.
-
Select "To list the uploading videos of your channel" (Option 4) from the menu.
-
You will see all the videos that you have uploaded from the authorised channel with videoID.
[NOTES]:
- If installing ```installation.sh``` leads to any error then please try this script into linux environment and install manually.
- Downloading back your youtube videos into lower quality can corrupt the file. So please download videos into ```720p format```.
~Dikshit singh