Blender, graphic, software, open source, Linux LibreOffice, open source, openoffice Gimp, graphic, software, open source, Linux kernel, Linux, software, open source Linux, distributions, Ubuntu, Linux Mint, Fedora, Mandriva Jamin, gpl, library, open source matroska, multimedia, container, linux pcman, file manager, linux LuninuX, distribition, Linux, open source Linux, infographic, history

Monday, January 14, 2013

The Matroska Multimedia Container is a audiovisual file format that can wrap an unlimited number of video, audio, still picture, and/or subtitle tracks.

Matroska-logo-128x128The 'Matroska Multimedia Container' is an open standard free container format, a file format that can hold an unlimited number of video, audio, picture, or subtitle tracks in one file.

It is intended to serve as a universal format for storing common multimedia content, like movies or TV shows. Matroska is similar in concept to other containers like AVI, MP4, or Advanced Systems Format (ASF), but is entirely open in specification, with implementations consisting mostly of open source software.

Matroska file extensions are .MKV for video (with subtitles and audio), .MK3D for stereoscopic video, .MKA for audio-only files, and .MKS for subtitles only.

The name "Matroska" is derived from the Russian word Matryoshka which means nesting doll (the common Russian cylindrical-shaped doll within a doll, also known as a babushka doll).

This is a play on the container (media within a form of media/doll within a doll) aspect of the matryoshka as it is a container for visual and audio data.

The loose transliteration may be confusing to Russian speakers, as the Russian word matroska (Russian: матроска) actually refers to a sailor suit.

The project was announced on 6 December 2002 as a fork of the Multimedia Container Format (MCF), after disagreements between MCF lead developer Lasse Kärkkäinen and soon-to-be Matroska founder Steve Lhomme about the use of the Extensible Binary Meta Language (EBML) instead of a binary format.[citation needed] This coincided with a long coding break by the MCF's lead developer, during which most of the community quickly migrated to the new project.

In 2010, it was announced that the WebM audio/video format would be based on a profile of the Matroska container format together with VP8 video and Vorbis audio.

The use of EBML allows extension for future format changes. The Matroska team have openly expressed some of their long term goals on Doom9.org and hydrogenaudio.org.

Thus, the following are "goals", not necessarily existing features, of Matroska:

    creating a modern, flexible, extensible, cross-platform multimedia container format
    developing robust streaming support
    developing a menu system similar to that of DVDs based on EBML
    developing a set of tools for the creation and editing of Matroska files
    developing libraries that can be used to allow developers to add Matroska support to their applications
    working with hardware manufacturers to include Matroska support in embedded multimedia devices
    working to provide native Matroska support in various operating systems and hardware platforms
matroska-pack-full-1
F.A.Q.:
Q: What is matroska? I dont understand what a 'container format' is at all, is it a player, or a audio/video compression format ?
A: Whenever you play a movie it includes at least one video stream and one audio stream. Since its not practicle to have 2 files to play Audio/Video, you pack both into a single file by using a so-called container format file. This container and the software coming with it take care of a lot of important functions, like the correct timing of the audio and video playback when the file is played ( opened ). ZIP or RAR could be a perfect container to pack one or more audio/video streams together into one single file for distribution, but WinZIP certainly wouldnt care about the correct timing of the these streams on playback ... Known containers are the good old AVI, or the MPEG container ( .mpg , .mpeg ), Quicktime ( .mov ), Realmedia ( .rm ), MP4 ( .mp4 ), etc.


Matroska is an opensource alternative to all of them, and is able to offer a lot of features that others dont have have.

Q: What are the advantages of matroska compared to AVI ?
A: The AVI container was originally introduced by Microsoft in the early 90s, and was designed as a very flexible A/V container format for the video and audio compression formats of those days. It is necessary to understand that AVI is only one ( but important ) part of a complete multimedia framework called 'Video For Windows' ( VfW ), offering programmers not only a container but also a complete set of API commands to be able to program their own video and audio codecs, using either the VfW or the ACM interface ( this was back from the days when Microsoft was still dedicated to sell their operating systems to people, instead of multimedia solutions as they are trying to do today with WMV, so they had to make their OS attractive to other programmers ).
Unfortunately this VfW framework cannot support many of the more advanced features that modern audio and video compression formats will offer, such as Variable Bitrate audio encoding ( VBR ), or Variable Framerate video encoding ( VFR ). Although AVI was extended with an additional standard called 'Open DML AVI' in the mid/late 90s, overcoming most of its very annoying limitations like the 2 GB file size limit, there is still no proper and spec compliant way to support modern compression formats like the excellent, opensource Ogg Vorbis audio compression format.
Matroska has overcome all those limitations and can support all known audio and video compression formats by design. To make sure it will also be capable of coping with the future standards it is based on a very flexible underlying framework called EBML, allowing to add more functionalities to the container format without breaking backwards compatibility with older softwares and files.

Q: What file extensions does Matroska use?
A: We currently have 4 different extensions specified :

  • .mkv : Used for Video files, as well those containing audio (movies) or video only
  • .mka : Used for audio only files, can contain any supported audio compresion format, such as MP2, MP3, Vorbis, AAC, AC3, DTS, or PCM
  • .mk3d : For files with stereoscopic (3D) video
  • .mks :Used for Subtitles that an 'elementary' matroska stream
matroska1 
-->

Q: How can i create Matroska files ?
A: You can reencode an existing source with FFmpeg or the more user friendly Handbrake. You can also 'transmux' an existing AVI, MP4 or TS file. This option is a lossless process, all the audio and video data in the source file will be read from it, and packed into a matroska file in a spec compliant way, but basically stay unaltered to avoid any degradation of quality. There are currently 2 different tools to do this ( look here for the announcement of their latest versions ), but the list keeps on growing.
Moritz Bunku's mkvmerger is a command line based matroska muxer that can be run on Windows, Linux and OS X. It also does accept AVI and OGM on its input, as well as AC3, AAC, Vorbis, DTS, MP3, MP2 and PCM audio.
In VirtuldubMod ( starting from 1.5.1.1a ) all you have to do is to open your AVI or OGM file, set 'video' to 'direct stream copy', goto 'file' 'save as ...' and select '.mkv' from the file type dropdown list and rename it. Of course, this doesnt make much sense if you dont have any plans to add something to the file that AVI or OGM cannot support, like adding another audio track in an unsupported audio compression format.
From VirtualdubMod you can also directly encode into .mkv files from any source that it can open, and using every available VfW and ACM codecs, even in 2 pass mode.


Q: How can i play Matroska files on my PC ?
A: On the download page you will always find the link to the very latest DirectShow parser filter, that way you will be able to play your .mkv files on a DirectShow based player such as Windows Mediaplayer. For Linux PCs, as well as for MacOSX and the X-Box emulation you have to get the newest version of VLC or mplayer. On OS X you can also install Perian which will add Matroska support in Quicktime.


Q: What is the advantage of using the .mka file instead of the original audio formats, like mp2, mp3 etc?
A: You can embed lyrics or transcriptions (e.g. from srt subtitles) in the audio file. You can use chapters to separate parts of a track or a live album. In some case (MP3, AC3, DTS) the Matroska file may also be smaller than the original with much better/cleaner seeking support.
Here are some reasons that placing audio in MKA is useful:
1. The tags will be the same no matter what audio format you use. That means that if you write a program to read back tags, it only has to read them from one type of tagging system, no matter what type of audio is being used.
2. All tracks to a CD can be in a single file. You have the option of dividing the tracks into seperate Tracks, or seperate Chapters. You could make your own compilation in a single file, even using different audio formats, such as MP3 and Vorbis.
3. If you write a program to read audio of of MKA, then you don't need to understand how the framing works in the different formats because it is already done for you in Matroska.
4. It is easy to delete portions of the audio without reencoding because you just throw away those blocks. You don't even have to be able to play that format back, you could edit by just knowing timecodes.
5. Detecting differences between two audio streams would be easy because you could store both in a single file, start playback, and then just switch between tracks.
6. If you intend to combine the audio with video, then having is in MKA means you can merge it with an MKV, even if the application doesn't support the audio type.
7. In the case of MP3, MP2 AC3 and even some AAC, using "compressed headers" the MKA file may even be smaller than the original "raw" file, without losing any bit of information.

Q: Will my .mkv files be compatible with future Matroska software if i will use current tools to mux my files?
A: The files being created now are spec compliant.

Q: Will there be a perfomance hit for storing audio/video in Matroska?
A: No, even though its more complex to read/write MKV than it is AVI you can't tell a difference when reading back a file from AVI or MKV on today's processors, even on smartphones ( see CorePlayer ).

matroska2

Q: What makes Matroska better (worse?) than an ogg media container (.ogm)?
A: It's less a matter of better/worse, and more a matter of different. This is a little complex but we will try to explain.
First Ogg is not the same thing as Ogm. Ogg is an RFC spec now, and is very useful for what it was designed for, streaming over lossy links, and Ogm is an implementation of Ogg placing other 'things' inside.
So, we have:
Ogg
1. Designed for "lossy"streaming (over UDP).
2. Designed to hold Vorbis and other Xiph-supported audio & video codecs.
3. Well documented for above two purposes.
Ogm
1. Implementation of Ogg to hold video, other audio codecs, and a type of subtitle.
2. Implements Chapter support.
Matroska
1. Designed to hold any type of codec. (Audio, Video, Subtitle, etc)
2. Designed for editability.
3. Purposely flexible design.
4. Well documented portions, others in process.
5. Initial design is to support presentation container features such as Chapters, Tags, AudioGain, Menus, etc.
Will Matroska be streamable? Yes, but low bitrate streaming like streaming Vorbis, will always be better in Ogg. This is because their design is for different purposes.
matroska3
Downloads.
How To Synchronize Audio in a Matroska (MKV) media file container.
    When one views MKV files, sometimes the audio can be "out of sync" with the video. This post supplies easy to follow instructions on how to inspect the problem, and repair your media file.

    The following instructions use "variables" as we learn data for future reference in the format of MY_VARIABLE_NAME.
    How to synchronize audio and video in a Matroska (MKV) media file container
    Phase 0: Inspection:
    Tools Required: mkvinfo, mkvmerge, vlc
    1) Identify the file:
    - What is the file we're having problems with?
    EXAMPLE: MKV_FILE_NAME="MyVideo.mkv"
    2) Identify the problem:
    - Is the audio delayed, or ahead, and by how much time? (ms)
    We can use vlc media player to dynamically figure it out:
    VLC can increase or decrease the audio delay on the fly using keyboard shortcuts "j" and "k".
        "j" -> moves audio ahead (anti-delay)
        "k" -> moves audio behind (increase delay)

    Play with this until you're satisfied, and note the value.
    EXAMPLE: AUDIO_SHIFT=-300ms
    i.e. The audio was 300ms behind.
    3) Discover the Audio and Video Tracks:
    - MKV is a container, it will have one or more audio/video tracks within it. To discover them, run:
    Code:
    $ mkvmerge -i $MKV_FILE_NAME
    Code:
    $ mkvmerge -i MyVideo.mkv
    File 'MyVideo.mkv': container: Matroska
    Track ID 1: video (V_MPEG4/ISO/AVC)
    Track ID 2: audio (A_AC3)

    WARNING: Ensure that the audio/video tracks noted here matchthose from step (2) previous.
    EXAMPLE: AUDIO_TRACK_ID=2
    Phase 1: Adjust Audio Timecodes
    Tools Required: mkvmerge
    1) Perform the audio sync shift
    Code:
    $ mkvmerge -o ${MKV_FILE_NAME}_FIXED.mkv -y $AUDIO_TRACK_ID:$AUDIO_SHIFT $MKV_FILE_NAME
    Code:
    $ mkvmerge -o MyVideo_FIXED.mkv -y 2:-300 MyVideo.mkv
    mkvmerge v4.5.0 ('Speed of Light') built on Feb 23 2011 00:12:51
    'MyVideo.mkv': Using the Matroska demultiplexer.
    'MyVideo.mkv' track 1: Using the MPEG-4 part 10 (AVC) video output module.
    'MyVideo.mkv' track 2: Using the AC3 output module.
    The file 'MyVideo_FIXED.mkv' has been opened for writing.
    Progress: 100%
    The cue entries (the index) are being written...
    Muxing took 70 seconds.
    Phase 2: Enjoy Synchronized Audio and Video
    1) Play the MyVideo_FIXED.mkv file in your media player of choice and enjoy the synchronized audio.
matroska4
verbiste-5-tolerant

Custom Search
 
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:

No comments:

Recent Posts

Linux News

My Blog List

BlogESfera Directorio de Blogs Hispanos - Agrega tu Blog Add to Technorati Favorites BlogItalia.it - La directory italiana dei blog Il Bloggatore Find the best blogs at Blogs.com. AddThis Social Bookmark Button page counter Mi Ping en TotalPing.com