File formats

From Digisaster
Jump to: navigation, search

Back

Supported video file formats

DP-1500 DP-1504 DP-500 DP-508 DP-1100 DP-558 VR-558 DP-600 DP-1600
.vob

MPEG-2

Search and fast forward/rewind requires a .idx file of same name.
.mpg

MPEG-1 MPEG-2

MPEG files doesn't work from KML. Search and fast forward/rewind won't work Search and fast forward/rewind won't work
.avi

XviD

Max 720x576 pixels.

Do not use quarter pixel motion estimation (QPel) or Global Motion Compensation (gmc)

Do not use Global Motion Compensation for XviD (gmc) Do not use Global Motion Compensation for XviD (gmc)

Max height is 1064 pixels.

.avi

DivX

Max 720x576 pixels.

Do not use quarter pixel motion estimation (QPel)

XviD seems slightly better for resolutions above 720x576 Do not use Global Motion Compensation for XviD (gmc)

Max height is 704 pixels.

.avi x264 No No No Yes
.mp4 x264 No No No Yes
.mp4

Nero

No Don't use any profiles above "Nero Standard Profile" and keep resolution at maximum 720x576 px. Don't use any profiles above "Nero Cinema Profile"
.mkv No No No No
.ogm No No No No
.mov

Apple QuickTime

No No No No
.divx

DivX 6.5.1 H.263

? Yes Yes Yes
.txt

Subtitle

? Yes Yes Yes
.sub

Subtitle

? Yes Yes Yes
.srt

Subtitle

? Yes Yes Yes
.wmv

ASF

? ? ? ?


Sound in video files:

You can only use AC3 or MP3 audio (Lame and the Fraunhofer encoders give the best MP3 quality)

With .avi files; use constant bitrate (CBR) only, (VBR) is not supported and will cause errors. AC3 gives less problems with synchronization when editing files. If you are ripping from DVD, this is the only format that contain surround channels.


The best format:

The player clearly works best with the format that it records in: .vob files with MPEG2 video, AC3 sound and a separate .idx file for indexing. Not many video editing programs are able to output a single working video vob file in that format, and you have to use a tool, called "IdxGenerator" that can be found at the MPCClub site, to generate the index file.

But MPEG2 takes up a lot of space, limiting the storage to about 50 movies on a 300GB HD. So you need to use more compression to have a larger movie library stored on the device. With H.263 you can increase library to up to 300 movies. Then it begins to become useful.

XviD is apparently slightly better at high resolutions, so the recommendation must be to use:

.avi files, with XviD, H.263 codec for video, AC3, CBR for audio

Supported audio file formats

DP-1500 DP-1504 DP-500 DP-508 DP-1100 DP-558 VR-558 DP-600 DP-1600
.mp3 MPEG1 layer 3 Yes Yes Yes Yes
.ogg Ogg-Vorbis Yes Yes Yes Yes
.mp2 MPEG1 layer 2 ? Yes ? ?
.ac3 Yes Yes ? ?
.wma Yes Yes ? ?
.pls SHOUTcast/Winamp playlist Yes Yes Yes Yes
.wav ? No ? ?
.m4a ? No ? ?
.flac ? No ? ?
?


The best format:

MP3 is a very old codec, but widely used. Ogg-Vorbis on the other hand is better at most things. Especially the quality at lower sample rates are much better. And since software that can handle the ogg format are easy to find; the recommendation must be to use ogg For pop music and speech. Since the player can't handle non lossy formats, it is not recommended to use it for storing classical music.


Re-encoding

As a general rule you should not re-encode from one lossy format to an other eg. mp3 to ogg. you will just make it worse. Only encode to a lossy format from a lossless one. Some common examples of lossless formats are: .wav (uncompressed PCM as on a CD) and .flac (a compressed format about half the size of an uncompressed wav)

Video containers

A video container is the term used to describe the structure of a video file. The file extension tell might give a hint of which container format is used, such as .vob and .mpg for mpeg1/2 But other formats can hold multiple formats, like .avi, .mp4 and .mkv. .avi is an old Microsoft format, that is about out of date and has some issues with new codec's. But its still one of the most commonly used. The file can contain video, audio, subtitles, an index and some other informations. The index are used for searching and in the KiSS also for fast forwarding and rewind. The first tree are usually interleaved so you have a bit of video, audio and subtitle in one mixed chunk, and then a new chunk of the same mix and so forth. That way the player don't have to look all over the media (Harddisk/DVD) for the next bit to play and thereby improve the performance and in some cases make it possible to stream the video. The video and audio are kept in different format, that can bee a compressed version of the original and of varying quality. The native formats are MPEG2 for video and AC3 for audio. But it can also play other formats. (see Video file formats table) To interpret the format, the player uses a codec which is a piece of software that knows how to coder and decoder the audio or video into a stream of bytes, that can bee presented to you. This is called uncompressed or raw.

Streaming

Streaming is the ability to watch a movie from the beginning while you are still downloading it. Usually a player downloads some seconds of the movie and then let you start watching it, in the hope that it will bee able to get the rest of the data before you need it. (If it doesn't keep up, you will experience a lot of small breaks in the movie) Its usually a little difficult to fast forward in a streaming video. But the more intelligent players can rewind without problems. Since a movie consists at least of video and audio, the video file has to be packed a certain way to be able to be streamed. It has to bee in an interleaved video container. An example of streaming video is when you use PC-link to watch a video, through the KiSS player, placed on your PC.

Video codec H.263

H.263 is a video compression codec invented for making video conferences over telephone lines way back in the 90's. It is based on previous compression formats such as MPEG1, MPEG2 and H.261. and are used in the mpeg4 formats eg. DivX and XviD.

One of the ways it compress the signal is called Motion estimation and compensation. Imagine a video of a person sitting and talking. It doesn't contain much new information form picture to picture. The background is the same, the person might move a little, especially in the face, but otherwise its basically the same image, repeated over and over again. Therefore with H.263 only the difference is send. So it starts by sending the hole picture called a key or reference frame. Then it sends frames that only contain the difference from the previous frame, which in many cases aren't much. And it continues to do so until the scene changes. After that it compresses the image by way of Discrete Cosine Transform (DCT). The DCT transforms a block of pixel values into a set of "spatial frequency" coefficients, much like a Fourier Transformmation dose for sound. (if you don't understand that don't despair. It just means that there are a pattern in things, that can be expressed with a few numbers; like a frequency, instead of showing the full wave) This means that you only need a few DCT coefficients to recreate a recognizable copy of the original image. This is really tough on your CPU. So when you swear over the time it takes to encode, think of the immense complexity of DCT or make another cup of coffee, depending on your mood :)

The the DCT coefficients are put through “Quantizaion” which is basically multiplying the number by a factor so they become smaller numbers and throwing away some decimals and other less relevant stuff.

Then there is a stage called “Entropy encoding” That is simply put; if you have a series of number that are reoccurring, you just say it once and the say how many times it should be repeated. There are also some vector coding of motion eg. if the camera are panning, you only have to tell how fast and in which direction it is going, not paint a hole new picture. Of cause you have to put in the new stuff and remove what fall out of view. It might bee a little more complicated if you have to code it yourself. But fortunately some caring people have already done that, and put it in a nice codec, for you to enjoy. All this was just in case you where curious as to what is going on in the little "black" box of yours.

Audio codec AC-3

AC-3 (Audio Code number 3) refers to a multichannel (surround sound 5.1) music compression technology developed by Dolby Laboratories. It is basically the same as Dolby Digital Surround EX, and at heigher bitrates as THX. Other terms are used aswell.

AC-3 can carry from 1 to 5.1 channels. It provides five full range channels (3 Hz to 20,000 Hz) in what is sometimes referred to as a "3/2" configuration: three front channels (left, center, and right), plus two surround channels. A sixth bass-only effects channel (3 Hz to 120 Hz), also sometimes called "low frequencies enhancement channel" (LFE) It can also includes information about the room size and differences in dB between the channels levels.

AC-3 uses 32, 44.1 or 48 kHz sample frequencies on up to 20 bits as input.

The AC-3 encoder, like MP3, break the sound wave up in its frequencies components, using somthing like a Fourier Transformmation. each channel is broken up into 256 frequency coefficients (which is a number representing the amplitude of a frequencies) called a "frequency coefficient block" or a signal spectrum. (MP3 uses 32 frequencies)

Then 256 frequency coefficienty block samples are put together into an audio block, for each channel, resulting in a Audio frame. (Audio frame size= 6×256 = 1536)

But instead of sending all coefficients, they are converted to a "spectral envelope", where each frequency amplitude are defined as the difference between this and the previous one, there by saving a lot of bits.

Since the human ear is not supposed to hear more than the most dominant components, smaller components are removed and the numbers quantized and rounded off.

Well that was the very short story. See more at ATSC "Digital Audio Compression (AC-3) Standard"

--Simon Rigét 00:41, 30 March 2007 (CEST)