XBMC plays HD mp4 fine, but not mkv
#1
Hello, I stream all my media off my home server (via smb or upnp) to a HTPC connected to my TV.

As the title says I can play the 720p mp4 file just fine while the 720p mkv has problems. At first the only problem is dropping frames, at the beginning it is hardly noticeable but as the movie moves on it gets worse. And after a while the audio gets out of sync with the video, adjusting the audio delay setting fixes this, but I need to readjust it every 10 minutes or so. Also when playing the mkv skipping forward or backward takes a long time, while the mp4 is almost instant.

At first I thought it was a network issue. (not being able to move the file fast enough over the network) So I copied the file to the HTPC's hd, Same problem. Also, the network lights on the switch that the HTPC is plugged into don't blink like they would if they where very active.

I have tested multiple mp4s and mkvs, all seem to have the same behavior.

So here are the specs on the HTPC:
Intel P4 2.4GHz
Total mem: 768MB
GPU: Nvidia GeForce FX 5200
GPU mem: 128MB
Screen resolution: 1360x768

Ubuntu 9.04 x86
(All updates installed)
Kernel: 2.6.28-15

XBMC: 9.04.1 r20654

Here is the mediainfo on a mp4
Code:
General
Complete name                    : /home/deux/tf4.mp4
Format                           : MPEG-4
Format profile                   : Base Media
Codec ID                         : isom
File size                        : 1.39 GiB
Duration                         : 1h 45mn
Overall bit rate                 : 1 892 Kbps
Encoded date                     : UTC 2009-07-29 08:39:44
Tagged date                      : UTC 2009-07-29 08:39:44

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : [email protected]
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 1h 45mn
Bit rate mode                    : Variable
Bit rate                         : 1 630 Kbps
Maximum bit rate                 : 5 532 Kbps
Width                            : 1 280 pixels
Height                           : 544 pixels
Display aspect ratio             : 2.35:1
Frame rate mode                  : Constant
Frame rate                       : 23.976 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.098
Stream size                      : 1.20 GiB (86%)
Writing library                  : x264 core 68 r1183M f21daff
Encoding settings                : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x1:0x111 / me=umh / subme=9 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=0 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=1 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=1630 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
Encoded date                     : UTC 2009-07-28 23:41:30
Tagged date                      : UTC 2009-07-29 08:40:23

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : No
Codec ID                         : 40
Duration                         : 1h 45mn
Bit rate mode                    : Variable
Bit rate                         : 259 Kbps
Maximum bit rate                 : 348 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Rear: L R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 195 MiB (14%)
Encoded date                     : UTC 2009-07-29 08:40:16
Tagged date                      : UTC 2009-07-29 08:40:23

And the mediainfo for a mkv
Code:
General
Complete name                    : /home/deux/ilym.mkv
Format                           : Matroska
File size                        : 4.36 GiB
Duration                         : 1h 44mn
Overall bit rate                 : 5 954 Kbps
Encoded date                     : UTC 2009-07-24 23:36:53
Writing application              : mkvmerge v2.9.5 ('Tu es le seul') built on Jun 17 2009 16:28:30
Writing library                  : libebml v0.7.8 + libmatroska v0.8.1

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : [email protected]
Format settings, CABAC           : Yes
Format settings, ReFrames        : 5 frames
Muxing mode                      : Container [email protected]
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 1h 44mn
Bit rate                         : 5 196 Kbps
Nominal bit rate                 : 5 336 Kbps
Width                            : 1 280 pixels
Height                           : 720 pixels
Display aspect ratio             : 16:9
Frame rate                       : 23.976 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.235
Stream size                      : 3.80 GiB (87%)
Writing library                  : x264 core 67 r1173M f6d3166
Encoding settings                : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=7 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=12 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=5336 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00

Audio
ID                               : 2
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : A_AC3
Duration                         : 1h 44mn
Bit rate mode                    : Constant
Bit rate                         : 640 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Surround: L R, LFE
Sampling rate                    : 48.0 KHz
Stream size                      : 480 MiB (11%)
Language                         : English

Text
ID                               : 3
Format                           : UTF-8
Codec ID                         : S_TEXT/UTF8
Codec ID/Info                    : UTF-8 Plain Text
Language                         : English

So are there any changes can make to allow xbmc to play the mkv files?
I know I can setup upnp transcoding on the server, but I would really rather not.

Thanks!
Reply
#2
Have you tried the latest builds off svn ? Please post debug logs as well ..

If possible, post a sample mkv file to test as well ..
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#3
I have not tested any svn version. (are there pre-compiled svn versions available?)

As you can see the mkv i used was 4.36GB, is there any way to upload a small sample? (although I am not sure you will get the same outcome with such a small file)

Here is the xbmc debug log I made just now trying to play back a mp4 and a mkv.
http://pastebin.com/ff1f9a22
I edited out a few of the smb:// lines that had my password.
Reply
#4
http://www.sshcs.com/xbmc/ ..
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#5
I just tryed r22463. It seemed better, the audio delay was better but still there and if I paused it for a while It would catch back up. However I was getting around 11fps and it is very jerky.
Reply
#6
Bump

I just tested a few more mkv files with r22463, Its still having problems.
What is so different about mkv and mp4?

and why cant xbmc play back the mkvs properly?
Reply
#7
We can't do anything without logs from the new build.
Reply
#8
Here are the logs from r22463 playing the mkv then mp4
http://pastebin.com/f1e6887df

Does this tell you what you need to know?

Thanks.
Reply
#9
Which video drivers are you running in Ubuntu for the Nvidia Card?!?
Reply
#10
Version 173.

The video image looks good (except the dropped frames)
Its the audio delay (or maybe its a video delay) that's the problem.

EDIT: It seems the video is behind the audio.
Reply
#11
Bump
Reply
#12
Is you CPU getting maxed out from playing the file? From the information you posted about the mp4 and the mkv, the mkv has a much higher average bitrate and would of course demand more CPU power.
Reply
#13
The CPU is at or near 100% when playing back both the mkv and the mp4.
Reply
#14
So I take it that my Pentium 4 2.4ghz possessor is not powerful enough to play back the video?

And there is nothing I can do to fix it? (other than a new computer)
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC plays HD mp4 fine, but not mkv0