Page 2 of 2

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 2:08 am
by Cjreek
@TylerH:

This Idea of generating EVERY image of everything which ever existed, exists will exist and never exists blew my mind a few years ago. Every screenshot, every photo, every person ever lived will be on those images.

And what's incomprehensible is that there are SO SO many pictures which are not just noise.

If you take a (24-bit color depth) screenshot now and you just change 1 pixel randomly there are 2^24 pictures of your current screen with just a single pixel changed. You can probably change at least the colors of 10% of your whole image and still have the (semantical) same image. So there are BILLIONS of images which are semantically identic to the screenshot you just took. And this applies to EVERY screenshot/photo/image.

So for every image you ever saw there are BILLIONS of semantical identic images. Just think a little bit about this.

And now write an algorithm which generates a random image from this pool of EVERY image (of a certain resolution) and see
how you can click your "generate" button a million times and never get anything better than noise.

This blows my mind everytime I think about it :mrgreen:

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 5:39 am
by Brendan
Hi,
TylerH wrote:I doubt there is enough storage on Earth (or maybe in the universe) to hold them all (2^(1920*1080*32) bits), but it will generate them, given sufficient hardware.
There's a very simple way to solve that - implement it as a pseudo-file system, and generate the picture's data when someone opens the corresponding picture's file.

Of course you will need to give each picture a unique file name (otherwise you won't know which picture they wanted). The unique file names will need to be a minimum of 2^(1920*1080*24) bits. If you think about this long enough, you'll realise you can just use the bits representing the file's name as the file's pixel data and don't need to actually generate pixel data at all.

This means that it's entirely possible to have (e.g.) an "every picture that can exist server", and that server could just use an ancient/slow CPU with very little RAM and no disk space. 8)


Cheers,

Brendan

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 5:58 am
by b.zaar
I can never remember the name of my favorite pics this way...

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 6:06 am
by TylerH
Brendan wrote:Hi,
TylerH wrote:I doubt there is enough storage on Earth (or maybe in the universe) to hold them all (2^(1920*1080*32) bits), but it will generate them, given sufficient hardware.
There's a very simple way to solve that - implement it as a pseudo-file system, and generate the picture's data when someone opens the corresponding picture's file.

Of course you will need to give each picture a unique file name (otherwise you won't know which picture they wanted). The unique file names will need to be a minimum of 2^(1920*1080*24) bits. If you think about this long enough, you'll realise you can just use the bits representing the file's name as the file's pixel data and don't need to actually generate pixel data at all.

This means that it's entirely possible to have (e.g.) an "every picture that can exist server", and that server could just use an ancient/slow CPU with very little RAM and no disk space. 8)


Cheers,

Brendan
You mean like this: http://directory.io? The idea occurred to me, but it would have overcomplicated the point I was trying to get across.

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 8:07 am
by LieutenantHacker
So if you run that code you will eventually find nude pictures of me, right? :wink:

But anyways, couldn't something similar work with videos? Produce every video, even ones that have never been recorded yet?

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 8:17 am
by TylerH
Yep. Just permute the images as frames in a video.

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 8:26 am
by Cjreek
@LieutenantHacker:

Sure just a fixed amount of those images together and now we don't just have nude pictures but a sex tape of you :mrgreen:

But the chance of just randomly generating a single picture of somebody or something is so unbelievable small that a 1 minute video with 30 fps needs 1800 of those images in the right order! Bevore this happens I'll probably have won every single lottery since lottery exists.

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 10:25 am
by AndrewAPrice
If you're talking about writing it with a hex-editor, then sure. BMP is uncompressed. You can handwrite the header, then fill in the pixel data with a hex editor. Making an MPEG-encoded AVI by hand would be extremely difficult. Not impossible - the people that have written codecs could probably do it, but it would take a very long time. You're better off making your own uncompressed video container where you specify a resolution, frame rate, and then you can manually edit the uncompressed pixels with a hex editor.

As for procedurally creating a video - is this not what video games do? There's even the demoscene.

There's also procedural textures, procedural modelling - because if you can recreate something procedurally at run-time, it beats all other forms of compression.

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 10:33 am
by AndrewAPrice
Cjreek wrote:This Idea of generating EVERY image of everything which ever existed, exists will exist and never exists blew my mind a few years ago. Every screenshot, every photo, every person ever lived will be on those images.
640x480 image = 307,200 pixels.

256 colours.

256 ^ 307,200

That's a really big number, about 739,812 digits long. If you hired a team of 1 billion people checking 1 permutation per second, you'd cut off about 15 digits, giving us a number that is still 739,797 digits long. That would be how many years it would still take for all of those people to check all of those permutations.

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 12:11 pm
by SpyderTL
I actually wrote a utility to do this a few years ago, and I knew that it would take a long time and take a lot of HD space, but I really didn't expect things to get out of hand so quickly.

For example, I tried generating "simple" bitmaps that were 4 pixels by 4 pixels, and 16 colors.

The results? After 30 minutes and hundreds of thousands of images being created, I stopped the utility and never ran it again.

Turns out 4x4x16 would have generated 18,446,744,073,709,551,616 bmp files. And even if it generated 100,000 images a second, it would have taken just over 5.8 million years!

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 12:13 pm
by Cjreek
I know it's unbelievable much data. When I had this idea years ago I started with 800x600x24 and those numbers where huge. And I was very disappointed when I found out that even a 16x16pix 256 color icon is far too huge for to generate (nearly) all of them. (Would have been a nice, cheap icon collection :mrgreen: )

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 12:20 pm
by DavidCooper
It is certainly possible to produce a video of an eskimo in a snowstorm byte by byte, or a black cat in a coal cellar, but to produce more interesting things it's impossible to create the right colour and brightness of any one pixel without it being related in some way to the colour and brightness of other pixels (unless you're relying on random lack generating unlikely images, which is like monkeys typing the works of Shakespeare - it can happen, but you'll never find the worthwhile results amongst all the imperfect ones and the random crap). You have to apply some kind of drawing algorithm to coordinate the colours and brightnesses of all the pixels.

The closest thing I can think of to what you may be trying to do happens in our heads when we're asleep - in dreams we generate video of things that aren't real, but this must be done by some kind of drawing or the pasting in of recorded video to make up the scene. I once studied the waves on the sea during a dream and the way they were put together, but I never got round to writing up the details afterwards and it's too hazy now to say anything greatly useful about it now other than that I was able to see defects in it - when I looked at different places on the sea I saw the same recognisable bit of wave video playing again and again, but I may have caused that to happen by thinking about it too much. Perhaps you may be able to do better when trying to work out how the video in your dreams might be put together - write it all up as soon as you wake up and don't make the mistake of trusting your memory to hold onto the details.

Your best bet would be to create lots of files like those GIF ones where the same thing plays round and round forever without an obvious join, and then you could maybe paste them together to make new scenes, but the joins between pasted elements would be a mess without doing a lot of drawing to tie them together.

Re: Is it possible to make videos of anything just byte-by-b

Posted: Wed Oct 01, 2014 12:39 pm
by AndrewAPrice
DavidCooper wrote:You have to apply some kind of drawing algorithm to coordinate the colours and brightnesses of all the pixels.

The closest thing I can think of to what you may be trying to do happens in our heads when we're asleep - in dreams we generate video of things that aren't real, but this must be done by some kind of drawing or the pasting in of recorded video to make up the scene.
As many people mentioned, that's essentially what a video game is doing. You're exploring world's that don't exist, never existed, and are the dreams of mere humans in digital form;

Image

They may have used real-life content (taking photos of real textures, scanned in 3d models), but there are also games where everything is hand or procedurally made rather than captured.

What about an animated cartoon - where all of the art content was digitally hand made, with the rendering software using drawing algorithms to paint each frame and encode it into a video file?
Image

Re: Is it possible to make videos of anything just byte-by-b

Posted: Fri Oct 10, 2014 2:19 pm
by onlyonemac
Yes this would be possible because anything can be built up byte-by-byte. (Including executable binaries...)