[AppleTV] Action scenes not so smooth for 720p MKV on Apple TV
#16
TimeHorse Wrote:I doubt anyone can help me since before I even reached this thread I was coming to the same conclusion as Davilla, but for the record, this is what mkvinfo is reporting:

+ EBML head03e01.720p.hdtv.x264-bia.mkv
|+ Doc type: matroska
|+ Doc type version: 1
|+ Doc type read version: 1
+ Segment, size 1565134754
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 4044)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: libebml v0.7.7 + libmatroska v0.8.1
| + Writing application: mkvmerge v2.4.1 ('Use Me') built on Dec 5 2008 18:30:05
| + Duration: 3510.816s (00:58:30.816)
| + Date: Mon Jul 06 22:03:34 2009 UTC
| + Segment UID: 0xab 0xfb 0xbb 0xd8 0xa8 0xc2 0xec 0x86 0xb9 0x2e 0x6c 0x06 0x24 0xbb 0xfd 0x98
|+ Segment tracks
| + A track
| + Track number: 1
| + Track UID: 1
| + Track type: video
| + Enabled: 1
| + Default flag: 1
| + Forced flag: 0
| + Lacing flag: 0
| + MinCache: 1
| + Timecode scale: 1
| + Max BlockAddition ID: 0
| + Codec ID: V_MPEG4/ISO/AVC
| + Codec decode all: 1
| + CodecPrivate, length 41
| + Default duration: 40.000ms (25.000 fps for a video track)
| + Language: eng
| + Video track
| + Pixel width: 1280
| + Pixel height: 720
| + Interlaced: 0
| + Display width: 16
| + Display height: 9
| + A track
| + Track number: 2
| + Track UID: 2484956080
| + Track type: audio
| + Enabled: 1
| + Default flag: 1
| + Forced flag: 0
| + Lacing flag: 1
| + MinCache: 0
| + Timecode scale: 1
| + Max BlockAddition ID: 0
| + Codec ID: A_AC3
| + Codec decode all: 1
| + Default duration: 32.000ms (31.250 fps for a video track)
| + Language: eng
| + Audio track
| + Sampling frequency: 48000
| + Channels: 6
|+ EbmlVoid (size: 1024)
|+ Cluster

So, can anyone confirm that this is unplayable on an first gen AppleTV due to its complexity, and further, is there any way I can watch this without spending 24 hours recoding it (i.e. on the order of a 24:1 ratio on conversion)?

mkvinfo is a useless app for determining content. Use mediainfo. It will show the important bits like h.264 encoding profile.
Reply
#17
davilla Wrote:mkvinfo is a useless app for determining content. Use mediainfo. It will show the important bits like h.264 encoding profile.

Thanks for the advice, Davilla. You wouldn't believe me how long it took to get a version of MediaInfo installed since I needed the command-line version and it seems like every link is broken on that site but I did find a copy of version 0.7.17 on some (I believe) Polish web site -- hope the virus scan is working!

Anyway, here is what MediaInfo reports:

Format : Matroska
File size : 1.46 GiB
Duration : 58mn 30s
Overall bit rate : 3 566 Kbps
Encoded date : UTC 2009-07-06 22:03:34
Writing application : mkvmerge v2.4.1 ('Use Me') built on Dec 5 2008 18:30:05
Writing library : libebml v0.7.7 + 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 : 3 frames
Muxing mode : Container [email protected]
Codec ID : V_MPEG4/ISO/AVC
Duration : 58mn 30s
Bit rate : 3 111 Kbps
Nominal bit rate : 3 180 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16/9
Frame rate : 25.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.135
Stream size : 1.27 GiB (87%)
Writing library : x264 core 67 r1173M f6d3166
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy_rd=1.0:0.0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=3180 / 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
Language : English

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


Hope that's enough information and thanks again for your help! If Boxee didn't misidentify all my files -- yeah, like I have some lost Doctor Who episodes from the 1960's on my disk and not series 3 from 2005 -- and then prevent me from relabeling them, I might have tried him, but as it is ONLY XBMC plays everything even if the AppleTV can't handle the frame rate! GO XBMC!

Anyway, thanks again for your help, Davilla!
Reply
#18
humm, 1280 x 720p CABAC [email protected] three reference frames. Seems like XBMC on the AppleTV should handle that.
Reply
#19
I am beginning to think the mkv demux in ffmpeg has some performance flaws. I consistently see higher CPU usage when playing an mkv versus a comparable mpeg-ts file, which should have higher overhead.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


                                            Image
Reply
#20
davilla Wrote:humm, 1280 x 720p CABAC [email protected] three reference frames. Seems like XBMC on the AppleTV should handle that.

Interesting. Well, I do have the symptoms described when playing this file: audio is smooth, but video is choppy, speeding up at times, no lip sync, etc.

I wonder if I've got a rogue process taking CPU resources. Here's my Idle ps (with XBMC NOT running) for my AppleTV:

PID TT STAT TIME COMMAND
1 ?? S<s 0:00.29 /sbin/launchd
36 ?? Ss 0:01.19 /sbin/dynamic_pager -F /private/var/vm/swapfile
40 ?? Ss 0:00.66 kextd
47 ?? Ss 0:26.53 /usr/sbin/mDNSResponder -launchdaemon
48 ?? Ss 0:00.78 /usr/sbin/netinfod -s local
49 ?? Ss 26:53.40 /usr/sbin/syslogd
51 ?? Ss 0:02.80 /usr/sbin/configd
52 ?? Ss 173:35.79 /usr/sbin/coreaudiod
53 ?? Ss 0:00.94 /usr/sbin/diskarbitrationd
54 ?? Ss 0:00.04 /usr/sbin/memberd -x
56 ?? Ss 0:03.18 /usr/sbin/securityd
59 ?? Ss 0:01.54 /usr/sbin/notifyd
63 ?? Ss 0:02.27 /usr/sbin/DirectoryService
64 ?? Ss 9:34.33 /usr/sbin/update 600
67 ?? Ss 0:00.02 /usr/bin/dropbear -b /Users/frontrow/.dropbear_banner
69 ?? Ss 0:00.30 /usr/sbin/distnoted
97 ?? Ss 0:00.67 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
98 ?? Ss 0:00.86 /System/Library/CoreServices/coreservicesd
100 ?? Ss 5:13.69 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer -daemon
105 ?? Ss 0:00.55 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Support/ATSServer
113 ?? Ss 0:00.05 /System/Library/CoreServices/pbs
117 ?? S 0:00.00 /sbin/launchd
119 ?? Ss 0:00.03 /usr/libexec/airtunesd -launchd
144 ?? Ss 0:00.00 /usr/libexec/crashreporterd
165 ?? Ss 0:09.14 /usr/sbin/AppleFileServer
167 ?? Ss 0:28.35 ntpd -f /var/run/ntp.drift -p /var/run/ntpd.pid
475 ?? Ss 0:00.44 slpd -f /etc/slpsa.conf
476 ?? Ss 0:00.72 /usr/sbin/lookupd
485 ?? Ss 0:00.70 /usr/bin/dropbear -b /Users/frontrow/.dropbear_banner
652 ?? Ss 0:04.02 /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/ARDHelper
655 ?? S 0:00.08 /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAgent -psn_0_1966081
656 ?? S 0:00.02 /System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/MacOS/AppleVNCServer
737 ?? S 0:00.13 /System/Library/CoreServices/Finder.app/Contents/PlugIns/RowmoteHelperATV.frappliance/Contents/Resources/RowmoteHelperATV child
803 ?? S 609:09.12 /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder -psn_0_2228225
808 ?? Ss 0:00.11 /System/Library/PrivateFrameworks/DiskManagement.framework/Resources/DiskManagementTool -uuid 3B14511B-2220-4935-8A2D-63707C7F5FEC
818 ?? S 0:00.22 /System/Library/CoreServices/Finder.app/Contents/PlugIns/RowmoteHelperATV.frappliance/Contents/Resources/RowmoteHelperATV child
832 ?? Ss 0:00.13 /usr/bin/dropbear -b /Users/frontrow/.dropbear_banner
486 p0 Ss+ 0:00.12 -bash
833 p1 Ss 0:00.04 -bash
835 p1 R+ 0:00.01 ps -axww

And here's a snapshot of top (1 sample):

Processes: 42 total, 2 running, 40 sleeping... 146 threads 07:46:26
Load Avg: 0.56, 0.61, 0.57 CPU usage: 40.0% user, 60.0% sys, 0.0% idle
SharedLibs: num = 142, resident = 7.77M code, 828K data, 688K LinkEdit
MemRegions: num = 3167, resident = 71.4M + 1.41M private, 16.4M shared
PhysMem: 84.0M wired, 44.4M active, 32.0M inactive, 160M used, 95.6M free
VM: 2.56G + 104M 524912(0) pageins, 476796(0) pageouts

PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
845 head 0.0% 0:00.01 1 13 16 92.0K 324K 344K 26.6M
844 top 0.0% 0:00.06 1 19 18 188K 396K 664K 27.0M
833 bash 0.0% 0:00.07 1 14 17 204K 760K 752K 27.1M
832 dropbear 0.0% 0:00.17 1 11 18 112K 480K 340K 26.8M
818 RowmoteHel 0.0% 0:00.22 2 40 41 80.0K 320K 172K 101M
808 DiskManage 0.0% 0:00.11 1 41 42 4.00K 312K 24.0K 37.2M
803 Finder 0.0% 10:11:45 27 310 1419 45.0M 13.0M 41.6M 350M
737 RowmoteHel 0.0% 0:00.13 2 38 41 272K 408K 388K 101M
656 AppleVNCSe 0.0% 0:00.02 1 26 30 4.00K 316K 24.0K 91.3M
655 ARDAgent 0.0% 0:00.08 6 91 75 4.00K 324K 28.0K 58.6M
652 ARDHelper 0.0% 0:04.02 1 9 16 20.0K 312K 132K 26.6M
486 bash 0.0% 0:00.12 1 14 17 4.00K 760K 8.00K 27.1M
485 dropbear 0.0% 0:00.70 1 11 18 96.0K 480K 216K 26.8M
476 lookupd 0.0% 0:00.72 2 35 39 424K 552K 500K 28.5M
475 slpd 0.0% 0:00.44 6 31 32 160K 452K 256K 30.2M

Seems there isn't actually much going on, since the top 4 processes are my cutoff of the top log, the top itself, my current shell and the sshd that spawned it, AFAICT. Next is the remote helper, disk manager, finder and another remote handler. Does anything strike you as a potential CPU bottleneck? I know I have other files with those specs that exhibit the same jerky symptoms. Thanks again for your help Daville since I really don't want to spend hours with ffmpeg transcoding these MKVs.
Reply
#21
who sucking CPU if xbmc is at idle?

CPU usage: 40.0% user, 60.0% sys, 0.0% idle.


You do have vsync enabled right ?
Reply
#22
All 720 stuff plays badly on the ATV, I thought this was just the way it was?

Its never been good for me any way regardless of the rip as long as its 720 or above its no go on the ATV.
Reply
#23
garyi Wrote:All 720 stuff plays badly on the ATV, I thought this was just the way it was?

Its never been good for me any way regardless of the rip as long as its 720 or above its no go on the ATV.

not for me Smile
Reply
#24
davilla Wrote:who sucking CPU if xbmc is at idle?

CPU usage: 40.0% user, 60.0% sys, 0.0% idle.


You do have vsync enabled right ?

With XBMC running and IDLE in Screensaver mode "Dim", I get the following for the first 20 or so processes in top:

Processes: 41 total, 2 running, 1 stuck, 38 sleeping... 153 threads 19:26:55
Load Avg: 0.71, 0.96, 0.88 CPU usage: 53.8% user, 46.2% sys, 0.0% idle
SharedLibs: num = 142, resident = 18.2M code, 2.65M data, 6.55M LinkEdit
MemRegions: num = 3512, resident = 87.3M + 3.15M private, 51.3M shared
PhysMem: 85.7M wired, 105M active, 54.1M inactive, 245M used, 10.8M free
VM: 2.86G + 104M 537233(0) pageins, 477071(0) pageouts

PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
876 head 0.0% 0:00.01 1 13 16 92.0K 308K 344K 26.6M
875 top 0.0% 0:00.04 1 19 18 196K 380K 672K 27.0M
855 XBMC 0.0% 3:08.89 8 144 447 27.0M 36.0M 40.7M 248M
818 RowmoteHel 0.0% 0:00.26 2 40 41 248K 792K 164K 101M
808 DiskManage 0.0% 0:00.11 1 41 42 4.00K 680K 16.0K 37.2M
803 Finder 0.0% 13:30:05 28 315 1344 32.9M 16.6M 29.8M 336M
737 RowmoteHel 0.0% 0:00.13 2 38 41 80.0K 704K 360K 101M
656 AppleVNCSe 0.0% 0:00.02 1 26 30 4.00K 500K 16.0K 91.3M
655 ARDAgent 0.0% 0:00.08 6 92 75 164K 788K 304K 117M
652 ARDHelper 0.0% 0:05.28 1 9 16 20.0K 296K 116K 26.6M
486 bash 0.0% 0:00.15 1 14 17 136K 620K 444K 27.1M
485 dropbear 0.0% 0:00.93 1 11 18 100K 440K 220K 26.8M
476 lookupd 0.0% 0:00.78 2 35 39 380K 700K 568K 28.5M
475 slpd 0.0% 0:00.62 6 31 32 148K 576K 252K 30.2M
167 ntpd 0.0% 0:29.31 1 11 19 104K 420K 192K 27.1M
165 AppleFileS 0.0% 0:09.38 2 40 44 112K 688K 240K 33.4M
144 crashrepor 0.0% 0:00.00 1 16 18 4.00K 292K 0B 26.6M

Again, head and top are from the command, and XBMC is third; interesting I get almost reverse for the CPU Usage: 53.8 for user processes but only 46.2 for system (no idle here either).

As for vsync, if you mean "Vertical blank sync" under the Settings - Appearance - Screen menu, I have that as "Always enable".

Other elements of note: This is a British-encoded MKV being played on a U.S. AppleTV -- this should not be an issue though as 720p is 720p. The CPU is a 1 GHz Intel with the NVIDIA GeForce Go 7300 w/ OpenGL Engine, as reported by settings.

For comparison, here is what the CPU looks like during playback:

Processes: 41 total, 3 running, 38 sleeping... 155 threads 19:48:37
Load Avg: 2.20, 1.76, 1.38 CPU usage: 63.9% user, 36.1% sys, 0.0% idle
SharedLibs: num = 142, resident = 12.9M code, 1.37M data, 4.45M LinkEdit
MemRegions: num = 3760, resident = 92.1M + 2.56M private, 43.5M shared
PhysMem: 93.0M wired, 80.7M active, 60.0M inactive, 233M used, 22.3M free
VM: 2.90G + 104M 538886(0) pageins, 478184(0) pageouts

PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
965 head 0.0% 0:00.01 1 13 16 92.0K 304K 344K 26.6M
964 top 0.0% 0:00.07 1 19 18 196K 376K 672K 27.0M
855 XBMC 0.0% 9:35.24 11 379 680 39.6M 31.8M 63.0M 291M
818 RowmoteHel 0.0% 0:00.27 2 40 41 248K 648K 164K 101M
808 DiskManage 0.0% 0:00.11 1 41 42 4.00K 536K 16.0K 37.2M
803 Finder 0.0% 13:36:55 28 315 1342 26.5M 13.3M 21.2M 336M
737 RowmoteHel 0.0% 0:00.13 2 38 41 80.0K 560K 360K 101M
656 AppleVNCSe 0.0% 0:00.02 1 26 30 4.00K 496K 16.0K 91.3M
655 ARDAgent 0.0% 0:00.08 6 92 75 84.0K 768K 216K 117M
652 ARDHelper 0.0% 0:05.31 1 9 16 20.0K 292K 116K 26.6M
486 bash 0.0% 0:00.15 1 14 17 160K 564K 448K 27.1M
485 dropbear 0.0% 0:00.93 1 11 18 92.0K 380K 180K 26.8M
476 lookupd 0.0% 0:00.84 2 35 39 376K 672K 540K 28.5M
475 slpd 0.0% 0:00.62 6 31 32 160K 576K 256K 30.2M
167 ntpd 0.0% 0:29.38 1 11 19 100K 380K 152K 27.1M
165 AppleFileS 0.0% 0:09.41 2 40 44 112K 684K 240K 33.4M
144 crashrepor 0.0% 0:00.00 1 16 18 4.00K 288K 0B 26.6M

So, now we have a about 2/3 of the CPU spend on user processes, and only 1/3 spent on system.

At some point I should ask about playing the 5.1 track digitally via the HDMI output and why it comes out silent when I turn off the multichannel downmix (or clicking if DTS is enabled), but for another thread! Smile

Thanks again Davilla!

Jeffrey.
Reply
#25
davilla Wrote:not for me Smile

You are a cruel person!

Well anyhow, its never worked for me, no setting fixes the fact it drops half the frames.
Reply
#26
Folks, I didn't resurrect this thread just to get more people to chime in that they are having this problem. I think Davilla and I are both already aware that a lot of people are having this problem and I'm here not just to solve the problem for myself but to publicly troubleshoot it with Davilla at a technical level so that we can provide everyone with a cogent solution if one exists, or a definitive answer that none does for some of us.

So instead of the me-toos and the gnashing of teeth can we just give Davilla a chance to look over my data and request any more he needs so that we can discern what is going on in my system because it's probably the same case for some of you guys too.

Peace.

Jeffrey.
Reply
#27
pastebin xbmc.log after a playback session with that mkv. run xbmc, play video for 10-20 mins, exit xbmc. fetch xbmc.log.
Reply
#28
davilla Wrote:pastebin xbmc.log after a playback session with that mkv. run xbmc, play video for 10-20 mins, exit xbmc. fetch xbmc.log.

Here it is: http://pastebin.com/f6050f999

Jeffrey.
Reply
#29
TimeHorse Wrote:Here it is: http://pastebin.com/f6050f999

Jeffrey.

Lot's of these:

Quote:18:04:28 T:52080640 M: 4067328 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
18:04:28 T:52080640 M: 4444160 ERROR: [PortAudio] ERROR[/Users/Shared/xbmc/Babylon-9.04.01/xbmc/cores/AudioRenderers/PortaudioDirectSound.cpp:238]: Output underflowed.
18:04:29 T:52080640 M: 5312512 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
18:04:30 T:52080640 M: 5304320 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue

Audio demux queue is starving, since video timing comes from the audio, video forces demux seeks and ping/pong you go. that's why you get video glitches. Cur svn has fixes for this. You're also running the version with Portaudio which was always finicky. I would try a nightly build that's closer to svn which will use coreaudio. There's a way to make them appear under Launcher but I can't remember off hand, it's been mentioned several times in the forums so a search for "Launcher appletv nightly builds" should pop it out.
Reply
#30
TimeHorse Wrote:I'm here not just to solve the problem for myself but to publicly troubleshoot it with Davilla at a technical level so that we can provide everyone with a cogent solution if one exists, or a definitive answer that none does for some of us.
Sweet. Thanks for that. Cool
Reply

Logout Mark Read Team Forum Stats Members Help
[AppleTV] Action scenes not so smooth for 720p MKV on Apple TV1