2. What is File actually ?
A file is a collection of data
stored in one unit, identified
by a filename. It can be a
document, picture, audio or
video stream, data
library, application, or other
collection of data.
When we open a file it displayed as video file, audio file , text file
, image file , etc… .But these files are stored as a Binary value in
the system ( 0’s & 1’s ). Now we are going to see how these
Binary values are shown in different dimensions like video ,
audio , etc…
3. How Text Files are stored :
So as we know all files are getting stored in
Binary values . We can easily convert
Decimal numbers to Binary . But for
alphabet is done by encoding and decoding
of ASCII values (American Standard Code
for Information Interchange)
It consist of 7 bits out of this we can make 128 combinations of characters
which consists of alphabets , special characters etc … So these are not enough
for todays modern world we are using emojis , other languages etc..
We need an alternative know as Extended ASCII which has 8 bits which is not
sufficient ,we need an advanced number system UNICODE which supports 32
bits and has a combination of 4 billion characters, so for futuristic we are using
UNICODE for saving text file
தமிழ்
4. In this we have Binary value for
alphabets now we have to denote
UNICODE for the letter and then
convert the UNICODE value into
binary value and it is saved in the
system , It is called UNICODE
Encoding. If we want to read a
text which is save in the system
UNICODE Decoding take place it
coverts the binary value to
UNICODE and then to letters and
display it to the user .
5.
6. How Audio Files are stored :
Basically Audio is an Analog signal , in todays
amplifiers we all are using analog. Converting these
analog to digital signal is done by Sampling . Analog
signal are continuous wave signal but digital signal
are discrete signal’s. Through Sampling multiple bars
are drawn in analog signal through the bars we get
some numbers which the numbers in the above is
mentioned as positive and numbers below the line is
mentioned as negative .
Initially while you record the audio, the processor interprets your audio
as a stream of bits and writes it to the memory. But before it writes it to
the memory, it usually does some modification. A software (codec) reads
these stream of bits and encodes it into one of the industry formats. This
is done to reduce the transmission bandwidth and storage requirements.
7. Example we take WAV format of
storing an audio file . In this WAV
format file is stored , the first 44
bytes are known as WAV file
header which consist the audio
data such as: Bitrate,
Length,Channels these are called
as Meta Data . The data which
comes after that are called as audio
data in this the sampled binary
values are stored
8. How Image Files are stored :
As we all know images are made up of Pixels
when zoom it we will able to see small boxes of
coloured pixels. For example we take a 1080p
image (1920 x 1080 )p if we multiply it we will
be getting 2 million pixels will be there in the
image . Pixels are basically colours when various
pixels are merged we will be getting an image
Now these pixels have majorly 3 colours RGB (Red, Green ,Blue ). We can
make several colours by mixing the values of these RGB . These values
are denoted by 8 bits such as 0-255, we get 255 combinations of
different colours.
9. In earlier days the images
are stored in RAW format
PPM (Portable Pixamp
Format ) which has the raw
metadata of the image like
image header size and the
values of the colours.It
takes lot of storage , now a
days JPEG is a compression
technique which reduces
the size of the image
without disturbing its
quality .
10.
11. How Video Files are stored :
Basically video is a sequenced frame of images .
1 sec of video comprises of 24 frames ,24 FPS
(Frames Per Second ) . If the frames are less
than 24 it creates a video like timelapse . We can
store all images as frames and play it as video
but it takes lot of storage space. To reduce this
size encoding techniques are used such as
H264,H.265 , MP4 etc…
Whenever a video file is saved it contains two file in it. One is the
container and other is codecs. Container defines the structure of the
video file and which codecs will be used. Codecs is used to compress and
decompress video file.
Some of the containers such as : MKV ,MP4, WMV ,AVI (.avi ) etc..
12. There are many formats for
storing video + audio files. These
MKV , MP4 are containers not
formats. When a video has
multiple languages of audio and
subtitles,SRT these all are
merged into single file and stored
in a containers.