MCPcopy Index your code
hub / github.com/Xelckis/yt-fs

github.com/Xelckis/yt-fs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
21 symbols 58 edges 6 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

YT-FS // INFINITE STORAGE GLITCH

Overengineering as a lifestyle.

YT-FS (YouTube File System) is an experimental, industrial-grade tool that bypasses traditional cloud storage limits by converting any file into a video stream of flashing ANSI-colored blocks. It then automatically uploads this payload to YouTube as an unlisted video, effectively giving you infinite, free cloud storage.

When you need your file back, the Decoder optically reads the video stream directly from Google's CDN, reconstructs the original bytes, and saves the file back to your disk with zero latency.

⚠️ Prerequisites

Before running the glitch, your machine must have the following installed and available in your system's PATH:

  1. Go (v1.25 or higher)
  2. FFmpeg (For high-performance raw video encoding/decoding)
  3. yt-dlp (To bypass API limits and extract raw CDN streams)

Directory Structure Requirements

Ensure your project root has the following structure before starting: - upload/ (The watcher will monitor this folder for new files) - api/ (Where your Google credentials will live) - assets/ (Must contain SpaceMono-Regular.ttf or your preferred monospace font) - background_music.mp3 (Required in the root folder to keep the YouTube spam bot happy)


🔑 Step 1: Getting Google API Credentials

To automate the upload process, you need a client_secret.json file.

Access the quick-start link below to create a project and enable the YouTube Data API: 👉 Google Cloud Console - YouTube API Setup

After clicking the link, follow the step-by-step video tutorial below to see exactly how to configure the OAuth consent screen and generate your keys:

Video Tutorial

Once you have followed the tutorial and downloaded your JSON file, rename it exactly to client_secret.json and place it inside the api/ folder of this project.


🚀 Step 2: The Encoder (Upload)

The Encoder runs as a background service, monitoring the upload/ directory.

Running the Encoder

go run cmd/encoder/main.go

Authentication (First Run Only)

The first time you run the encoder, it will generate a link in your terminal. 1. Open the link in your browser. 2. Log in with the YouTube account you added as a Test User during the API setup. 3. Google will show a "Google hasn’t verified this app" warning. Click continue. 4. Grant the permissions. The script will intercept the token, save it as api/token.json, and start the watcher.

Usage

Simply drag and drop any file into the upload/ folder. The system will automatically: 1. Lock the file to prevent partial reads. 2. Convert bytes to 4-bit nibbles mapped to 16 ANSI colors. 3. Generate a Brutalist UI frame. 4. Stream the data to FFmpeg and upload it to YouTube as an unlisted video.

Check your YouTube Studio. You will see a new video titled UPLINK SECURE // [your_file_name].


📥 Step 3: The Decoder (Download)

The Decoder does not require API authentication. It uses yt-dlp to fetch the raw video stream and optically decodes the data back into your file.

Running the Decoder

You must provide the YouTube URL and the desired output filename via flags:

go run cmd/decoder/main.go -url "[https://www.youtube.com/watch?v=YOUR_VIDEO_ID](https://www.youtube.com/watch?v=YOUR_VIDEO_ID)" -out "recovered_file.zip"

The decoder will: 1. Extract the direct CDN link. 2. Pipe the stream into memory via FFmpeg. 3. Calculate Euclidean color distances to bypass YouTube's video compression. 4. Reconstruct the original binary file directly to your disk.


🛠 How it Works (The Science)

  • Why 16 Colors? Video compression (H.264) destroys pixel accuracy (Chroma Subsampling). By splitting 1 Byte into two 4-bit "Nibbles" (16 states), we can map data to 16 highly contrasting ANSI colors. YouTube cannot confuse pure Red with pure Cyan, ensuring 100% data integrity upon retrieval.
  • Why 32x32 Blocks? Compression blurs edges. By drawing 32x32 pixel blocks and aiming the Decoder's optical reader exactly at the center (+16px offset), we read the purest surviving color.

📜 Disclaimer

This project is an experimental proof-of-concept for educational purposes. Uploading encrypted data or massive archives disguised as video content may violate YouTube's Terms of Service. Use responsibly and preferably on a burner account.

Core symbols most depended-on inside this repo

handleError
called by 2
internal/youtube/youtube.go
YoutubeAuthInit
called by 1
internal/youtube/youtube.go
newCallbackServer
called by 1
internal/youtube/youtube.go
getClient
called by 1
internal/youtube/youtube.go
getTokenFromWeb
called by 1
internal/youtube/youtube.go
tokenFromFile
called by 1
internal/youtube/youtube.go
saveToken
called by 1
internal/youtube/youtube.go
UploadVideo
called by 1
internal/youtube/youtube.go

Shape

Function 19
Method 1
Struct 1

Languages

Go100%

Modules by API surface

internal/youtube/youtube.go9 symbols
internal/encoder/encoder.go5 symbols
internal/decoder/decoder.go3 symbols
internal/watcher/watcher.go2 symbols
cmd/encoder/main.go1 symbols
cmd/decoder/main.go1 symbols

For agents

$ claude mcp add yt-fs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact