File Formats and CODECs

It would not be possible to send an uncompressed video signal over a TV cable or to store it on even a BluRay disk. The data has to be compressed by removing details too small to be seen or duplicate data from the parts of the image that don’t change over time.

New compression techniques are constantly being created, but very few of them have received any wide use. Today there are only two compression techniques that really matter.

Broadcast Network TV uses the same MPEG 2 standard that first came out with DVD movie disks. This standard is as old as the first DVD and represents the state of the art 20 years ago.

When Apple began to develop its portable media devices (iPod, iPad, iPhone) it selected the newest standards for audio (AAC) and video (AVC or H.264). These also became the standard for other tables and for many BluRay movie disks.

As a result, if you record Broadcast TV from an antenna or cable, then you have to recompress it in AVC/H.264 before loading the file onto your iPad or Android tablet, although laptop or desktop computers can display either format.

Although there are standards for audio and video compression, there are many tuning options that can produce either a better picture or reduced file size. Software and hardware that decode these files may be well debugged for certain combinations of options, but may occasionally encounter bugs that freeze the screen or produce jumpy playback for certain combinations of options.

Video data has to be combined with audio streams. Broadcast TV often has both English and Spanish language audio, and closed caption data. DVD or BluRay disks may have a movie with 5 different foreign language audio streams. There is no single universal file format to combine video, audio, subtitles, menus, and special features. So both MPEG 2 and more modern AVC data can end up distributed in various packaging file formats for TV, DVD, BluRay, and iTunes distribution. Streaming media (Netflix, Amazon) use other formats to protect data from copying.

MPEG 2

MPEG 2 first appeared as the format of DVD movie disks. Personal computers became fast enough to be able to play MPEG 2 files around 1998. MPEG 2 provides a standard format for video and multiple audio streams, but there are still a large number of file names and formats in use. On a DVD the MPEG 2 files have an extension of VOB, while on computer disks the more common file types are .mpg for 2048 byte packets or .ts for 188 byte packets. Windows Medial Center records MPEG files with a .wtv extension.

AVC/H.264

AVC is a nickname for what is called H.264 in international telecommunications or “MPEG 4 Part 10” in the Motion Picture community. The most common file format and extension is the .mp4 file type, although since the Apple iTunes store is a common source of files in this format there are a lot of .m4v files with this type of encoding. On BluRay disks the .m2ts file extension is used, but while BluRay files are frequently encoded in AVC they may also use other encoding formats. In partcular, the Microsoft VC1 format is also supported by BluRay and is “equivalent” in terms of file size and quality to AVC (at least as far as most consumers care about such things).

The Furture is not Here

There is a new standard on paper called HEVC or H.265. Unfortunately there is no hardware and very little software support for it. It is of no practical use now but may become important after several years.

Recoding

There are some bad programs that claim to do the job easily. Some will hang in the middle of a batch of files, and some will generate files with an audio synchronization problem where someone’s lips move and then a few seconds later you hear them speak. Even a good signal or cable program can result in an occasional packet loss, and some programs glitch when they encounter a break in the audio or video stream. Some programs just screw up even good data.

I recommend two programs that are completely reliable:

Handbrake is a free open source program that can encode anything, but is particularly good at converting the movies on your purchased DVD or Blu-Ray disks to a file you can play on your tablet. Handbrake requires a tool like Slysoft AnyDVDHD that permits access to encrypted disks. It has no editing capability. Simply mount the disk, select it from the source pulldown menu, choose a “title” (the movie is the title that runs for a few hours, the titles that run for 10 minutes are special features or deleted scenes), choose an audio track, and if you need to choose a subtitle.

VideoReDo TVSuite H.264 is a purchased program that costs close to $100. In exchange for spending real money, this program will correct the occasional dropped packet and other minor errors that occur when you record data off antenna or cable sources. It uses the MainConcept commercial encoder software rather than open source. You have confidence that minor errors do not screw up the synchronization of audio and video streams. It also has an easy to use editor to trim out the parts of programs that you do not want to keep. There is an available free background utility called VAP that can monitor the Recorded TV folder generated by Windows Media Center and every time a recording ends it will call VideoReDo to fix any errors in the stream, edit out some sections, and convert the file to AVC/H.264 in a format suitable for your tablet.