OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 1:39 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 2:08 am 
Offline
Member
Member

Joined: Thu May 28, 2009 2:41 pm
Posts: 70
Location: Germany
@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:


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 5:39 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
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.


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 5:58 am 
Offline
Member
Member
User avatar

Joined: Wed May 21, 2008 4:33 am
Posts: 294
Location: Mars MTC +6:00
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


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 6:06 am 
Offline
Member
Member

Joined: Tue Apr 13, 2010 8:00 pm
Posts: 285
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.


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 8:07 am 
Offline
Member
Member
User avatar

Joined: Sat May 04, 2013 2:24 pm
Posts: 69
Location: Canada
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/


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 8:17 am 
Offline
Member
Member

Joined: Tue Apr 13, 2010 8:00 pm
Posts: 285
Yep. Just permute the images as frames in a video.


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 8:26 am 
Offline
Member
Member

Joined: Thu May 28, 2009 2:41 pm
Posts: 70
Location: Germany
@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.


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 10:25 am 
Offline
Member
Member
User avatar

Joined: Mon Jun 05, 2006 11:00 pm
Posts: 2293
Location: USA (and Australia)
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.


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 10:33 am 
Offline
Member
Member
User avatar

Joined: Mon Jun 05, 2006 11:00 pm
Posts: 2293
Location: USA (and Australia)
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.


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 12:11 pm 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 12:13 pm 
Offline
Member
Member

Joined: Thu May 28, 2009 2:41 pm
Posts: 70
Location: Germany
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: )


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 12:20 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 27, 2010 4:53 pm
Posts: 1150
Location: Scotland
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


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Wed Oct 01, 2014 12:39 pm 
Offline
Member
Member
User avatar

Joined: Mon Jun 05, 2006 11:00 pm
Posts: 2293
Location: USA (and Australia)
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.


Top
 Profile  
 
 Post subject: Re: Is it possible to make videos of anything just byte-by-b
PostPosted: Fri Oct 10, 2014 2:19 pm 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group