User Tools

Site Tools


header_com

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
header_com [2012/01/11 16:33]
jhb50
header_com [2012/11/12 02:27]
mjb added links
Line 1: Line 1:
-Some .mkv files have been created with header compression, which prevents their playback on devices that do not support that feature. Unfortunately the list of such devices is long. Removing the header compression will allow those videos to play on those devices. If you receive a message that the "File format is not supported" when playing back a .mkv file, first run MediaInfo which will indicate if the file has header compression and if so follow this process.  +====== MKV header compression ======
  
-Remuxing does not recode the video file, it just recombines and reorganizes the existing video file digital information, changing only the way the digital information is arranged in the file. The bits and bytes that make up the video and audio part of the file are not changed and therefore are not degraded in any way quality of the remuxed file is identical to the original.+If you receive a message that the "File format is not supported" when playing back a .mkv file, it may be because the file was created with **header compression**, which prevents playback on devices that do not support that feature. Unfortunately, the list of such devices is long. 
 + 
 +Serviio can attempt to transcode these files into a different, playable format (if profile.xml has mkvHeaderCompressed="true" in the appropriate Matches element), but transcoding degrades the quality. Instead of relying on Serviio to transcode the file upon playback, you should //remux// the file, creating a new one that has the same video and audio data, just without the compression. 
 + 
 +You can use [[mediainfo|MediaInfo]] to verify whether there is header compression. To remove the compression, you can use mkvmerge. 
 + 
 +===== About remuxing ===== 
 +Remuxing does not re-encode the video or audio data, it just recombines and reorganizes the existing digital information, changing only the way it is arranged in the file. The bits and bytes that make up the video and audio parts of the file are not changed and therefore are not degraded in any way; the quality of the remuxed file is identical to the original.
  
 The demuxing/remuxing process takes less than 30 seconds of computer time per Gigabyte (depending on the speed of your computer). Only slightly longer than the amount of time it takes to make a copy of the original video file. The demuxing/remuxing process takes less than 30 seconds of computer time per Gigabyte (depending on the speed of your computer). Only slightly longer than the amount of time it takes to make a copy of the original video file.
  
-Download and install MKVToolNix:+===== Requirements =====
  
->mkvToolnix - mkvmerge ( http://www.bunkus.org/videotools/mkvtoolnix/ )+You need to download and install MKVToolNix from http://www.bunkus.org/videotools/mkvtoolnix/
  
-Run mkvmerge GUI+This will give you several tools for manipulating MKV files. You'll only be using mkvmerge, which, despite its name, can be used for more than just merging. 
 + 
 +===== GUI method ===== 
 +Run the mkvmerge GUI (mmg or mmg.exe).
  
 Add the MKV file by Drag 'n Dropping into the "Input files" section or by using the "add" button. Add the MKV file by Drag 'n Dropping into the "Input files" section or by using the "add" button.
  
-a. Open the "Extra options" tab. +All video, audio, subtitles (subtitles are actually video tracks), and any other track that will allow "Compression" to be changed, must be changed to "none" to insure that the video will play properly.
-b. Highlight each Track. +
-c. Change the "Compression" dropdown to "none"+
-d. Repeat steps b & c until all tracks are set to "none" (see Notes) +
-Note1: Some tracks do not use this setting and will not allow it to be changed. +
-Note2: All video, audio, subtitles (subtitles are actually video tracks), and any other track that will allow "Compression" to be changed, must be changed to "none" to insure that the video will play properly.+
  
-a.In the "Output Location" box enter the path and file name for the final MKV file, use the browse button to save to a different folder or use the default location and file name (do not attempt to overwrite the original file). +  - Open the "Extra options" tab. 
- +  - Highlight each Track. 
-b.) Click "Start muxing" to remux and save the new MKV file.+  - Change the "Compression" dropdown to "none", if possible. Some tracks do not use this setting and will not allow it to be changed. 
 +  - Repeat steps 2 & 3 until all tracks are set to "none".  
 +  - In the "Output Location" box enter the path and file name for the final MKV file, use the browse button to save to a different folder or use the default location and file name (do not attempt to overwrite the original file). 
 +  Click "Start muxing" to remux and save the new MKV file.
  
 When muxing completes, close mkvMerge and play the file with your favorite media player or standalone device. The original file may be deleted when the new file is tested and deemed proper. When muxing completes, close mkvMerge and play the file with your favorite media player or standalone device. The original file may be deleted when the new file is tested and deemed proper.
 +
 +===== Command-line method =====
 +Each track in the MKV has a numeric ID starting at 0. Assuming the filename of the MKV is "input.mkv", you can get a list of IDs like this:
 +
 +<code>mkvmerge -i input.mkv</code>
 +or
 +<code>mkvmerge --identify input.mkv</code>
 +
 +The output will look something like this:
 +
 +<code>File 'input.mkv': container: Matroska
 +Track ID 0: video (V_MPEG4/ISO/AVC)
 +Track ID 1: audio (A_AC3)</code>
 +
 +Then you can use those IDs in the --compression options in the command line. Add "--compression ID:none" option for each ID. For example, if there are 2 IDs (0 and 1), you would do this:
 +
 +<code>mkvmerge --compression 0:none --compression 1:none --clusters-in-meta-seek -o output.mkv input.mkv</code>
 +
 +That's all there is to it. The output file, output.mkv (or whatever you named it) should be playable.
 +
 +The --clusters-in-meta-seek option is not related to compression; it just helps make the file seekable on some players.
 +
 +===== Further reading =====
 +  * [[https://www.bunkus.org/answers/?qa=7/anymore-tracks-tracks-windows-explorer-displaying-matroska|mkvmerge header compression FAQ]]
 +  * [[https://www.bunkus.org/answers/?qa=11/improving-playback-players-implement-matroska-specification|mkvmerge options to improve playability]]
 +
 +
header_com.txt · Last modified: 2013/01/21 18:28 by slaute