Week 9 and 10 Flashcards
what is a video
a sequence of still images (photographs) that create the illusion of movement when played in succession
what is each still image called
a frame
movies on film played from ___ to ___ fps
24-30
tv was originally ___fps
29.97
computer displays video at at least ___fps
12-15
in digital video, each frame is a ___ graphic stored as 0 and 1
bitmapped
describe the sampling and quantization processes of film
sampling = each frame sampled into a discrete sample and each sample becomes a pixel
quantization process = assigning a value to each colour
what can we “sample” with MOTION
- Timing of the motion
- Sampling = frames
- Higher FPS = more accurate motion but a larger file size
still images use rgb but videos use
YUV (YIQ) or YCbCr for MPEG compression
what does the Y and UV in YUV stand for
Y = luminance Brightness UV = CbCr in YCbCr = chrominance (colour or hue)
black and white tv only used which part of YUV
Y because it had no chrominance (colour)
when we went from black and white to colour TV, we had to lose ___ because colour increased the file size of each frame
fps
the human eye can detect changes in ____ more easily than changes in __
brightness than colour
it is common for the ____ to be sampled less often because ___
chroma sample (UV) changes in colour are less noticeable
what is the format of colour sampling method
Y:U:V
u and v are colour hue
y is brightness
4:4:4 is no compression
4:4:4 colour sampling is how much compression
none
4:2:2 colour sampling is how much compression
33% on hue, reduced from 12 samples to 8
4:2:2 subsample rate means that out of four colours, two of them will disregard their own colour and take the colour of their adjacent pixel
- lose information
- and save space in your media
4:2:0 colour sampling is how much compression
50% on hue, reduced from 12 samples to 6
4:2:0 subsample rate means that 3 out of four colours will disregard their own colour and take the colour of the last one to save a lot of space in the end
if you want to compress colour, you ….
keep the brightness but take the averages of the colours
what kind of display did original tvs have
Interlaced display
what is interlaced display
uses 48 horizonal scan lines, our eyes see phosphor dots on the screen and an electron beam excites the dots and gun scans through the dots horizontally
only scans every other line odd and starts back up at the top and draws the even lines
- takes two passes, one pass= feild
what is a complete scan in interlaced display
starts at top left and scans each row until bottom right
each pass in an interlaced display is called a
field
what is a progressive display
what we use instead of interlacing
means the whole image is shown at once instead of displaying in passes
480i means
interlaced is i and 480 is the number of feilds
720p and 1080p mean
progressive= p means the whole image is shown at onced 720p is 1280x720 (720 indicates number of rows) 1080p is 1920x1080 number indicates number of pixels
4K compared to 480i, 720p, and 1080p
whats the difference
what is the resolution of 4k and 8k
for 480i, 720p and 1080p, look at horizontal rows but for 4k and 8k you look at vertical columns
7680x4320 - 8k
3840x2160 - 4k
what do TV specs mean -
the tv specifications.
The 50” means 50 diagonal inches (not sure
why it is not metric )
The 4K or 1080 or 720 means number of
pixels
◦ Originally TVs before 1980s had 480 horizontal scan
lines
◦ Then HD TVs had either 1080 or 720 horizontal
scan lines
◦ NOW 4K or 8K TVs have ~4000 or 8000
VERTICAL scan lines
You may see i or p – interlaced or progressive
what does 4k refer to
width
high definition resolutions started at __ and then went up to ___, ___ and finally ___
720, 1080, 1440 then 4K
apple suggests that small devices should be held at ___ inches away from your face and that the screen resolution should be at least ___ ppi
10-12, 300 ppi
at 300 ppi, pixels are so close together and that at 10-12 inches from your eye, things start to look like continuous curves
this is refered to as high retina display
what is high retina display
Apple suggests that small devices (iPads etc.) should be held at 10-12 inches away from you face and that the screen resolution should be at least 300 ppi to look crisp.
Retina Displays have a pixel density high enough so that your eyes cant detect pixels at a normal viewing distance.
for this you must consider
- pixel density
viewing distance
display size
what are some things to things to think about before exporting a video
where will i be putting my video
- on the web, dvd video etc
who is my audience
will i still need to edit it later on or can i compress it all
why should you compress a video
they are fucking long
what is bit rate / data rate
amount of video processed per second
Bit rate = amount of data used to encode video or audio - megabits per second (Mbps) kilobits per second(kbps)
how do you calculate bit rate average
average bit rate = file size/length in seconds of video
bit rate is normally measured in
bits not bytes
don’t just consider the file size of the video, also consider how many bits you have to get across in a given amount of time
think about file size as water in pool
think about bandwidth as hose to fil pool
think of pressure as bitrate (filesize/length in seconds)
how to compress a video: 2 ways
take each image/frame and compress each frame individually
take all frames together and see if there are any spots where its not really changing … you can store that info in a single frame
compression strategies
lower frame size of vid
lower frame rate of video (removing frames or adding seconds)
pick a codec that does higher compression
lower picture quality of video
lower colour depth
play with the audio but this probably wont do much
what is a codec
is a piece of code that compresses a video or audio as it is created (exported from the editing software) and then when displaying it to the user decompresses the video or audio (also stands for the coder/decoder)
what codec does youtube use
H.264
examples of codex
DivX and H.264
if you get a vid on your machine and cant play it, what does this probably mean
that youre computer is missing the appropriate codec
compression concepts- spacial vs temporal
spatial compresses each frame individually and uses same compression technique as JPG, codecs that do spatial compression are animation, planarRGB
temporal compression does better compression but is not good for sports games because it saves info on specified key framesand the other frames just save differences from frame to frame
what is temporal compression - video
better compression
good for talkshow not for action games
- Save info on selected frames (called keyframes)
- all the other frames just save the differences from the previous keyframe
- good when the difference between current frame an keyframe is small
- codecs that use temporal compression: Sorenson video, H.264
spatial compression - video
Spatial
- Compresses each frame individually
- uses the same techniques as JPG compression
- Codecs that do spatial compression are Animation, planarRGB
lossy vs lossless compression in video
lossy lowers video quality but gets better file size and better data/bit rate (filesize/length)
lossless looks for large blocks of pixels that are the same to do Run length encoding
Lossy vs lossless depends on the codec
what does bit rate affect
- file size and quality of video
- accessibility of file (how fast the internet connection needs to be to access it)
- how costly it is to upload the video on your own site
how to insert video in HTML
what three video formats does html5 support
- MP4
- WebM
- Ogg
- will NOT allow .avi
what vid format does html5 not support
.avi
.flv
apple will not support what video format
.flv
If a TV has a colour sampling method 4:2:2, the number 4 represents the: A. amount of compression B. amount of colour C. brightness D. colour bit depth
c
Older TVs displayed frames over two passes, showing alternating lines and then going back to fill in those gaps. This process is called ___.
interlacing
Apple suggests that handheld devices should be held at 5-6 inches away from your face.
no its 10-12in away from a 300ppi device
When calculating the file size of a video, one of the biggest factors in increased sizes is the audio component.
True
False
false
Calculate the bit rate of a video that has a file size of 200Mb and that is 25 seconds long. Bit rate = _ Mbps.
8
H.264 is one of the most common codecs and is used by YouTube.
True
False
true
One video compression strategy is to reduce the frame rate and the number of frames. For which of the following filmed events would this approach be most suitable? A. Hockey game B. Tennis match C. Poker tournament D. Nascar racing
c
When embedding a video into a webpage with HTML5, what is the meaning of the #t=5,30 as shown below?
A. It tells the browser to compress the video so that the file size is in the range of 5-30 MB.
B. It tells the browser that the video is 5MB in size and 30 seconds long.
C. It tells the browser to start the video at 5 seconds into the clip and stop at 30 seconds into the clip.
D. It tells the browser to start the video at 5:30 into the clip.
c
ndicate which of the statements are true about downloading videos (check all that apply).
A. Downloading used to be the only option for watching videos from the Internet.
B. Downloading comes in two forms: unicast and multicast.
C. An advantage of downloading compared to streaming is that it reduces the wait times for the users.
D. Downloading makes the most sense for videos that the users intend to watch multiple times.
ad
an advantage of downloading compared to streaming is that…
it reduces wait time for users
The form of subtitles that is embedded in the video and cannot be turned off is called __.
hard
An audio waveform with gradual (spread apart) waves represents a \_\_\_\_\_\_\_ sound than a waveform with tight (close together) waves. A. more high-pitched B. louder C. more low-pitched D. quieter
c
In a higher-pitch sound, you must take more samples than you would for a lower-pitch sound to ensure the audio is represented accurately.
True
False
true
The number of samples taken per second of audio is called the: A. sample depth B. sample rate C. sample size D. sample number
b
Indicate which of the following are strategies for reducing the filesize of an audio file (check all that apply). A. Changing from mono to stereo B. Compressing with a codec C. Decreasing the sample rate D. Decreasing the sample size
b, c, d,
MP3 and WAV are the two audio formats that offer the highest compression rates.
True
Fals
false
MIDI files store audio with a higher sample rate than MP3 files.
True
False
false
Audio files that contain people talking, without any singing or music, should be sampled at about 8000 Hertz.
True
False
true
what indicates html5
what is a container file format
a file format that stores both the data (the frames) and how to play the data ( which codec to use)
some common containers
- .avi - sometimes has uncompressed video just depends, no streaming
- .flv - doesn’t allow subtitle
- .ogg - free open source container format
- .mp4
difference between codec and container
a codec is a method of encoding and deconding more data and more specifically, a protocol for compressing data
a container is reffered to as the format. it is what holds the grouping of compressed videos
is how the compressed video is stored
two kinds of subtitles
hard and soft
what is hard subtitle
hard (hard subs): embedded into vid file so they can not be turned off or removed
what is a soft subtitle
soft (softsubs) are usually stored in a separate file telling what text to appear at what time in the video. These can be turned off/on as needed.
for video embedded in a website with soft subtitiles, the format of the subtitles has to be a ___ file
.vtt
web video text tracks
what are two ways of getting videos from the internet
downloading (making a copy of the file/video on ur machine)
streaming (like listening to radie but you cant save it without difficulties)
downloading a vid to watch it used to be the only option
t/f
true
how does downloading work
- when you visit a website containing a video, the entire video must be downloaded to your computer before you can play it
- progressive downloads allow you to start watching as soon as it has downloaded enough bits to stay ahead of the download
- for the web, usually stored on a HTTP protocol
what are advantages or disadvantages of downloading a video on your computer
dis: you have to wait to play video and takes up storage on computer
adv: once you get it on your computer you can play it over and over and then it saves time
how does streaming work
- when you visit a website containing a video, the entire video must be downloaded to your computer before you can play it
- progressive downloads allow you to start watching as soon as it has downloaded enough bits to stay ahead of the download
- for the web, usually stored on a HTTP protocol
streaming advantages and disadvantages
- no high quality vid
- cant fast forard
- maybe can pause and rewind
- advantages
- you can watch it immediately
if the data rate (bit rate) of the encoded video file is bigger than the amount of bandwidth available, the video will frequently stop playing
- you can watch it immediately
when will a streamed video stop playing
if the data rate (bit rate) of the encoded video file is bigger than the amount of bandwidth available, the video will frequently stop playing
what is unicast streaming
each user gets his/her own stream of video, the server has to send out a lot of data if several users are watching at once
every person gets they’re own stream of the data
requires ppl sending data to use a lot of bandwidth
requires a lot more data to be sent out because each person gets their own version so they can pause etc
what is multicast streaming
send the same stream to a bunch of users but then they lose the ability to pause, rewind, etc
sending out one stream of data but if one person passes it pauses for anyone
what is adaptive streaming
when you can change the quality of the video
probably good to do depending on your bandwidth
youtube converts your uploaded vid into …
mp4
youtube always reencodes your video t/f
true
should you redownload a vid you uploaded on youtube to edit again?
no because its alraedy compressed, so you dont want it to get re compressed.
- Going from 1080p HD video to 4Kvideo will not always improve video quality on the internet because of compression
t/f
if you encode at the same bit rate ad the bitrate is low, the 1080 video will be clearer than the 4k video because it has less compression done to it.
t/f over 75% of all videos are viewed on mobile devices t/f
true
what is sound
pressure waves in the air
waveform?
sereis of reoccurring waves
what indicates volume of wave
amplitude
how tall it is
what indicates pitch of wave in sound
how close together each wave is (closer = higher pitch)
a sound wave is ____ but computers are___
analog
digital
what is Nyquisit limit
rule that says you must take at least 2 samples for every cycle of the wave
if you take less than 2, you will get a completely different sound wave
therefore you must take more samples of higher frequency because more waves occur in the same amnt of time
advantage of taking more samples of sound
you get higher quality sound, but then your file size gets big
what is a sample rate
the number of samples we take per second of audio or number of times per second the waveform is measured
sample rate of voice only
8000Hz or 8KHz
AM radio sample rate
11.025KHz
sample rate is measured in Hz
Hz
FM Radio Quality
22 KHz (music
CD quality
44.1 kHz
t/f you need less quality to represent sound from voice
t
what would 1-bit sampling sound look like
it would just have two tones two notes
what would 2 bit sampling sound like
it would have four tones 00 01 10 11
CDs use __-bit rate
16-bit rate 65536 possible values could be given to each sample
what is the disadvantage of having a higher bit rate for the sample size
Huge file size
uncompressed audio is stored as
WAV
How does the sound wave get converted to be stored on our computer
uses sound card
- computers have a sound card which samples (sets the number of samples and quantized) the sound wave from a microphone
- sound card has an analog-to-digital converter(ADC) for recording and a Digital-to-Analog Converter (DAC) for playing audio
- operating system (windows, mac, linux) talks to the sound card to actually handle the recording and playback
sound compression strategies
reduce number of samples (sample rate)
- go from 44KHz to 22KHz - affects quality
- amount of times you take a sample
- all else staying equal, halving the num of samples will approx half the file size
reduce bit depth (sample size)
- go from 16 bit to 8 bit - affects quality
- aka using fewer bits to represent the sound range
- this will also approx half file size
reduce num of channels
- just combine where sounds comes from to unify it
- in mono there is 1 channel
- in stereo there are 2
- changing from stereo to mono will 1/2 the size of the file
compress using appropriate codec
most famous audio file format that does lossy compression
- MP3!!!!
who invented mp3
Karlheinz Brandenburg! he made up mp3 by removing the unnecessary background sounds that no one would notice if they were gone
can compress a song from a cd (44khz & 16 bit) to 1/11 of its size
based on the idea that some tones become unable to hear when another tone is present
uncompressed file formats for sound
- .wav (very common 44KHz, 16 bit)
- .aiff
- CDDA (Compact disc digital audio defined in the red book which contains audio standards - standard for CDs 44KHz 16 bit per sample, 2 channels)
- thus 1 second of music must be laid at a bit rate of 44100161=1411200 bits per second = 1411.2 kbits per second
- copare with mp3 - 128 kbits per second is most common, makes it good for the internet
what does MIDI sound do and what info does it hold
MIDI sound deals with music and synthesized sound it does not handle voices or noise well.
- which instrument is supposed to be represented
- the note being played
- how hard the note was pressed
Question: What are the disadvantages of MIDI files?
Doesnt work for voice, cant incorporate into a website easily (need to convert to WAV or mp3
not all browsers will play it
also they are sometimes too perfect
linking music to html
Music that doesnt start playing on webpage until user clicks on link
<p>Download a
<a>sound file </a>
</p>
have music embedded in web page
Question: What are the advantages of MIDI files?
small file sizes are easy to edit and change (3 minutes)
Before digital video,these issues when copying one video
Had to copy from one tape to another tape and had to load up tapes on a machine to copy
Loss of quality after each copy madr