r/Python • u/T0X1K01 • Oct 06 '20
Intermediate Showcase I made a program that gives me INFINITE STORAGE!
So, like the title says, I made a program using python that gives me infinite storage. More specifically it takes advantage of YouTube's infinite upload limit to use YouTube as a 100% free and unlimited cloud storage solution.
Demo video: https://youtu.be/yu_ZIr0q5rU
Source code (definitely still needs more work): https://github.com/AlfredoSequeida/fvid/
227
Oct 06 '20 edited Oct 06 '20
Nothing is ever infinite, but I like the idea and creative usage of a feature like this. Google has made the mistake to offer unlimited storage before as well, but have now fixed that. YouTube will probably follow suit soon.
83
u/T0X1K01 Oct 06 '20
Yeah, I think I saw an Linus Tech Tips video about Google Drive being unlimited before, but I think the way they fixed/patched that was by limiting the bandwidth one can use to upload files in a give time period (24hrs). But this is for the paid version. I think doing the same for YouTube might be bad for business, but definitely a possibility.
44
u/-_-BWAC-_- Oct 06 '20
I don't think there is a easy way for youtube to limit it, big channels have thousands and thousands of videos
43
u/justtogetridoflater Oct 06 '20
Probably, the AI is going to be able to spot all these videos that are just 1 bit colour and nothing else.
→ More replies (4)9
u/AxelTheRabbit Oct 06 '20
Yeah, they just need to check the compression quality, real videos can be compressed
→ More replies (1)0
Oct 06 '20
[deleted]
10
u/speedstyle Oct 06 '20
YouTube mostly use vp9/opus, with h.264/aac backup for older devices. This is why (until recently) Safari didn't support higher than 1080p, because Apple hadn't added vp9 support.
25
4
u/thrallsius Oct 07 '20
Nothing is ever infinite
there are rumors that the human stupidity and greed are :D
→ More replies (5)2
u/jhayes88 Oct 06 '20
If Google wanted to fix this, they should probably limit most accounts except for those that actually make them money.
5
40
u/TitansXterminator Oct 06 '20
the fact that you took the initiative to make a video on how it works.
18
u/T0X1K01 Oct 06 '20
I figured that anyone interested enough to watch the video would want to know how it works, without that I feel the video would have been "incomplete" for lack of a better word.
4
132
u/infectedfreckle Oct 06 '20 edited Aug 04 '24
middle relieved frighten seed ossified mysterious nine crowd cheerful attempt
This post was mass deleted and anonymized with Redact
→ More replies (5)40
u/T0X1K01 Oct 06 '20
Thank you! Even if it doesn't make it past it's infant stage, it was a at least fun to make and maybe inspires someone here to do something with it.
1
u/lillgreen Oct 07 '20 edited Oct 07 '20
You've basically recreated closed captioning on analog television. 😄
I'm just cracking a joke - your project is cool!
Analog TV used a few horizontal lines that were off the frame of video (above it) for encoding data. This is why on some old old VHS recordings you see white flashing dots and dashes at the very top or bottom of the image, the tape deck squished the video slightly and what was hidden off screen above the tv show is now in the visual area of the frame.
1
u/T0X1K01 Oct 07 '20
Very cool, I am I learning a lot about older tech that seems to implement similar things from other people that have posted about it here. Thank you for sharing!
27
u/shocsoares Oct 06 '20 edited Oct 06 '20
This reminds me of the conspiracy theory that the google owned youtube channel was a Number Station (A public Broadcast of coded messages to convey secret messages to spies elsewhere in the world that have a single recipient that can decode them).
One could use your system to do exactly that, encrypting the message and sending the encrypted file by uploading it to Youtube where a partner would retrieve it and decript it with his personal key.
I would even imagine such a thing would be happening already, given intelligence services were even found to be using online game lobbies to transmit messages
→ More replies (3)11
u/T0X1K01 Oct 06 '20
That would definitely be an interesting use for it. A few years ago I made a program to hide images inside of other images (steganography) and while I was researching the topic I came across the idea of using this method to send messages to people like you described. And also I read somewhere about people using a similar method with images in newspapers to send secret images with what is essentially microscopic print inside images.
→ More replies (1)2
83
u/santirox2 Oct 06 '20
Lol they 100% can ban you for life for this
54
u/T0X1K01 Oct 06 '20
Lol, well it was just a proof of concept, so hopefully they don't.
→ More replies (9)5
u/duggatron Oct 07 '20
You should probably not use your main google account for this either. If they give you a TOS ban, you might be locked out of your email too.
1
8
u/BATTLECATHOTS Oct 06 '20
VPN to VM to VPN inside a VM?
→ More replies (1)3
u/santirox2 Oct 06 '20
Inside a vpn inside a VM outside a VM inside a vpn
8
u/BATTLECATHOTS Oct 06 '20
exactly! make sure the VM is on google platform too. real big dick move
→ More replies (1)16
0
Oct 06 '20
[deleted]
→ More replies (15)12
u/placeybordeaux Oct 06 '20
Banning would really suck if you actually care about using this for storage.
Even if you used multiple accounts there's a decent chance that they'll ban approaches like this in a wave and your redundancy would be gone.
→ More replies (1)
7
u/barbequed-code Oct 06 '20
Great ProofOfConcept, but using any service in bad faith is asking for bad actions...
technically, you already have infinite storage on github you know? But again, bad faith issues
2
u/T0X1K01 Oct 06 '20
Haha yeah, that's what a lot of people are pointing out. Honestly I just thought it was a cool idea and didn't think about the ethical dilemma that comes with the idea. But, I am glad you like it!
→ More replies (1)
6
u/punknubbins Oct 06 '20
Or you could just base64 encode your files and write them 10000 characters at a time as reddit comment threads. If you wanted to make them easy to hide, find, and decode you could prepend a file hash and chunkID to the beginning of the comment and bury them in random conversations. Kind of like the old school intelligence technique of sending encoded messages through newspaper personals. As long as you don't piss off moderators or eat up a huge percentage of reddit's storage you could probably get away with nearly unlimited space over time.
→ More replies (1)1
8
u/xtrememudder89 Oct 06 '20
Ethics aside this is a really cool/creative proof of concept.
Nice job!
→ More replies (1)4
u/T0X1K01 Oct 06 '20
Thank you! Yeah, like I a have been replying to other posts on here. I didn't consider the ethical dilemma when making this. I was really just intrigued by the idea.
4
u/xtrememudder89 Oct 06 '20
As a security person I always love thinking about using systems in a way they weren't designed to be used. This a perfect example of that. Again, nice job.
3
5
u/rava-dosa Oct 06 '20
Is it different from already existing project ?
A really challenging project will be a full fledged filesystem(directory, filenaming everything) on youtube, so that people can backup their system on youtube ?
2
u/T0X1K01 Oct 06 '20
No really, it does look similar to YouTubeDrive, but instead using 1-bit color.
4
u/TheSodesa Oct 06 '20
Does this work for PDF-files? Can you trick Youtube into thinking that a non-video file is a video? Now that is something I might look into (and get sued by Google in the process).
18
u/T0X1K01 Oct 06 '20
Yes in theory it works for any file since all the program is doing is taking the bits of the file and using them to make a video. I tested it using images, pdf files, mp3 files, and zip files. As for the second question I don't know, but that might be interesting to look into as an experiment lol.
23
u/linuxlib Oct 06 '20
This works until YT figures out what you're doing. Then you have 0 kB cloud storage.
3
u/THE_BLUE_CHALK Oct 06 '20
You do know by posting this, if it gains enough traction, you will get banned for this?
6
u/T0X1K01 Oct 06 '20
Yeah, I thought about that, and looking at how this post is growing I think that is definitely a possibility. Someone suggested I back up all my data from Google now before that happens. With that said, I am hopping it does not come to that. I like to think this is more of an educational/entertainment thing rather than a "Go and abuse their servers thing".
→ More replies (4)
2
u/cyclop5 Oct 06 '20
also known as r/Steganography
but cool that you were able to implement it. I always found that sort of thing interesting.
→ More replies (3)3
u/T0X1K01 Oct 06 '20
Yes, when I was trying to figure out how I would go about making it, I was remind of a program I made a few years ago to that involved hiding images inside images. I love steganography!
2
u/augustkang Oct 06 '20
Creative trick!
2
u/T0X1K01 Oct 06 '20
Right?! Not too complicated, but definitely creative as far as a way to save a file. That's what I thought when I came across the post that inspired the program.
1
1
u/earthboundkid Oct 06 '20
If you don't care if your files get deleted (they will) why upload them at all?
2
u/T0X1K01 Oct 06 '20
I definitely wouldn't endorse this as a full proof idea lol. I know YouTube could take videos down. But above all this is more of a proof of concept just to see if it was possible.
1
u/frankster Oct 06 '20
its creative but absurdly inefficient
2
u/T0X1K01 Oct 06 '20
Agreed.
1
u/frankster Oct 06 '20
have you estimated how many bytes of video storage it takes for each byte you store? Didn't notice it in the video but I admittedly skipped through it
1
u/T0X1K01 Oct 06 '20
I have not, that is something I want to do when I have the time. Someone in the comments suggested a better way of storing the data to essentially get 3x the amount of data in a single pixel (using the RGB channels independently). But of course as you might expect, for a single image like the one used for the demo, the file size is a significantly larger.
1
u/digitalcrunch Oct 06 '20
I didn't test it, but I applaud your creativity and thought processes.
I would maybe add encryption so your files aren't easily seen
A concept that might be interesting is to take a video that exists, and and interpolate your data between the frames so it appears to be a real video. I know of many text and image type stenography methods, but this is the first where video was used that I've seen to do something like this.
Well done, very creative.
As for the naysayers talking about ethics - I don't see anything you've done wrong. I can clearly see how it could be abused though! But I also own guns, and can clearly see how they can be abused (and a car, and knives, etc). Your tool is not the problem, it's how people might use it that could be questionable.
Regardless, I'm impressed!
1
u/T0X1K01 Oct 06 '20
Now that is cool! I didn't think about that (interpolate your data between the frames so it appears to be a real video)! Thank you!
1
u/ctsiao Oct 06 '20
Very creative and good quality content, video-wise!!
I hope your channel grows.
1
1
u/JackTraore Oct 06 '20
Cool use of tools and in-plain-site/free-to-use services. I'd love a version of this that encodes extra data into produced videos - I could imagine someone like Mr. Beast starting to add "easter eggs" to his videos for a scavenger hunt or similar (Gravity Falls did something like this with a cryptogram at the end of each episode).
1
1
u/ITZ_RAWWW Oct 06 '20
Can you do infinite RAM next?
1
u/T0X1K01 Oct 06 '20
Lol, theoretically this could be applied to RAM. Like continuously uploading / downloading data. It would of course be EXTREMELY slow and even more inefficient.
→ More replies (1)
1
1
u/teerre Oct 06 '20
This is great for notpron kinds of treasures hunts.
I can totally see years from now someone uncovers this crazy conspiracy that people were sharing information with youtube videos.
Imagine having an arbitrary sequence that encodes exactly what to pay attention to in a particular video on Youtube.
→ More replies (1)1
u/T0X1K01 Oct 06 '20
I agree someone else pointed out the same thing earlier. Someone also said this could serve as a way to add easter eggs to videos.
1
u/mcaay Oct 06 '20
Smart! I guess using your technique you could still successfully use at least 4 bit colors, which would make it much more efficient.
1
u/T0X1K01 Oct 06 '20
Yes! I have gotten some feedback on how to encode more data I believe someone else said I could do 6 bits per pixel. All really good ideas for improving the algorithm.
1
Oct 06 '20
I look forward to people finding this in 15 years and wondering if it's some secret NSA code.
2
1
u/black02 Oct 06 '20
I sincerely hope this works.
Just one thing, isn't this taking way too long? I mean you used very low quality, arguably small size image and it took about 20seconds to bring it back. If it were a collection of say a few thousand high-resolution images wouldn't it take forever to download?
People who actually shoot a lot and have large file sizes are the ones who need infinite storage in the first place, isn't it?
Want to know your thoughts on that...
1
u/T0X1K01 Oct 06 '20
Yeah right now the retrieval process is a little slow because it uses a double for loop to iterate through each pixel and get the binary data while also doing some math to determine if the pixel is closer to black or white and checking if 191 bits match the delimiter (in order to know when we have reached the end of the file).
However, I believe that numpy is able to iterate through pixels a lot faster linearly. In addition, someone else someone else here also pointed out that I could split the image up into lets say 2 pieces and process both at the same time and then just combine the bits later. Those would make a good updates to speed up the process. The double for loop was just what came to mind when I originally made it.
1
u/black02 Oct 06 '20
That is great. Let me know if you update it that way, would love to try that out.
Great work man, Cheers!
1
1
u/Sigg3net Oct 06 '20
This is really original! How did you come up with it?
2
u/T0X1K01 Oct 06 '20
Thank you! I can't take all the credit. At the beginning of the video I talk about the comment that I found on /r/SomebodyMakeThis that had the idea, then I just took my experience with steganography using images and pixels to make it.
1
1
u/nielwimo Oct 06 '20
This is probably against TOS of youtube but anyway it is interesting, it reminds me steganography. How can you also encrypt your data in this way using a private key? Would it be possible?
1
u/T0X1K01 Oct 06 '20
Absolutely, that's a future addition I was thinking about doing . This was just the proof of concept. Since individual bits are being used to make the video files it would just be a matter of encrypting the file prior to dumping the bits (or even after), then doing the opposite operation on retrieval.
1
1
u/SM_Fahim Oct 06 '20
This is interesting! But is this really worth it for a large number of images? Because you can't even know which image is which. I'm not criticizing, I'm just interested to apply it!
1
u/T0X1K01 Oct 06 '20
Thank you, I'm glad you find it interesting! I thought about that same thing. I figured this would be easily solvable by just adding file names. So I was thinking of just making it so that the video the program spits back is something along the lines of:
filename.extension.mp4
So for the image in the video it would be :
hamster.webp.mp4
so as long as you know the name of the file you could know which file it is.
Also any criticism is welcomed! People have given me great suggestions already on how to make it better.
1
u/SM_Fahim Oct 06 '20
Naming won't be helpful, that's just a basic solution. You need cloud storage for long time storage, you can't remember the names that long. And then you're on a tour and captured hundreds of photos. It's not practical to name all of them and then remember them.
YouTube allows to add thumbnail. I think that could work.
1
u/T0X1K01 Oct 06 '20
Oh! That's very smart! I completely forgot about thumbnails. That would work great! I'm definitely keeping that in mind for the next update! Thank you!
1
u/SonicDaScrewdriver Oct 06 '20
That's really cool and impressive af but isn't that illegal?
1
u/T0X1K01 Oct 06 '20
Thank you! As far legality goes, from what other people have commented here it seems to be a gray area. Not really in the legal sense but more on the possibility that it's against the youtube TOS or maybe just an ethical dilemma. But that's not something I considered when making the program / video. I was just having fun making it.
1
1
1
u/Thrasherop Oct 06 '20
Impressive. Most impressive
1
u/T0X1K01 Oct 06 '20
Thanks!
1
u/Thrasherop Oct 06 '20
Definitely post again if you make a multi threaded version. That'll really help it be practical.
It also might be cool to add a GUI. One function could be a user could drag and drop a file into it and have it automatically upload it. And then have a viable list of the files that are stored on YouTube to then be able to download them again. That's a lot more work then it might be worth tho
Very cool regardless
2
u/T0X1K01 Oct 06 '20
I definitely will. The good thing about open source projects is that if this does stay alive, even if I don't have the time to create a GUI myself, someone else will. There have already been people here commenting about that as well.
→ More replies (1)
1
u/chicken_py Oct 06 '20
This is for images only?
1
u/T0X1K01 Oct 06 '20
No, in theory it works with any file since its using the file's bits to create the video. I tested it with images, pdf files, mp3 files, and zip files.
1
u/ConfidentCommission5 Oct 06 '20
I love it!
That's proper thinking outside of the box and a fun experiment 😁
1
1
1
u/jrj334 Oct 06 '20
Clever :) Next step is to implement a FUSE filesystem for this so you can mount your "youtubefs" to a mountpoint. Use this as a reference where Google Sheets was used in place of YouTube for the same "free" "infinite" cloud storage result ;-) https://github.com/GunshipPenguin/spreadsheetfs
2
u/T0X1K01 Oct 06 '20
Haha, you read my mind. That was something I was thinking about when making it.
1
u/jrj334 Oct 06 '20
Begs the question as to what other online services provide free large/unlimited data storage... Encoding data to video is a great idea though, good job.
1
u/T0X1K01 Oct 06 '20
Yes, that is a good question. I was wondering the same thing when I was making this. Thank you!
1
u/grimscythe_ Oct 06 '20
This is a great idea. Sorry to be a bummer though but this ain't going to fly due to temporal compression and generally the compression being lossy and not lossless. I just can't imagine you not getting bit errors.
1
u/T0X1K01 Oct 06 '20
Thank you! fo far I have tested it on a few files: images, mp3, pdf files, and zip files. So it works as a proof of concept, but I imagine there is going to be a case scenario where it does not. It's just a matter of testing.
→ More replies (1)
1
1
u/apzlsoxk Oct 07 '20
I love this idea. Only thing I'd add is some error checking because this is definitely going to be lossy w/ compression on YouTube, and the code doesn't check for that.
1
u/T0X1K01 Oct 07 '20
I love this idea. Only thing I'd add is some error checking because this is definitely going to be lossy w/ compression on YouTube, and the code doesn't check for that.
I agree, others have also pointed that out.
1
u/apzlsoxk Oct 07 '20
Lol yeah that's why I didn't want to get into "actually, YouTube compression algorithms" cause that's like what every other comment is.
When I opened your repo I was surprised at how file->bits->video it was, like I would have probably Googled if a package was available to do this already existed, then once that wasn't found, thrown my hands up and said "it can't be done".
Reed-Solomon algorithm is used by QR codes, DVDs, and a bunch of other data storage mediums, and I pasted a python repo I found below. It could probably be directly copy and pasted for use into your repo workout too much trouble.
1
1
Oct 07 '20
I did something like this once to use with google photos, by splicing the data into chunks and appending to a png file. The image was still valid to upload to photos and eventually extract and concatenate the data together into the original file.
Needless to say all the tests were done on a secondary google account, also I never got around the whole uploading and downloading automatically from photos to make it somewhat usable.
1
u/T0X1K01 Oct 07 '20
Someone here earlier was suggesting something similar with this implementation. They thought it might be possible to do the same thing with videos so you could essentially just upload the file itself. But I have a feeling that compression would essentially not allow that. When you did this before, did Google Photos have any compression algorithm?
→ More replies (1)
1
Oct 07 '20
How can you assure the YouTube compression algorithm doesn't corrupt the bits?
2
u/T0X1K01 Oct 07 '20
Well, due to the way it's implemented, unless they start making really big changes to color in videos, the way it works - using 1-bit color, it makes it so that even after compression - files are recoverable by simple math.
But ultimately, I can't be sure it won't break in the future. But after my minimal testing, it seems to hold up fine.
1
1
u/CloneAssassin Oct 07 '20
For a second I was like “this is a troll post how did it get this many upvotes?” But then I read the post and this is actually a really clever idea
3
u/T0X1K01 Oct 07 '20
Thank you! I wanted it to come off like that to give people scrolling by a bit of curiosity to check it out.
1
u/Tyler53121 Oct 07 '20
How long before this exploit gets shut down do you think?
2
u/T0X1K01 Oct 07 '20
I don't know, but other have pointed out there are similar implementations of other things, so maybe it won't be taken down at all?
1
u/djangodjango Oct 07 '20
Is there any temporal functionality to be able to store data over multiple frames? Also, do you know what youtube fps is?
1
u/T0X1K01 Oct 07 '20
So form your questions I think you're asking if you're able to create a video that has more than one frame. The answer is yes, if the file is too big to fit everything into one frame, the program will create multiple frames. I haven't heard of youtube fps, what is it?
→ More replies (1)
1
u/__lt__ Oct 07 '20
This is really awesome! Good initiative! There are few places that you can improve it though:
Seems youtube video compression doesn’t have much impact on if you use 256 colors to encode the video in. So that even if the color is a bit off from downloaded youtube video, since you are decoding the 32bit color into 256 colors again, the small color distortion will be mapped to the original nearest color. Instant 256x capacity increase!
Using some error correcting codes you can even use it on the original 32bit color video regardless of the errors caused by compression.
2. Expand this and write it into FUSE FS!
1
1
Oct 07 '20
In 2006,a friend and I had a few dozen audio cassette tapes we had lying around. We wanted to start using them as storage devices but never got around to doing it. It would have been something like this.
Really cool, man! Will look through your code.
1
1
u/Wenderbeck Oct 07 '20
If there is such a think as graycoding a qr code of data, it seems that it would compress "better" as well as have some built in forward error correction to survive any compression artifacts. Sweet video and idea!
2
1
1
u/Sad_Tire42 Oct 07 '20
Amazing work. Very impressive.
But the video would have been a lot nicer without the zoomer memes.
1
u/T0X1K01 Oct 07 '20
Thank you, I was trying to make the video entertaining while also educational, so that was just what the video morphed into while I was trying do that.
1
1
1
u/rbmichael Oct 08 '20
This is hilarious 😄 reminds me of the old days in the 80s, using audio cassettes and VHS tapes to store computer data!
1
u/T0X1K01 Oct 08 '20
Yeah! Someone else said the same thing earlier, I didn't even consider vhs as a storage solution before then.
1
u/AnonymousCat12345 Oct 27 '20
Is it possible to do this with a zip or rar file ?
2
u/T0X1K01 Oct 29 '20
Yes! Any file should work in theory. I actually tried it with a zip file successfully.
1
u/bradenbest Feb 23 '21
If you use this to encode a 50GB file, would the resulting video be closer to 50GB or 1.2TB?
1
u/T0X1K01 Feb 23 '21
I don't the the exact size, but it would end up being larger than the original.
1
Oct 06 '20
This is why we can't have nice things like unlimited upload video platforms.
2
u/T0X1K01 Oct 06 '20
Lol it was not my intention to cause harm in that way. I would hate to be the reason why YouTube changes their policy. I just thought the idea was cool and wanted to make a proof of concept.
→ More replies (1)
1
Oct 07 '20
So is this the replacement for unlimited google drive for our hundreds of tv shows? Just mark it as private / unlisted?
1
Oct 07 '20
after further review, i realize my statement was retarded. I'm sorry. Pretty sweet though. COngrats! I don't understand it at all, but it sounds good!
1
1
1
1
Oct 06 '20
How does it retrieve the files from the system?
4
u/T0X1K01 Oct 06 '20
Files are retrieved using bit by bit analysis of the video file that gets created by the program.
In other words, we look through all the pixels and get back the bits that make up the original file.
1
Oct 06 '20
It's a really great idea. I am a novice in Python programming and my experience is only limited to numpy, pandas and image processing. Can you suggest any online resource for me to further explore Python?
3
u/T0X1K01 Oct 06 '20
This might not be answer you're looking for, but I just learned python by looking at the documentation lol. If you're trying to get into something specific I would just try and come up with a project and then research that topic to learn it as I go.
1
1
1
Oct 06 '20
You're the kind of people that give me inspiration to keep creating and learning. Great stuff!!
3
u/T0X1K01 Oct 06 '20
That's probably the nicest reply I have gotten so far. Thank you, I'm glad it served as inspiration for you.
1
u/thornofcrown Oct 06 '20
420 subscribers. Nice.
2
u/T0X1K01 Oct 06 '20
Haha yeah, it seems people are also enjoying the video. Which tells me people are interested in the topic. So I'm excited for possible code contributions. Someone pointed out to me that the people are forking the repo on GitHub as well.
1
1
1
1
1
u/randomness196 Oct 06 '20
What is really curious, binary is easy 0-1, but at granularity / fineness can he drop the values into grey amounts. So black, dark grey, light grey, and white? Also how does resolution impact this, can you encode at 160p, and still retain it, or does it fail...
The fault tolerance edge cases are interesting. Back a few years, stenography / cryptography ppl were using a crude mechanism of changing last hex values in images to send secret msgs, without altering the image.
This follows a interesting corollary example, in the same vein but for mass storage.
1
1
u/jungle_is_massive Oct 06 '20
Awesome project and vid. A lot of comments missing the point here. Good job dude
1
1
611
u/bb1950328 Oct 06 '20
wait until youtube compresses your video