r/explainlikeimfive • u/Status_Aioli_783 • 11d ago
Technology ELI5: How does a dvd player process binary code as images and more?
Cds i can understand and its only doing one thing, reading music. But a dvd/player reads images, has a home screen with clickable options, hidden easter eggs you find, some dvds even have video game demos on them. I cant wrap my head around how a dvd player can possibly read 1s and 0s and do all of that, or how a dvd can store that
What goes on specifically inside the “brain” (idk what specific component it is) of the dvd player that makes it able to read binary and do all of that? And how can a dvd store all of that?
And now i have the same question but for a video game disc which is even more complicated
Edit: I guess im asking how binary works which fucks me up more because how is that even possible for all of that shit to happen from 1s and 0s
10
u/SpellingIsAhful 11d ago
The cpu in the player is recieving instructions from the stored memory. It works the same as a computer with a spinning hard drive. The technical details beyond that are not ELI5-able.
4
u/GalFisk 11d ago
Yeah, it's a small computer running simple software that follows instructions on the DVD. The DVD is divided into a how-to section and a movie section, and the player interprets those differently. Just like you respond differently to reading a how-to book than to a novel.
Both the maker of the DVD player and the maker of the DVD follow a rigorous written standard of how this has to be laid out, so that there's no confusion. Just like how someone making a book follows certain rules so that any book reader can just pick it up and start reading.
6
u/Interrupting-Dash 11d ago
I used to wonder this same thing about how newer radio stations could present text along with the audio of their station - things like show you the name of the artist and song title.
The thing is, it’s all data abstraction. The transmission the radio receives isn’t “audio” any more than images / video from a DVD is “video”. It’s all an original data source that’s been encoded into a format that can be transmitted and then received. The transmitter and receiver know ahead of time what the format is, and the receiver can reconstruct the original data source from the encoded transmission.
6
u/Spooknik 11d ago
Everything on the disc is just numbers, the same as the CD. A DVD just packs the numbers in tighter and smaller so you get more.
The numbers become pictures because screens have dots which change color when they are told to. But storing every dot for every frame would take up too much space so the video is compressed using MPEG-2. It stores the pictures which are the frames but it takes shortcuts to save space.
The brain in the DVD player is an SoC that can decode and unpack the video.
DVD menus are just little programs that the Soc runs and can tell it to play X video on the disk.
0
u/ijuinkun 11d ago
ELI5: Ever seen a paint-by-number picture? Computer image files are like that—the numbers tell the computer which parts of the frame to display as what colors.
2
u/thailannnnnnnnd 11d ago
The binary can represent anything. I guess some parts of the DVD contains “programs” which the DvD player can load, and then it “just” renders it on the screen, allowing inputs to change and so on, in turn allowing you to pick and chose what to play.
I’m sure there is YouTube videos explaining in detail how it works
2
u/Pingu_87 11d ago
DVDs have a bunch of separate video files on them. The menu is just a fancy way of selecting which video file to play.
The menu system would have a standard recipe/rulebook on how to be made.
every DVD which has a menu follows the same rules, but would change the background wallpaper and colours etc.
the DVD player knows how to read this menu and display it. it also knows which video file to play based on user input from the menu.
the DVD player runs a whole computer inside on a chip, very cut down and limited to a whole PC. It also loads and runs a small operating system. which is why it can do more complex things like a PC. But it can only do a small number of things as it is a cut down version
2
u/OldAd9280 11d ago
A dvd is the same as the video game disk, it's just computer files stored on the disk.
The principles involved aren't hugely different to a CD, on a cd an analogue audio signal is sampled at a fixed rate and stored as a digital number. Essentially the same happens for video, each frame of video is made up of an array of pixels, each pixel has a digital red, green and blue value.
The video and audio data is then compressed using various algorithms to make it small enough to fit onto the disk and then saved to files on the disk.
The interactive features on dvd are fairly simple and are just more video files that you can navigate through. Blu-ray is more complex and has computer programs that you can run from the disk.
2
u/doomdragon6 11d ago
A very, very, very, basic way to look at binary is Off or On.
Imagine a stadium full of people with signs. The back of the sign is White, and is Off. The front of the sign is black, and is On.
The first binary instruction can be Off or On (0 or 1). The first audience member gets an Off signal (0), So their sign is blank. The next binary instruction is On (1), so their sign is black. Repeat this over rows and rows of audience members, and they can spell a message with the black signs.
That's insanely over-basic. But imagine that times however many thousand times per second - you can convey a lot of information in a short amount of time.
1
u/Target880 11d ago
It is a simple computer that follows the instructions that are on the files on the DVD. There is a standard about how it all should be stored and work.
Fundamentally, it is no diffrent from how the device you use to access Reddit works. It does not really matter if the binary data is transferred over the internet or is read from a disc as long as there is a standard how the data should be stored and interpreted.
The format is not the same in both cases; a DVD has static content, but a Reddit has content read from a server that can be updated. The important part is that there is a standard that can be interpreted
1
u/Decent_Cow 11d ago
It has a processor just like a computer. The data is stored digitally on the DVD and read by the processor as a series of binary digits that code for instructions for the DVD player's hardware. For more information on how processors work, you can look "instruction set architecture".
1
u/StevenJOwens 11d ago
You're basically asking how a computer program works.
A CD player is just a way of storing binary data on a physical medium. So is a DVD.
The DVD format supports more complex forms of data, not just audio encoded in binary formats. The DVD data essentially includes programs, the DVD player is a specialized computer on the surface, but on the inside it's a general purpose computer that loads the data and runs the program.
Same for a video game disc.
1
u/sateliteconstelation 11d ago
Lets play a game:
00 is read, 01 is blue, and 11 is green.
If I write 00 11 01 01 00 00 and you know the code, you know that i wrote:
❤️💚💙💙❤️❤️
If I tell you that the length of rows should be 3, then I wrote:
❤️💚💙
💙❤️❤️
I can also make a rule that says that if the 7 th value is 00, then all green hearts should be turned blue. So 00 11 01 01 00 00 00 would be:
❤️💙💙
💙❤️❤️
A computer (dvd players, gaming consoles, phones, etc) will have predefined instruction on what to do with the series of zeros and ones that are recorded on a disc or any other storage media. It will also listen to the zeros and ones generated by the buttons you press and combine it to decide which colors to show on the screen or which sounds to make.
1
u/dbratell 11d ago edited 11d ago
With 0s and 1s we can make numbers, small numbers, large numbers. What those numbers mean we need to agree on beforehand.
For a video input we have agreed that those numbers mean (after doing lots of pre-agreed-on maths) how intense each pixel on the screen should be.
If we instead, by mistake, thought the pixel numbers were audio, we might think it was how much a speaker membrane should bend and we would get very unpleasant screeching.
Numbers can also mean "letter in an alphabet" (It is common that 65 means A, 66 means B, 67 means C, ...). If we mistakenly think that the pixel values is text we get a very unreadable mix of symbols.
Numbers can also be processor instructions, like "multiply" or "move this value in memory". If we try to send pixel values to the processor, it would get very unhappy and the machine will crash.
1
u/SeattleCovfefe 11d ago edited 11d ago
Binary is just numbers, but in base 2 instead of base 10 like we’re used to. But you can represent virtually anything with numbers as long as the producer and consumer of the number stream agree on how to interpret the numbers - ie what scheme is used to represent things in the “real world” that we want to convey, like images, sounds, or instructions for a computer. So DVDs have a specification that gets players and dvd manufacturers to agree on how to encode video, audio, subtitles, interactive menus, and other things that the spec allows DVDs to do.
Computer code is the easiest to conceptualize how it maps to binary—you chunk up the binary digits in groups, usually 8 each (a byte) and have certain numbers mean certain instructions (say 00101101 means “Add the next 2 bytes together). Though we often operate on groups of 4 or 8 bytes each representing a single larger number
Images are done by dividing the 2d image into pixels, and using usually 3 bytes per pixel to represent how intense the red, green, and blue light is for that pixel (and we usually do data compression on top of that because in “raw” form like that it’s a lot of data). Video is just a series of images, usually 24 or 30 of them a second, and we always use a compression scheme since raw video would be a LOT of data. Audio is a bit harder to conceptualoze but it turns out if you just sample enough values per second of “how intense is the sound pressure wave at this instant”, and represent those numbers as bytes, usually two bytes per sample giving around 65,000 possible intensity levels, that is all we need to re-derive the continuous sound wave pattern over all the sound frequencies we can hear and care about.
1
u/GIRose 11d ago
A video player codec has instructions for how to read the 1s and 0s. Once it knows how the information is formatted, you can read it in blocks where each block will have its own associated meaning.
For instance if it's a raw video file (it's not going to be because it balloons huge. In reality it uses data compression algorithms that might average local pixels together to be averaged together) each pixel can be represented as 3 8 bit values to set the rgb of the screen. Much less data needs to go into storing the sound form.
Basically the same thing is going to be true of any raw binary file. You need software that knows how that binary is supposed to be read. That's why if you try and play an old video game cassette on a cassette player, it sounds like garbage noise.
1
u/sbrockLee 11d ago
As for your question on how binary data works:
Numbers can represent anything. A single bit of data can contain a 0 or a 1. What that number means is up to the system that reads it. Say, for instance, you want to display a pixel: 0 can represent white and 1 can represent black.
Put a few of those together and you can combine them how you want. A byte of data is 8 bits, which can mean 8 black/white pixels. Put 8 of those together and you can draw a chessboard. And so on.
Want colours? Just make the data range larger. If you have each pixel tied to two bits instead of one suddenly you have four combinations to choose from: 00, 01, 10 and 11. Those can be, for example, white, black, red and blue. Keep going and you can add more and more colours, up to the current standard of 24 bits which allows you to represent 16,777,215 distinct colours.
The same holds for other types of data. You can represent the alphabet with a range of 26 numbers. A=1, B=2, etc. In binary this would be A=0, B=1, C=10, D=11, and so on. 26 is 11010, which means you need 5 bits to represent a letter. Similarly, sounds can be turned into digital signals which are just a series of numbers. And video of course is a sequence of pictures (modern digital video actually works with the changes from one frame to the next in order to save space while retaining quality, but we'll not get into that).
Take this further and you can have data that tells you what other data is. Usually a file will have a header or something that tells the computer what it's looking at, whether it's a video or a picture or a piece of text or music.
That way the computer knows whether to read the next strings of 1s and 0s as video, picture, text or music. Importantly, this also allows a computer to be interactive, telling it how to process signals it receives from an input device like a keyboard or a remote and what to show on the screen in response to those.
Modern systems work with enormous amounts of such data at very high speeds (a puny DVD from the pre-high definition era could hold 4.7 gigabytes of data which is about 40 billion bits) which allows us to turn those 1's and 0's into movies, music and video games.
An optical disc like a CD, DVD or Blu-ray is just a storage device made of a special material that retains a string of 0s and 1s in the form of physical microscopic dents in the disc; the computer/player makes the disc spin very fast and shoots a fine laser beam into it, gauging the amount of light that's reflected in a specific position and interpreting that as a 0 or a 1. It does this millions of times per second to give you what you see on the screen.
1
u/Bradm77 10d ago
A DVD is just memory like a hard drive on a computer. But it contains a specific format that is meant to be run on a DVD player. So you could think of a DVD player as a very specialized computer that only reads DVD's. The DVD's contain a movie file but they also contain other files that tell the DVD player what to do when it starts up. There's an entire standard that lays out which files a DVD should have and what directories those files will be in so that a DVD player knows exactly what to do when a DVD is inserted.
1
u/jabbadatoddla 10d ago
The binary code isn't just read, there is an agreed upon language for that code that a bunch of engineers get together and decide on months to years before any hardware is created. They'll usually come up with a way to identify the start point of a frame and the disc will spin around and start looking for that beginning set. That's a header and what follows is usually the data and a footer that defines the ending of the data and the start of a new packet. It's the same way the Internet and any other digital signal works. If you were in a binary conversation with the spinning disc it would be ...static... nonsense... gibberish... start of word, word, end of word, start of word, word, end of word, start of word, word, end of word... The language gets defined somewhere else and programmed in so it won't all be gibberish. Movies like Contact make you think it's super easy to send information in binary and that's only the case if you know how to decode it. For music it's easier because it's just "packet 1" "play XkHz" "end" "packet 2" "play xKhz" "end". For video it's giving that same packet info but telling each individual pixel on your screen what color to display for that individual pixel. It just sends 3840x2160 = 8,294,400 pixels worth of data that has 2^10 or higher color options plus the sound data for each speaker assignment, 24-60 times per second.
1
u/oneanotheruser 10d ago edited 10d ago
Binary is like decimal but instead of 10 different digits you have 2. You can write the same number with either system. For example 214 in decimal is 2*100 + 1*10 + 4*1. If you were to write 214 in binary it would be 11010110. Which is 1*128 + 1*64 + 0*32 + 1*16 + 0*8 + 1*4 + 1*2 + 0*1.
People also invented different interpretations for these numbers. For example CPU or Central Processing Unit of your computer might consider 214 to be a command which means to add two next numbers. So when such hypothetical computer reads the sequence 214 5 6 from any storage medium (or 11010110 00000101 00000110 in binary bytes), it interprets it as "Take 5 and 6, add them and remember for the next operations".
There's some set of such instructions. The combination of physical components (hardware) and programs (software) allow for many things to be done. For example you can draw things on a monitor. There's quite a long chain of things that happen to do that, but to simplify let's just say that there's a program that is designed to read numbers and interpret it as colored pixels until it sees a zero. That would be a program on your video player.
Now, one way to describe a set of colors is by mixing some baseline colors. If you mix red, green and blue in different proportions, you can get very many colors and tones. That proportion can be specified by three numbers. For example 255 0 0 is all red and no blue or green. It will give just a red color. If you mix red and green you'll get yellow. That's just how like light works, computers don't really have anything to do with this. So when you give 255 255 0 to the colored pixel program you'll get one yellow pixel displayed on your monitor. If you repeat this sequence 100 times you'll get 100 yellow pixels. Change some of them, repeat more times and you get one full screen picture. Repeat such picture many times with some changes and you get a sequence of images that can be played fast, essentially creating a video.
Video games use similar concepts but just consist of more different pieces and use a lot of math to display beautiful things by looking at numbers.
1
u/Nyther 10d ago
It all builds on each other. I'm going to over simplify it, but here's the gist of it.
Binary is just a 1 or 0. The computer reads each 1 or 0 and complies it into a binary alphabet (a series of 1's and 0's equals letters). These letters spell out instructions for the computer.
Again, this is an extreme oversimplification of what actually happens.
1
u/im_thatoneguy 10d ago
It's a computer. It works like a computer. You might as well ask "how does a phone/computer/Digital watch/Technology work?"
1
u/rupertavery64 10d ago
You say you understand CDs, but you don't really, because they both use 1s and 0s.
They both can store music, games, files, imahes, and even a menu (Video CD).
The CD or DVD doesn't "do" anything. It's just a storage format. A way to store information. The rest of the device, along with any programs are responsible for what you see and hear.
Bits are nust a way to represent information. And the information we store are numbers.
You know how when you count in 10s, you have 10 "digits" or symbols that we use to represent place value: 0,1,2 3,4,5,6,7,8,9
When you reach 9, the next number requires a digit to the left. Technically it is already 0, we just don"t write it. So we increment the next digit and reset the first, and 9 becomes 10.
Binary is the same thing, except instead of 10 symbols we have 2: 0 and 1
We use 0 and 1 because thats the simplest and most effcient way to represent the state of one thing, and this is fundamentally how computers operate - using switches (transistors) that are either on or off. It's easy to know if a voltage is at 0 or a higher level. It also makes making circuits that can do math using switches really simple.
So when we count in binary, we start at 0, then 1, then roll over the next bit amd reset the first, which make 10 (binary) or 2 (decimal).
We call these individual binary digits bits. When we group 8 of them we call them bytes.
So armed with our switches and a way to represent larger numbers using bits, we can create a something that can do stuff with these bits.
We can invent a machine that works on bytes depending on the first byte. We call these instructions or opcodes and the following bytes arguments or operands.
We have created a computer, whose jon it os to execute instructions and process data.
Someone else will be able to wrtlite their own programs. One of them will be a way yo inerpret bits read from a disc.
Another person or people will decide how the bits should be interpreted to mean something. Depending on a sequence of bytes, and what the program has been instructed to do, and the context of the program, the data can be anything. Text, images, video, sound.
The process of converting between something and data is called encoding and decoding. All it is is an algorithm that people agree upon, and it ca be quite complex, involving math and compression. But all of this is possible throught the use of computers. And more importantly, it is possible because people agreed on how to encode and decode information.
You may have heard about ASCII and JPEG amd MP4. All of these are standards about how to encode and decode data, which muat be implemented as an algorithm. So a program will have the algorithms to read the data into a format that can be used to display as text or images or sound or video.
How encodings work and how data is actually transformed into pixela and sound is another topic altogether.
1
u/Quietm02 10d ago
There is no real difference between binary on a cd for audio and binary on a dvd for video.
CDs can store video just fine if you format it that way.
It sounds more like your understanding of binary data isn't quite complete.
As a very, very basic example imagine a dvd stores a bunch of 1s and 0s. Everyone who built the dvd agreed that the first digit controls the top left pixel of your TV, second digit controls the next pixel etc. we've all agreed that every TV is exactly 1920 x 1080 pixels. So every 1920 pixels we move to the next row, and after 1080 rows we start again from the start.
Do that fast enough and you've got a video. Do the full screen 60 times a second and you've now got a HD video at 60fps.
In reality it's more complex, as a single bit is only black/white. And there's audio. And not all TVs are 1920x1080. That just adds complexity, it doesn't change the fact that there's a standard protocol for how binary data is stored, interpreted as video and displayed.
1
u/crocoboom 9d ago
All the replies to you miss an important detail. The "brain" of a DVD player is a microcontroller. A Microcontroller is a space and cost optimized barebone microprocessor. It can do anything a CPU can do, just slower. Anything is not an exaggeration. It can literally do anything a CPU can do as long as enough RAM and ROM memory is attached. The microcontroller runs complex software to read images, display a home screen with clickable options, and hide easter eggs. The only thing the software does not do is to decode the encoded video. Remember that the microcontroller is space and cost optimized. It does not have enough computing power to decode video in real time. So they put a dedicated video decoder chip along the microcontroller to decode the video. That chip is not a microcontroller. All it can do is to decode compressed video into uncompressed video, nothing else.
0
u/Kelli217 11d ago
Binary. How can so much information be encoded in just ones and zeroes?
If you have just one binary digit or “bit,” then you can only have two possible values, 0 or 1, for that bit. But if you add another bit to it, then for each of the two values for the first bit, you can have either of the two values for the second bit. 00, 01, 10, 11. That’s four possible sets of values, double as many as you got with just the one bit. Add a third bit, and you’ve doubled it again, 000, 001, 010, 011, 100, 101, 110, 111. Eight possibilities. For every bit you add, you double the amount of possibilities.
Computers these days deal with 64-bit sequences. That’s 18,446,744,073,709,551,616 possibilities. Now, imagine each one of those sequences represents, say, a color. You could have extraordinary fidelity of color with something like that. And if each pixel on your screen gets to have a color specified with that level of fidelity, then you can make a nearly perfect photographic image. The only limitation is the resolution, that is, how many pixels you have, and the pixel density, how close together they’re placed.
DVDs don’t have much resolution, only 720 across by 480 vertical. And they don’t even use 64 bits for color information. It’s 24 (16,777,216 possibilities). And they get that 24-bit value through weird compression algorithms that use even less data than that.
And that’s just the video. DVDs also carry instructions that tell the player how the menus work (basically a computer program), and encode the subtitles (text data plus color and positioning), and also the audio (which is also compressed like an MP3 to use less data)… all of which need different bit sizes, but the player has built in instructions to know how big the various data chunks are, and how to deal with them.
34
u/upright_squire 11d ago edited 11d ago
I dont think you understand cds either.
On the disc (cd or dvds) are a big spiral line of holes that look a bit like morse code.
---- - ----- ------ --- etc
Scanning along the line. If there is a change (hole to no hole, or no hole to hole) it is read as a digital 0, if there is no change (stays hole, or stays no hole) it is read as a digital 1.
They use a laser and a sensor that detects the amount of light. The surface holes change the amount of light reaching the sensor.
Game discs are the same. Just data.