Unit Four -- Video

Video, especially digital video, is becoming increasingly more ubiquitous in our lives.  Television, both the older analog form and new digital/HD TV, are hugely popular.  There are an enormous number of movies coming out ever year.  And over the last few years, video has started to explode onto the web, led by sites like YouTube, Vimeo, Metacafe, and many more.  While it is very difficult to get into the Televison or Movie industries, anyone can quickly and easily upload a video to one of those websites and, if the content and quality are good, get thousands or even millions of people to see their video.  This has opened up huge new opportunities for sharing with family and friends, marketing to an audience, and even creating a new show or film. 

In this unit we will talk about how video works as well as how to convert, trim, edit, and create it.  We will focus on digital video, that could be easily uploaded to one of the online sites, but what we will learn could also easily apply to the television or movie industries. 

Section 1 - Video Storage
Section 2 - Formats
Section 3 - Quality
Section 4 - Conversion with Handbrake
Section 5 - Advanced Conversion with FFMpeg
Section 6 - Making Clips with Avidemux
Section 7 - Multi-Track Editing with Kdenlive
Section 8 - Screen Capture Video
Section 9 - DVD Creation
Section 10 - Live and Online Creation


Frame - One image of a video. Many of these are shown every second so that video looks like it is moving.
Frame Rate - The number of frames of video shown each second.
Aspect Ratio - The ratio of the width of the image to the height of the image.  For modern video this is 16:9 or 17:9, for older video this is usually 4:3 (the same as photographs).
Interlacing - When only half the lines of video are shown each frame. This was done in older formats to lower then bandwidth needed but in modern video degrades the quality.
Pixel Format - Unlike photographs where every pixel has one byte for each of R,G,B; video usually uses more complicated, but smaller ways of storing pixels.
YUV - The type of pixel representation that is most often used in video. The Y value is the luminance (or brightness), the U and V values provide the color makeup.
Container - This is the name for how the frames of video, audio, subtitles and other items are packed into a digital file.
Codec - Short for enCOder/DECoder. The codec is the mechanism that is used to compress the video to a smaller size and to turn it back into video when it is being watched.
Interframe Compression - When a Codec looks at future and past frames of video to determine how to encode/decode the current frame of video. This enables the codec to do a much better job at compressing areas of the frame that haven't changed much since the last frame of video.
Bit Rate - The number of bits per second that are used to store the audio or video as digital data.
Two Pass Encoding - In this type of encoding, the encoder runs through the whole video a first time, to determine what areas are easier or harder to encode. Then when it goes through a second time, it can use more bits to encode the difficult parts and less for the easy parts. This is a type of Variable Bit Rate (VBR) encoding.
Transition - A way of joining two parts of video together smoothly.
Jump Transition - The most common type of transition, where one clip simply ends and the next one starts immediately.
Dissolve Transition - When one clip ends and slowly blends into the next clip.
Wipe Transition - When the video from one clip wipes the video from the previous clip off the screen, using some sort of pattern (line, star, circle, etc). This type of transition should be avoided.
Composite - Having two or more clips of video playing at the same time in a video.
Green Screen - Also known as Blue Screen or Chroma Key, filming with this enables the editor to remove the background (since it is all the same color) and put in a different background.

Quiz (Sections 1-3)

1 - What is the most common wide screen aspect ratio?
a) 4:3
b) 16:9
c) 8:6
d) 10:3

2 - What was the most common video aspect ratio before the 1990s?
a) 2:3
b) 4:3
c) 10:5
d) 2:1

3 - What is the most common aspect ratio for professional films?
a) 4:3
b) 10:3
c) 2:6
d) 17:9

4 - Interlacing doubles the number of lines of video that are sent every frame.
a) True
b) False

5 - Interlacing makes digital video harder to compress and larger in size.
a) True
b) False

6 - What frame rate will we prefer to use in this class?
a) 23.976 fps
b) 24 fps
c) 25 fps
d) 29.97 fps
e) 30 fps
f) 48 fps
g) 60 fps

7 - What frame rate will provide the most natural looking picture?
a) 23.976 fps
b) 24 fps
c) 25 fps
d) 29.97 fps
e) 30 fps
f) 48 fps
g) 60 fps

8 - What frame rate will provide the lowest bit-rate
a) 5 fps
b) 24 fps
c) 30 fps
d) 48 fps
c) 60 fps

9 - What pixel format will we prefer to use in this class?
a) YUV 444
b) RGB
c) YUV 422
d) YUV 555

10 - How many bits doe YUV 422 use for each pixel?
a) 4
b) 8
c) 12
d) 16
e) 24
f) 32

11 - What open source, royalty free container format will we prefer to use in this class?
a) Audio Video Interleave (AVI)
c) QuickTime (MOV)
d) Matroska (MKV)

12 - MPEG 4 Containers support progressive downloading, where you can start playing the clip before it has finished downloading.
a) True
b) False

13 - WebM is a open source, royalty free container that is supported natively by several web browsers, for use when putting video in web-pages.
a) True
b) False

14 - Raw 1080p Video (YUV4:2:2, 30fps) uses approximately how much storage per hour?
a) 5 MB
b) 50 MB
c) 500 MB
d) 5 GB
e) 50 GB
f) 500 GB
g) 5 TB

15 - Which codec can usually compress video to the smallest size while keeping the quality of the video high?
a) MPEG 2
b) XviD (MPEG 4 Part 2)
c) H.264 (MPEG 4 Part 10)
d) VP8

16 - When running H.264 with the most agressive settings, it is possible to compress 1080p video down to 2,000kbps (250KB/s) and still have a good quality.
a) True
b) False

17 - Two pass encoding allows the codec to find areas that are hard to compress the first time, then use extra storage space to compress them the second time.
a) True
b) False

18 - For the WebM format, the WebM (a derrivative of Matroska) conainer is used with the VP8 video codec and what audio codec to create an open source, royalty free format for use in web pages?
a) MP3
b) AAC
c) Vorbis
d) WMA

Handbrake Activity

Use Handbrake to re-compress this video file into MP4, H.264, AAC with spanish subtitles. 
Do not submit the final video, rather send: The settings used for audio and video quality/bit-rate, the name of the output file, and the size (in bytes) of the output file.

FFMpeg Activity

Use ffmpeg to re-compress this video file with the MPEG 4 codec at 6000kbps with no audio.
Do not submit the final video, rather, copy and past the output from the two following commands:
ls -l NameOfYourFile
ffmpeg -i NameOfYourFile

Avidemux Activity

Use Avidemux to save (using MPEG4 ASP and MP3 codecs) only the section from this video where the dragon is flying around the tower and grabs the smaller dragon.

Submit the clip of video that you saved.

Kdenlive Activity

Edit the videos we took from Montero together to form an introduction to the city. Add title slides where necessary. At the end provide credits (filmed by Thomas Kent and Ana Beatriz Beltran Leon) and a license for your film.

Render the file and show to the professor for grading.

Screen Grab Activity

Record a video of yourself opening one of the games from the applications menu and playing it. As you do each step, explain what you are doing. The video should be approximately thirty seconds in length.

Submit your Ogg/Theora Video file.

Final Activity - Video Tutorial Creation

For the final activity of the video section, you will be creating a video tutorial of one of the previous sections, editing it, and uploading it to YouTube. Pick from the following list of activities/tools we have learned in this class, and walk through using the tool explaining what you are doing as you do it.

Gimp: rotate, crop, and resize
Gimp: remove redeye
Gimp: select an object to remove from the background
Gimp: use layers to add an object behind another object
Gimp: use the curves dialog to lighten one picture and darken another
Gimp: fix facial blemishes using the heal and smudge tools
Inkscape: create all the basic shapes
Inkscape: demonstrate beizer curves
Inkscape: explain z-order and selection
Inkscape: make text follow a path
Dia: create a basic flowchart
Audacity: record Audio
Audacity: cut and add silence to tracks
Audacity: align multiple tracks
Audacity: remove background noise from a track
Audacity: add amplification and fade in/out a track
Handbrake: converting a video
FFMpeg: converting a video
Avidemux: clipping a section out of a video
Kdenlive: adding videos to the project and the timeline
Kdenlive: using the clip monitor to add a portion of a video to the timeline
Kdenlive: using the dissolve and fade transitions
Kdenlive: compositing multiple videos on the screen

Once you have recorded all your clips in the desktop recorder, use Kdenlive to edit them together into one video. Finally add a title at the beginning of the video with an introduction to your tutorial and another at the end giving yourself credit as well as providing attribution for any other works (images, audio, etc) you have incorporated into your video and a license for your work.

When your video is complete, render it in a format that is suitable for uploading to YouTube and write down all the other information for youtube (title, description, tags, etc). 

Submit your information with this assignment and work with the teacher to upload your video to YouTube.

PiTiVi - Ubuntu standard, not as full-featured
Cinelera - Very full featured, complicated to use
K9copy - Great for making images of DVDs
Kino - Useful for working with DV cameras


Blue Sky, Taurus Media Technik, http://media.xiph.org/video/derf/, Public Domain
Riverbed, Taurus Media Technik, http://media.xiph.org/video/derf/, Public Domain
Sintel Trailer, The Durian Open Movie Project, http://media.xiph.org/sintel/, CC-BY