VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Hello,

    I have been told that containers do not reflect the files that are in the containers.

    I don't understand the difference between a container and the actual file.

    For example, mp4 and flv and both containers (evidently). I thought that they were the actuall files.

    Can someone explain the significance of containers and the files within.

    My understanding is so poor, I can hardly construct the question.
    Quote Quote  
  2. Container = a box, with a label of enclosed contents.
    Codecs (streams actually) = contents of the box.

    The container is the file; the video, audio, subtitles etc are streams inside the file.
    The container tell the player what codecs (software programs) to load.
    Codecs actually read the streams and send uncompressed data to the player.
    Quote Quote  
  3. The "container" is the logical arrangement of what's contained. In the case of A/V files the container is the file type. Ie, an FLV file is audio and video in an FLV container. Unless the file is named incorrectly. You can rename an FLV file with .MKV as the extension. The data within the file is still arranged as specified by the FLV spec. Any program that tries to interpret the data as MKV will fail. Media players usually don't use the extension to determine what's in the file. They look through the file for structures that identify the container. For example, the first 3 bytes of an FLV container is are always "FLV", the first four bytes of a WAV and AVI containers are always "RIFF", etc.
    Last edited by jagabo; 7th May 2017 at 11:00.
    Quote Quote  
  4. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    To expand on what jagabo states, I have on my system a 'flv' file which contains an AVC, probably h264, video stream and an mp4 file which also has an AVC stream.

    One could rename this .flv to .mp4 but some players may refuse to play it. VlC will play it regardless.
    Quote Quote  
  5. Originally Posted by jagabo View Post
    The "container" is the logical arrangement of what's contained. In the case of A/V files the container is the file type. Ie, an FLV file is audio and video in an FLV container. Unless the file is named incorrectly. You can rename an FLV file with .MKV as the extension. The data within the file is still arranged as specified by the FLV spec. Any program that tries to interpret the data as MKV will fail. Media players usually don't use the extension to determine what's in the file. They look through the file for structures that identify the container. For example, the first 3 bytes of an FLV container is are always "FLV", the first four bytes of a WAV and AVI containers are always "RIFF", etc.
    Why do people talk of containers. Why not say this is an mp4 encoded video, etc.
    Quote Quote  
  6. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    ^^ That's easy.

    'encoded' assumes the use of a codec (encoder/decoder). Mp4 is NOT a codec.
    Quote Quote  
  7. Dear Edmund, than you for responding.

    Files are encoded to form a video. What then makes it an mp4, or, say, and flv file?

    I assume that in the 'package' there is the video and audio files - video is encoded, as is audio.
    Quote Quote  
  8. Originally Posted by anon_private View Post
    Files are encoded to form a video. What then makes it an mp4, or, say, and flv file?
    I already told you: it's the logical arrangement of data within the file. In order for a player to play the video and audio it needs to know things like the width and height of the frame, the frame rate, what codecs were used, which data in the file is video and which is audio, etc. When someone creates a container specification the spell out all those details. For example, here's Microsoft's specification for AVI files:

    https://msdn.microsoft.com/en-us/library/windows/desktop/dd318189(v=vs.85).aspx
    Last edited by jagabo; 8th May 2017 at 10:29.
    Quote Quote  
  9. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Originally Posted by anon_private View Post
    Files are encoded to form a video.
    I wonder if you are clear on the concept of "computer file." It's just an ordered sequence of binary numbers. Those numbers could represent anything — a video, an image, a recipe, a song, a word processing document, an application program — depending on how they are interpreted.

    A "codec" is a scheme (and the software that implements it) for representing video or audio in a compact sequence of numbers. A codec creates a "stream" of information that constitutes a coherent, simultaneous unit of sound or vision. These streams go into a "container" — a format for organizing multiple streams and storing additional information about them. The entire structure can then be saved into a computer file with a name and a canonical extension like MP4 or AVI.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!