WDTV Live Streaming fails to play back MKV (Not header compression issue)

Hello all,

I’ve done a fair amount of googling and can’t come up with a workaround for this.  Essentially, with many .mkv files the WDTV doesn’t play them back.  

There’s no error message, it flips to a black screen and looks as though it’s playing something (the playback time is incrementing every second) but there is no sound or video.  On all of these, the total time it’s displaying is wrong–often it’s exactly double what the actual length of the video is (e.g. an 11 minute video will show as 22 minutes long and playback is dark and silent), but sometimes it will show either 0 time or an indeterminate short time (a 2:30 long movie might show as 7 minutes).

I can hit the back button to stop the “playback” and go play another movie with no issues.

This is not the case with every mkv, only certain newer ones–the ones that don’t work are all very high resolution, 6-track DTS files as far as I have seen, but not every such file fails.

These videos are being served over DLNA (from xbmc on my linux-based laptop) to the gen3 WDTV live streaming device.  It’s currently running firmware 1.10.13.

Things I have tried:

mkWDclean has no effect.

Repackaging the video as an .mpg (with ffmpeg -vcodec copy) doesn’t help

Rolling back to firmware 1.09.10 doesn’t help.

Staring at mediainfo’s output of “encoding settings” for various files encoded with x264 core, I can’t find a consistent difference except possibly the crf value (it’s been enough staring that I can’t recall all the values I’ve seen for that).  The vertical resolutions are maybe slightly different but I can play back very high-res so I’m not sure that’s a real issue.

mediainfo for a file that fails, followed by one that works and another that fails.

General
Unique ID : 254105960755703552821672391949620005972 (0xBF2B072394AE79D8997EBD519EA2CC54)
Complete name : Item_47(2012).2.mkv
Format : Matroska
Format version : Version 2
File size : 309 MiB
Duration : 11mn 20s
Overall bit rate : 3 803 Kbps
Encoded date : UTC 2012-08-21 17:48:20
Writing application : mkclean 0.8.7 u from libebml v1.2.3 + libmatroska v1.3.0 + mkvmerge v5.7.0 (‘The Whirlwind’) built on Jul 8 2012 20:08:51
Writing library : libebml2 v0.21.1 + libmatroska2 v0.22.1

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 11mn 20s
Bit rate : 3 407 Kbps
Width : 1 280 pixels
Height : 528 pixels
Display aspect ratio : 2.40:1
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.210
Stream size : 277 MiB (90%)
Writing library : x264 core 125 r2200 999b753
Encoding settings : cabac=1 / ref=5 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=15.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English

Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 11mn 20s
Bit rate mode : Constant
Bit rate : 320 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 26.0 MiB (8%)
Language : English

Menu
00:00:00.000 : 00:00:00.000
00:06:07.784 : 00:06:07.784


This one works:

General
Unique ID : 0 (0x0)
Complete name : Breaking Bad.S05E02.mkv
Format : Matroska
Format version : Version 2
File size : 1.21 GiB
Duration : 47mn 0s
Overall bit rate : 3 679 Kbps
Encoded date : UTC 2010-02-22 21:41:29
Writing application : no_variable_data
Writing library : no_variable_data

Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 47mn 0s
Bit rate : 3 222 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.146
Stream size : 1.06 GiB (88%)
Writing library : x264 core 125 r2208 d9d2288
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

Audio
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 47mn 0s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 129 MiB (10%)


This one fails:

General
Complete name : Breaking Bad.S05E01.mkv
Format : Matroska
Format version : Version 2
File size : 1.01 GiB
Duration : 42mn 44s
Overall bit rate : 3 372 Kbps
Writing application : x264.exe
Writing library : mkv2rls x264-tv version built on 2011. febr. 17

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 42mn 44s
Bit rate : 2 921 Kbps
Width : 1 280 pixels
Height : 718 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.133
Stream size : 893 MiB (87%)
Writing library : x264 core 125 r2200 999b753
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English

Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 42mn 44s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 117 MiB (11%)
Language : English

The plot thickens:

a) If I hit “options” during playback, the files show up as video codec “Unknown”

b) If I copy the files to a thumb drive, they play perfectly from the WDTV.

So I’m betting I can work around this by exporting as NFS instead of using DLNA, but that’s a little suboptimal; I’d love to figure out what’s going on with the DLNA/upnp that’s breaking things for these files.

EDIT: And NFS exporting does, in fact, work.  But the files still don’t play over DLNA, despite most other files working fine there.

Well, it’s hard to say since there doesn’t seem to be anything wrong with your files according to the mediainfo.

However, the only thing that I do notice is the difference in the writing libraries of the 2 that fail and the one that plays.  There have been some issues with Handbrakes writing library, but none that I’m aware of using “libebml2 v0.21.1 + libmatroska2 v0.22.1”, so that could or could not be the issue.

The latest firmware addressed the Handbrake library  issue. I’m no longer having problems using the latest version of Handbrake .libmkv 0.6.5. FWIW