Video File Formats for Media Servers and Players

Video file formats can get pretty confusing. There are video codecs, video containers, and network speeds to worry about. Let’s see what video file formats there are and how fast your network needs to be to support them.

Video Encoding vs Video Containers

There are two things that you have to deal with when it comes to video files.

  1. The video encoding and compression type, and
  2. the container used for delivery.

Video encoding refers to the way that a video is captured, converted to digital media, and compressed. The conversion to a compressed video file is done using and algorithm called a codec. Each encoding type uses a different codec.

Once the video is compressed, it is written to a file with other information such as subtitles. The file that is created is a container.

Video Compression and Codecs

When a video is captured and compressed there is always some loss of quality. But video files need to be compressed in order to keep the size reasonable. Compressed files need to be decompressed before being viewed. Decompression is done on the fly by the video player. Video players have processors or special decompression hardware to do the job.

Compression is a compromise between file size which requires more and cost of the player hardware. It’s also a balance of larger less compressed files of better quality or smaller files of lower quality.

The most common video codecs today are h.264, also known as MPEG-4 AVC, and simply MPEG-4, DivX, and Windows Media Video. Videos that are encoded with these codecs are put in container files with extensions that are more familiar.

Just as there are video codecs, there are also audio codecs. One that everyone is familiar with is MP3. Others include PCM, AC-3, and AAC.

Video Containers

Containers are, as the name suggests, a file that holds many different things besides the compressed video. It may contain subtitles, alternate sound tracks, frame rate, chapter information, meta information such as actors and directors, poster image, …

The most common video container on the Internet is the .mkv container. Other popular containers are .avi, .divx, .flv, .mpeg, .mp4, .mov, .wma, .vob, and .wmv.

The table below shows the audio and video codecs supported in each container file type.

File Type Video formats Audio formats
.wma, .wmv Almost anything Almost anything
.avi Almost anything Almost anything
.divx MPEG-4 MP3, PCM, AC-3
.flv H.264/MPEG-4 AVC MP3, Linear PCM,AAC
.mkv Virtually anything Virtually anything
.mp4 H.264/MPEG-4 AVC MPEG-2/4 AAC, MP3, AC-3
.mpg, .mpeg MPEG-1, MPEG-2 MPEG-1
.mov depends on Quick player depends on Quick player

 

You can download mkvtoolnix to peek inside video files and see exactly what video and audio encoding is used in that container, frame rates, and other interesting information.

video file format and containers
[clearboth]

Network Resources

Larger files generally have better quality (resolution). Frame rates also affect quality and so does compression. As you increase frame rate and resolution and decrease the compression each frame video file gets larger. Given the same frame rate, a hi-res movie with a large file will send much more data over the network than the same movie in a smaller low-resolution format. More data is sent over the network each second and the network load is higher. This means that the network needs to be able to handle higher speeds.

For example, a hi-res (1920×1080) video with a frame rate of 30 frames per second will use up as much as 30 Mbps of your network. Other codecs such as MVC (used for 3D movies) can use up as much as 60Mbps at 30 fps. For more information on media types and network load see How To: Build a High Speed Home Media Network.

If you run speed tests on your home network such as How To: Home Media Network Speed Check, you will see that, over a WiFi network, you may have that much speed available but, as I suggest, you really need to have more than double that amount to have video that’s steady and doesn’t freeze or glitch. A steady 60 Mbps is a bit hard to get on most WiFi if there is some distance between the access point and the media player. It’s next to impossible to get enough for MVC playback which would work out to be 120 Mbps.

If you have those kinds of load you should consider 802.11ac WiFi as shown in this post or use Powerline Ethernet extenders as in this article How to Use PowerLine Devices to Extend Your Home Network. Or you could always move your media server next to the media player and connect them with a Gigabit hub and Ethernet cables.

DLNA

One problem is that you can’t tell what type of video or audio codec from the file type. And the DLNA standard doesn’t go very far in defining which formats are supported for the server or for the player. Fortunately UPnP takes care of part of the problem by having the player tell the server the file types that it can play and relies on the server to transcribe files that the player does not support to one that it does.

Summary
Article Name
Video File Formats for Media Servers and Players
Author
Description
Video files can be of many different codecs and containers. Learn what codecs and containers are; how much bandwidth your home network has to have to support video streaming between a DLNA media server and the media player.
Digiprove sealCopyright secured by Digiprove © 2013

Leave a Reply

Your email address will not be published. Required fields are marked *