Is it possible to make videos of anything just byte-by-byte?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Cjreek
Member
Member
Posts: 70
Joined: Thu May 28, 2009 2:41 pm
Location: Germany

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

Post 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:
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

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

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
b.zaar
Member
Member
Posts: 294
Joined: Wed May 21, 2008 4:33 am
Location: Mars MTC +6:00
Contact:

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

Post by b.zaar »

I can never remember the name of my favorite pics this way...
"God! Not Unix" - Richard Stallman

Website: venom Dev
OS project: venom OS
Hexadecimal Editor: hexed
TylerH
Member
Member
Posts: 285
Joined: Tue Apr 13, 2010 8:00 pm
Contact:

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

Post 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.
User avatar
LieutenantHacker
Member
Member
Posts: 69
Joined: Sat May 04, 2013 2:24 pm
Location: Canada

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

Post 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?
The desire to hack, with the ethics to code.
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
TylerH
Member
Member
Posts: 285
Joined: Tue Apr 13, 2010 8:00 pm
Contact:

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

Post by TylerH »

Yep. Just permute the images as frames in a video.
Cjreek
Member
Member
Posts: 70
Joined: Thu May 28, 2009 2:41 pm
Location: Germany

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

Post 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.
User avatar
AndrewAPrice
Member
Member
Posts: 2298
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

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

Post 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.
My OS is Perception.
User avatar
AndrewAPrice
Member
Member
Posts: 2298
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

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

Post 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.
My OS is Perception.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

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

Post 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!
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Cjreek
Member
Member
Posts: 70
Joined: Thu May 28, 2009 2:41 pm
Location: Germany

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

Post 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: )
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

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

Post 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.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
User avatar
AndrewAPrice
Member
Member
Posts: 2298
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

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

Post 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
My OS is Perception.
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

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

Post by onlyonemac »

Yes this would be possible because anything can be built up byte-by-byte. (Including executable binaries...)
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Post Reply