Sign inSign up
true-drive logo

eoussama/true-drive

By eoussama

•Updated 4 days ago

True Drive makes it so that any platform that hosts video can double as file storage.

Image
Databases & storage
0

39

eoussama/true-drive repository overview

⁠True Drive CLI

True Drive stores files as noise videos, so that any platform that hosts video can double as file storage. This image encodes a file into a video of black and white pixels, and decodes that video back into the original file.

Warning: Videos are not encrypted. Anyone with the video and this tool can recover the file, so encrypt anything sensitive before encoding it.

⁠Quick start

Run these commands from the folder that holds your file. That folder is mounted at /data, which is where the tool resolves relative paths.

Encode a file. This creates video.mkv:

docker run --rm -v "${PWD}:/data" eoussama/true-drive encode -i input.txt -o video

Decode the video back into a file:

docker run --rm -v "${PWD}:/data" eoussama/true-drive decode -i video.mkv -o restored.txt

In the Windows Command Prompt, use -v "%cd%:/data". In Git Bash on Windows, put MSYS_NO_PATHCONV=1 before docker run.

If you use Podman, replace docker with podman and use the full image name, docker.io/eoussama/true-drive.

⁠Usage

<encode|decode> -i <input file> -o <output path>
Command-i-o
encodeThe file to encodeThe video path without an extension, since .mkv is added for you. Fails if that video already exists.
decodeThe .mkv video to decodeThe full file name to write, including its extension, since the video doesn't store the original name. Replaces any existing file with that name.
  • Both paths must be inside the mounted folder.
  • The folder that -o points into must already exist.
  • The command exits with 0 on success and 1 on failure, with the reason printed to standard error.
⁠Intermediate files

Each run creates a true_drive_encode_<timestamp> or true_drive_decode_<timestamp> folder next to the output, containing the video's frames. These folders are kept after the run and can be deleted by hand. Encoding a 2 MiB file leaves about 2.6 MB behind.

⁠File permissions

The container runs as a non-root user with ID 1000. If your user on Linux has a different ID, run the container as your own user:

docker run --rm --user "$(id -u):$(id -g)" -v "${PWD}:/data" eoussama/true-drive encode -i input.txt -o video

With rootless Podman, add --userns=keep-id instead.

⁠Known limitations

  • Input files must be smaller than 64 MiB.
  • Only .mkv videos can be decoded.
  • There is no error correction, so decoding needs every pixel to be intact. Platforms such as YouTube re-compress uploads, which makes decoding fail.
  • Videos are stored as PNG images inside Matroska, which many media players and upload sites don't support.

⁠Source and license

Tag summary

Content type

Image

Digest

sha256:70b3a956e…

Size

54.4 MB

Last updated

4 days ago

docker pull eoussama/true-drive