I made a single-file Python script that turns files into 8K YouTube videos

a month ago by Backlight7061 to c/programming

Encode any file into a video and decode it back bit-for-bit identical. Designed for storing and transferring arbitrary data through video platforms such as YouTube. - cashilysh/youtube-transcoder

cross-posted from: https://lemmy.world/post/51997098

I made a little project called YoutubeTranscoder:

https://github.com/cashilysh/youtube-transcoder

The idea is pretty simple. You give it a file and it turns it into an 8K black and white video. You upload that video to YouTube, and later you can download it or even decode it directly from the YouTube stream and get the exact same file back.

I made it as an experiment to see if YouTube's compression would completely destroy the data. Surprisingly, it works.

It uses zfec for error correction and SHA-256 checksums to make sure the data survives YouTube's compression and that the recovered file is actually identical to the original.

It's a single Python file and works on both Linux and Windows.

Important: CPU encoding is currently too slow and doesn't survive YouTube's compression reliably. For now, NVIDIA GPU encoding is the only reliable option I've tested.

You can try it yourself with this test video:

https://www.youtube.com/watch?v=tljK1QxLLA0

The video contains a 40 MB ZIP file with some memes and videos. You can decode it directly from YouTube with:

python VideoTranscoder.py -d https://www.youtube.com/watch?v=tljK1QxLLA0

Full disclosure, the entire project was made with Claude and DeepSeek, since I'm not a professional programmer. 😄

It's obviously not meant to replace proper cloud storage, but I thought it was a pretty fun experiment and could be interesting to data hoarders/file sharers.

hyperion626 12 points a month ago
path: 0 25859033, hotness: undefined, score: 12, children: 2
remotelove 11 points a month ago

There isn't a shred of good will left at Google and their ban hammers operate on algorithmic randomness.

If anything, files should be jammed into as many short-form videos as possible to hopefully trigger a run-away implosion of that that entire ecosystem.

path: 0 25859033 25866009, hotness: undefined, score: 11, children: 1
hyperion626 3 points a month ago
path: 0 25859033 25866009 25873216, hotness: undefined, score: 3, children: 0
onlinepersona 5 points a month ago

I don't know why people are shitting on this. Fuck YouTube. They are full of slop anyway and are a gatekeeper to actual good platforms. They hold back innovation and are only supported by google ads and google search. They only post revenues, never profits.

YouTube is practically monopoly because of their network effect. To compete you have to be huge yourself and make money. YouTube doesn't have to make money. They just have to be the default.

We'd be better of without YouTube or a similar monopoly, because that would mean real competition. That would be good for content creators and consumers.

I 100% support projects like these because they have a chance of hurting Goofle. Fuck em.

path: 0 25870005, hotness: undefined, score: 5, children: 0
one_old_coder 4 points a month ago

You use numpy but don't have a requirements file. Bad bot.

path: 0 25869651, hotness: undefined, score: 4, children: 0
FizzyOrange 3 points a month ago

Yeah don't do that. It's not even novel.

path: 0 25860896, hotness: undefined, score: 3, children: 0
borosilicate 1 point a month ago
path: 0 25868395, hotness: undefined, score: 1, children: 2
Backlight7061 -1 points a month ago

why?

path: 0 25868395 25868603, hotness: undefined, score: -1, children: 1
borosilicate 2 points a month ago
path: 0 25868395 25868603 25868677, hotness: undefined, score: 2, children: 0
programming
programming

@programming.dev

login for more options
28803
3719
3327

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev


go to feed...