MKVMerge Error - File won't play. Help!

I’m using a WD TV HD.

Recently I just ran into a file which my media player cannot play. Searched forums and I found out that there are mkv files that can mess up the WD TV. I had to do the usual reboot, return to factory settings and everything worked again.

Now, with regard to the file the messed everything up, I tried to look for a solution to get it to work. I found in this same forum ( http://community.wdc.com/t5/General-Discussions/WD-TV-Live-won-t-play-video-all-of-sudden/td-p/11691)) that I can run the file in MKVMerge that is version 4.0 or earlier to make sure I get the correct file (something about header compression which I don’t undertstand anyway).

I tried it and got the below error message:

mkvmerge v2.2.0 (‘Turn It On Again’) built on Mar  4 2008 13:20:12
‘E:\Movies\HD 1080p\The Town [2010].mkv’: Using the Matroska demultiplexer.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 1: Using the MPEG-4 part 10 (AVC) video output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 2: Using the DTS output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 3: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 4: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 5: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 6: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 7: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 8: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 9: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 10: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 11: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 12: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 13: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 14: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 15: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 16: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 17: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 18: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 19: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 20: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 21: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 22: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 23: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 24: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 25: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 26: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 27: Using the text subtitle output module.
‘E:\Movies\HD 1080p\The Town [2010].mkv’ track 28: Using the text subtitle output module.
The file ‘E:\Movies\HD 1080p\The Town Mux.mkv’ has been opened for writing.
progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%progress: 1%‘die’ called: common.cpp/safemalloc() called from file src/common/compression.cpp, line 266: malloc() returned NULL for a size of 53195 bytes.

Just for added info, here’s the media info of the file that won’t play:

General
Unique ID                        : 222510486863266345429271084541089324322 (0xA765F60168F512B7B5A4A56999EE9D22)
Complete name                    : E:\Movies\HD 1080p\The Town [2010].mkv
Format                           : Matroska
File size                        : 4.66 GiB
Duration                         : 2h 4mn
Overall bit rate                 : 5 352 Kbps
Encoded date                     : UTC 2011-03-24 16:36:42
Writing application              : mkvmerge v4.5.0 (‘Speed of Light’) built on Feb  1 2011 02:10:32
Writing library                  : libebml v1.2.0 + libmatroska v1.1.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Muxing mode                      : Header stripping
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 2h 4mn
Bit rate                         : 4 600 Kbps
Width                            : 1 920 pixels
Height                           : 800 pixels
Display aspect ratio             : 2.40:1
Frame rate mode                  : Variable
Frame rate                       : 23.976 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.125
Stream size                      : 3.91 GiB (84%)
Title                            : The Town (2010) 1080p [mkvonly]
Writing library                  : x264 core 88
Encoding settings                : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=5 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=4600 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Language                         : English
Color primaries                  : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics         : BT.709-5, BT.1361
Matrix coefficients              : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

Audio
ID                               : 2
Format                           : DTS
Format/Info                      : Digital Theater Systems
Muxing mode                      : Header stripping
Codec ID                         : A_DTS
Duration                         : 2h 4mn
Bit rate mode                    : Constant
Bit rate                         : 755 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Bit depth                        : 24 bits
Compression mode                 : Lossy
Stream size                      : 673 MiB (14%)
Language                         : English

Not sure how to proceed on this error.

Is there a fix or upragde for the WD TV HD which will make it play files like this? Or is there something I missed that’s why it won’t mux?

Really need your help, guys. Thanks!

No, no updates for a Gen1 WDTV HD (and none likely for a Gen2).  You’ll have to fix the files yourself every time you download one.

I have no clue why 2.2.0 thinks there’s 26 subtitle tracks (which it subsequently can’t find).  I’ve never used anything earlier than 2.6.

Your best bet would be to download

and then run MKVFix to automatically scan your media.

I know MKVfix works with v4.3.0 – it requires it… but I believe there are issues if you try to use v4.5 and v4.6, so stick with v4.3.0 to be safe.  The link I provided is for Windoze… if you have a different O/S you’ll have to look around at the MKVToolnix site for an appropriate download.

Thanks, RoofingGuy!

Worked perfectly! Didn’t expect MKVFix to be that easy to use given that I know very little about video file types and compression.

Have a great day!

Thank You very much, RoofingGuy !

Today, for the first time, I had the same problem with a .mkv with compressed (stripped) header.

I find this thread in 2-3 minutes, downloaded the the mkvfix and mkvtoolnix, corrected the file in 10 minutes,

everything worked excellent.

You are doing an excellent job!

Thanks again.

p.s. still, rather strange behavior from the WD TV HD player…  to stop working like this… but, anyway it

is solved with mkvfix.

You’re both welcome.

zztop wrote:

p.s. still, rather strange behavior from the WD TV HD player…  to stop working like this

The problem is that compression in the stream headers was part of the original Matroska specifications, but nobody ever used it, so players were never designed to expect it/handle it – it kind of just got overlooked.

Then, one day, the Matroska developers asked people to start actually using the feature… so it got turned on in MKVMerge, amongst other things.

It wasn’t just the WDTV’s… many hardware and software players could no longer play any file that had compression in the header of the audio track or the video track, or both.

Everyone complained to the guy responsible for MKVmerge, but he stood his ground, and blamed the players for not properly supporting the full Matroska format.  I think since then he’s made it an option in newer versions of his program, so that encodes don’t necessarily have to have compression turned on for the headers by default, but most encodes are being made with the compression enabled.

So, the people responsible for the players scrambled to re-write their code so that it no longer got confused/stuck when it encountered compression in the headers.

Unfortunately, by the time the problem even showed up (even though it theoretically always existed) the Gen1 WDTV HD was already End-Of-Life and no longer supported by WD with new firmwares.

WD was able to fix the code for the WDTV Live, WDTV Live Plus and WDTV Live Hub, so that the newest firmwares for those devices can handle the compressed headers, and play the files.

But since there won’t be any new firmwares for the Gen1 (and probably not for the Gen2, but WD hasn’t made that official yet), all owners of the older devices can do is remove the compression themselves.

I can’t take credit for that MKVFix program, but it sure makes re-multiplexing any “problem” files simple.

Hello,

Am I doing something wrong here?

I have the gen 1 WD TV, and have just recently started using it really, but I can’t get MKV files (well most of them) to play.

I have used the MKVFix and it does the conversion thing, creates a ‘clean’ prefixed version of the files…BUT they still won’t run. Just a black screen and after that I need to re-set the whole box, or it won’t play anything. It does play _some_ mkv files but they seem a clear minority.

I have the latest firmware in, and did a factory reset too (which doesn’t change the firmware revision I see), I don’t know what can I do about it any more.

I can’t get the GUI version of the MKV fix to work…it starts to inspect the file, then exits with ‘code 0’ and does nothing.

I’ve done the conversion simply by drag&dropping each file onto the fixer, and it launches a command prompt window and does the conversion process in 3 parts creating a new file. The new file is exactly the same size, though?

Is there something I can do, add some command line prompt or something? Any pointers would be welcome…or do I just need to go buy another media player? 

Try muxing with mkvmerge GUI v4.6.0.

Before doing so set options as follows:

File -> Options -> “mmg” tab and check off  “Disable Header removal compression for audio and video tracks by default”

Seems to work for me.

Good luck!

PS.  Delete “.wd_tv” folder off the drive &  Restore player to “factory settings”

Thanks! It does seem to do something now - I’ll check if they work now later. Thanks a lot for the tip!