Sunday, 5 February 2012

I, P and B Frames

There are three types of pictures (or frames) used in video compression: I‑frames, P‑frames, and B‑frames.

An I‑frame is an 'Intra-coded picture', in effect a fully specified picture, like a conventional static image file. P‑frames and B‑frames hold only part of the image information, so they need less space to store than an I‑frame, and thus improve video compression rates.

A P‑frame ('Predicted picture') holds only the changes in the image from the previous frame. For example, in a scene where a car moves across a stationary background, only the car's movements need to be encoded. The encoder does not need to store the unchanging background pixels in the P‑frame, thus saving space. P‑frames are also known as delta‑frames.

A B‑frame ('Bi-predictive picture') saves even more space by using differences between the current frame and both the preceding and following frames to specify its content.



http://en.wikipedia.org/wiki/Video_compression_picture_types

Thursday, 2 February 2012

Compression

Data compression is the process of encoding information to reduce the number of bits as compared to the uncompressed version of the information. A compression process will reduce the disk space required to store the information, and bandwidth required to transmit information.
          Compression can be lossless or lossy. Video Compression used in security applications is lossy compression, meaning once the original video information is compressed it can never be decompressed to restore all of the original information. In lossy compression, if information is compressed then decompressed then recompressed and so on, more and more information will be lost with each successive compression.
Video information lends itself well to lossy compression techniques. The reason being, there is a significant amount of data the human eye does not perceive in the uncompressed version of the video or image. Image and video compression takes advantage of this fact.
          Specifically the human visual system perceives brightness more readily than color. If you have ever compared LCD televisions, you may have noticed displays with higher contrast ratios look better. The contrast ratio is the difference from the brightest white to the darkest black that can be displayed on the set. Since our visual system perceives differences in brightness more than color the effect is a more appealing display, which is the same effect JPEG compression takes advantage of.


Lossy and Lossless

Lossless and lossy compression are terms that describe whether or not, in the compression of a file, all original data can be recovered when the file is uncompressed. With lossless compression, every single bit of data that was originally in the file remains after the file is uncompressed. All of the information is completely restored. This is generally the technique of choice for text or spreadsheet files, where losing words or financial data could pose a problem. The Graphics Interchange File (GIF) is an image format used on the Web that provides lossless compression.
          On the other hand, lossy compression reduces a file by permanently eliminating certain information, especially redundant information. When the file is uncompressed, only a part of the original information is still there (although the user may not notice it). Lossy compression is generally used for video and sound, where a certain amount of information loss will not be detected by most users.

http://www.salientsys.com/files/whitepaper/Understanding%20H%20264.pdf

http://www.google.co.uk/#hl=en&q=video+compression&tbs=dfn:1&tbo=u&sa
=X&ei=SMArT4LAI4Lq8QO2wcThDg&ved=0CC0QkQ4&bav=on.2,or.r_gc.
r_pw.,cf.osb&fp=47ed5b9489390682&biw=1440&bih=705

http://searchcio-midmarket.techtarget.com/definition/lossless-and-lossy-compression

Interlace and De-Interlace

Interlace: A common way to compress video is to interlace it. Each frame of an interlaced video signal shows every other horizontal line of the image. As the frames are projected on the screen, the video signal alternates between showing even and odd lines. When this is done fast enough, i.e. around 60 frames per second, the video image looks smooth to the human eye.
          Interlacing has been used for decades in analog television broadcasts that are based on the NTSC (U.S.) and PAL (Europe) formats. Because only half the image is sent with each frame, interlaced video uses roughly half the bandwidth than it would sending the entire picture.

  Interlaced video frame consists of two sub-fields taken in sequence, each sequentially scanned at odd and even lines of the image sensor; analog television employed this technique because it allowed for less transmission bandwidth and further eliminated the perceived flicker that a similar frame rate would give using progressive scan. CRT based displays were able to display interlaced video correctly due to its complete analogue nature. All of the newer displays are inherently digital in that the display comprises discrete pixels. Consequently the two fields need to be combined into a single frame, which leads to various visual defects which the deinterlacing process should try to minimise.

Deinterlacing is the process of converting interlaced video, such as common analog television signals or 1080i format HDTV signals, into a non-interlaced form.
      

Wednesday, 1 February 2012

Second Video

I have now completed my second parkour video using a different style of music to the first. The feel of the piece has dramatically changed just by a simple music change and a re-arrange of the clips used.

Tuesday, 31 January 2012

H264


From Wikipedia:()

(H.264/MPEG-4 Part 10 or AVC (Advanced Video Coding) is a standard for
video compression, and is currently one of the most commonly used formats for the recording, compression, and distribution of high definition video.

 H.264 is perhaps best known as being one of the
codec standards for Blu-ray Discs; all Blu-ray Disc players must be able to decode H.264. It is also widely used by streaming internet sources, such as videos from Vimeo, YouTube, and the iTunes Store, web software such as the Adobe Flash Player and Microsoft Silverlight, broadcast services for DVB-S2 and SBTVD, HDTV direct-broadcast satellite television services, HDTV cable television services, and real-time videoconferencing. Digital Video Broadcasting for Satellite DVB-S, Cable DVB-C, and terrestrial broadcasting DVB-T use MPEG-2.)

True compression and IFrame

The main difference with video compression vs. still image compression is the reduction of Temporal Redundancies. Temporal Redundancies are the similarities between images. A significant amount of storage and bandwidth, or bitrate, can be saved by not retransmitting the macro blocks which don’t change from frame to frame.
        In a security application this can refer to the background of the image. Many cameras in a video security deployment are fixed cameras. The only thing changing in the camera’s field of view are vehicles passing, people walking etc. The majority of the scene from image to image is the same information (the background). True video compression techniques, like MPEG4 part 2 & H.264, take advantage of this fact and only transmit the background periodically. The result is a video stream composed of a reference frame, called an I Frame, and then changing areas of the image are transmitted and overlaid on the original reference frame to create the current image of the scene The frames with changes are referred to as P or B frames.
        An I Frame followed by a series of P and B frames is referred to as a Group of Pictures or GOP The number of frames from one I frame to the next I frame in the stream is referred to as the GOV Length.

What is streaming

Streaming : When a file is streamed, it is broken into a series of tiny packets that are then reassembled by the player in the correct order. The advantage of creating all these tiny pieces is that the pieces download more quickly and can be played before the file is entirely downloaded. For a very large file (which most video files are), this is really the only way to avoid huge delays while waiting for a download.
         Streaming takes place while you are watching this first part of a video, the server will continue to send over the rest of the video file in the "background" - so you don't have to wait until the whole video has finished transferring before you can start watching.

Progressive download

Delivery of a file over HTTP is normally referred to as ‘progressive download’ or ‘http streaming’. In reality, it is not streaming at all but a very simple bulk download of a video file to the end user’s computer. A temporary copy of the video file is then stored on the local computer so that the viewer can watch the file over and over without having to download the file each time.
          Let’s assume you have a video file encoded at 500kbps. The server delivering the file does not know or care that your video file is encoded at 500kbps; it simply pushes data to the host machine as quickly as it can. This can sometimes give the illusion that the file is being streamed because playback can start as soon as enough of the file is available on the local machine. This obviously restricts the users from skipping to parts of the file that have not yet been downloaded.


Advantages of Streaming

1. You can begin video playback at any point of the video, or skip through the video as you see fit. This is very convenient for users.

2. It makes a lot more efficient use of bandwidth as you are only using bandwidth for part of the video that are actually watched as opposed to HTTP delivery where the whole file gets delivered.

3. The video file is not stored on the viewer’s computer – the video data is played and then discarded by the media player. This lets you maintain more control over your content.

Disadvantages of Streaming
    1. High cost of server software.

    2. Sound quality and stream may be affected by low speed or inconsistent Internet connections.

    3. Requires a preconfigured server

Research into Streaming

Websites looked at:

http://blog.mydeo.com/2009/01/12/streaming-vs-progressive-download-understanding-the-difference/

http://www.digital-web.com/articles/efficient_video_delivery_over_the_internet/

http://www.j-learning.org/present_it/page/delivering_video_online/

http://www.upenn.edu/video/pvp/streams.html

http://camstudio.org/streaming-video-resources/what-is-streaming-video.htm

http://www.streamingmedia.com/Articles/Editorial/What-Is-.../What-is-Streaming-74052.aspx

http://www.wimpyplayer.com/docs/faqs/docs/general_streaming_definition.html

http://www.calsoftlabs.com/whitepapers/streaming-video-technology.html

http://www.100fps.com/