GPU video acceleration made possible by Apple?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Ayla Offline
Fan
Posts: 585
Joined: Feb 2008
Reputation: 0
Post: #31
I just tried a massive 30GB H.264 1080p .mkv in Plex on my 13" MacBook with an Nvidia 9400M GPU and CPU usage was around 40% on both cores, with no lag/drops at all.

I tried the same file in VLC and the CPU maxed out, the video lagged and there was massive frame drops.

So Apple's framework definitely works, hehe Smile
find quote
davilla Offline
Team-XBMC Developer
Posts: 11,390
Joined: Feb 2008
Reputation: 64
Post: #32
Ayla Wrote:I just tried a massive 30GB H.264 1080p .mkv in Plex on my 13" MacBook with an Nvidia 9400M GPU and CPU usage was around 40% on both cores, with no lag/drops at all.

I tried the same file in VLC and the CPU maxed out, the video lagged and there was massive frame drops.

So Apple's framework definitely works, hehe Smile

Cool, how about a mediainfo on that file. It would be nice to know the encoding profile (baseline, main, high) and level info (L3.x, L4.x, L5.x). Heheh can it handle killa Smile


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
Thomss Offline
Member
Posts: 87
Joined: Apr 2009
Reputation: 0
Post: #33
This sounds great, certainly keeping an eye on this thread! I have a c2d + 9400 mac mini using xbmc.
find quote
RckStr Offline
Senior Member
Posts: 172
Joined: Dec 2009
Reputation: 0
Post: #34
Great to hear that its working great in Plex. Someone asked this before but im not sure it was answered: Could their work be used for xbmc? Is there any way you could just implement their sollution Davilla?
find quote
Ayla Offline
Fan
Posts: 585
Joined: Feb 2008
Reputation: 0
Post: #35
davilla Wrote:Cool, how about a mediainfo on that file. It would be nice to know the encoding profile (baseline, main, high) and level info (L3.x, L4.x, L5.x). Heheh can it handle killa Smile

Sure davilla, here is the mediainfo for the file:
Code:
General / Container Stream # 1
    Total Video Streams for this File -> 1
    Total Audio Streams for this File -> 1
    Video Codecs Used -> AVC
    Audio Codecs Used -> DTS
    File Format -> Matroska
    Play Time -> 2h 49mn
    Total File Size -> 24.4 GiB
    Total Stream BitRate -> 20.7 Mbps
    Encoded with -> mkvmerge v3.2.0 ('Beginnings') built on Feb 12 2010 16:46:17
    Encoding Library -> libebml v0.7.9 + libmatroska v0.8.1
Video Stream # 1
    Codec (Human Name) -> AVC
    Codec (FourCC) -> V_MPEG4/ISO/AVC
    Codec Profile -> High@L4.1
    Frame Width -> 1 920 pixels
    Frame Height -> 1 038 pixels
    Frame Rate -> 23.976 fps
    Total Frames -> 243807
    Display Aspect Ratio -> 1.850
    Scan Type -> Progressive
    Colorimetry -> 4:2:0
    Codec Settings (Summary) -> CABAC / 4 Ref Frames
    QF (like Gordian Knot) -> 0.392
    Codec Settings (CABAC) -> Yes
    Video Stream Length -> 2h 49mn 18s 625ms
    Video Stream BitRate -> 18.7 Mbps
    Video Stream BitRate (Nominal) -> 19.0 Mbps
    Bit Depth -> 24 bits
    Video Stream Size -> 22.2 GiB (91%)
    Video Stream Title -> Saving Private Ryan (1998)
    Video Encoder -> x264 - core 92 r1510 33d382a
    Video Encoder (Settings) -> cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=esa / subme=10 / psy=1 / psy_rd=0.80:0.20 / mixed_ref=1 / me_range=48 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=12 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=2pass / mbtree=0 / bitrate=19000 / 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:0.60
    Video Stream Language -> English
Audio Stream # 1
    Codec -> DTS
    Codec (FourCC) -> A_DTS
    Audio Stream Length -> 2h 49mn 28s 794ms
    Audio Stream BitRate -> 1 510 Kbps
    Audio Stream BitRate Mode -> CBR
    Number of Audio Channels -> 6
    Audio Channel's Positions -> Front: L C R, Surround: L R, LFE
    Sampling Rate -> 48.0 KHz
    Bit Depth -> 24 bits
    Audio Stream Size -> 1.79 GiB (7%)
    Audio Stream Title -> DTS core 5.1 @ 1.5 Mbps
    Audio Stream Language -> English
find quote
Ayla Offline
Fan
Posts: 585
Joined: Feb 2008
Reputation: 0
Post: #36
I just tried the killa sample, my 2.26Ghz C2D MacBook Pro uses ca. 85% CPU on both cores and drops around 20 frames.
find quote
davilla Offline
Team-XBMC Developer
Posts: 11,390
Joined: Feb 2008
Reputation: 64
Post: #37
@Ayla, In that mediainfo dump, important bits are 1080p High@L4.1 with 4 ref frames.

My killa sample is 1080p, High@L5.1 with 16 ref frames. Sounds like VDADecoder does have limits as to what it can handle.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
fredaroony Offline
Junior Member
Posts: 20
Joined: Aug 2009
Reputation: 0
Post: #38
This file would stutter very bad on my 2.0Ghz mini before but now plays at around 50-70% or so.

Code:
Complete name :
/Volumes/chris/Downloads/Torrents/Movies/IMAX Under The Sea 2009 Bluray 1080p DTS x264 CHD/imax.under.the.sea.2009.bluray.1080p.dts.x264-chd.mkv
Format :Matroska
File size :4.35 GiB
Duration :40mn 51s
Overall bit rate :15.3 Mbps
Encoded date :UTC 2010-04-11 17:09:03
Writing application :mkvmerge v3.3.0 ('Language') 编译于 Mar 24 201014:59:24
Writing library :libebml v0.8.0 + libmatroska v0.9.0
Video
ID :1
Format :AVC
Format/Info :Advanced Video Codec
Format profile :High@L4.1
Format settings, CABAC :Yes
Format settings, ReFrames :4 frames
Muxing mode :Container profile=Unknown@4.1
Codec ID :V_MPEG4/ISO/AVC
Duration :40mn 51s
Bit rate :13.4 Mbps
Nominal bit rate :13.8 Mbps
Width :1920 pixels
Height :1080 pixels
Display aspect ratio :16:9
Frame rate :23.976 fps
Resolution :8 bits
Colorimetry :4:2:0
Scan type :Progressive
Bits/(Pixel*Frame) :0.270
Stream size :3.84 GiB (88%)
Title :IMAX.Under.The.Sea.2009.Bluray.1080p.DTS.x264-CHD
Writing library :x264 core 92 r1523 25ca5b0
Encoding settings :
cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=umh / subme=10 / psy=1 / psy_rd=1.10:0.10 / mixed_ref=1 / me_range=128 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=2 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=6 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=120 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=13752 / ratetol=2.0 / qcomp=0.65 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=50000 / vbv_bufsize=50000 / ip_ratio=1.40 / aq=1:1.00 / nal_hrd=none
Language :English
Audio
ID :2
Format :DTS
Format/Info :Digital Theater Systems
Codec ID :A_DTS
Duration :40mn 51s
Bit rate mode :Constant
Bit rate :1510 Kbps
Channel(s) :6 channels
Channel positions :Front: L C R, Side: L R, LFE
Sampling rate :48.0 KHz
Resolution :24 bits
Stream size :441 MiB (10%)
Title :DTS, 5.1 channels, 24 bits, 1509kbps, 48khz
Language :English
find quote
RckStr Offline
Senior Member
Posts: 172
Joined: Dec 2009
Reputation: 0
Post: #39
With Plex, I have no performance increase whatsoever with my 9400 mini. So unless Im doing something wrong, I think their new release could use some work.... Looking forward to c what XBMC can achieve with this.
find quote
fredaroony Offline
Junior Member
Posts: 20
Joined: Aug 2009
Reputation: 0
Post: #40
RckStr Wrote:With Plex, I have no performance increase whatsoever with my 9400 mini. So unless Im doing something wrong, I think their new release could use some work.... Looking forward to c what XBMC can achieve with this.

You must be doing something wrong because the increase in performance is dramatic and I also have a 9400 mini.
find quote
nerpissad Offline
Junior Member
Posts: 39
Joined: Dec 2009
Reputation: 0
Location: amsterdam, netherlands
Post: #41
fredaroony Wrote:You must be doing something wrong because the increase in performance is dramatic and I also have a 9400 mini.

I second that! as expected, not all media files benefit from this but the majority of mine do.
find quote
jayhawk785 Offline
Aeon Group
Posts: 230
Joined: Oct 2008
Post: #42
fredaroony Wrote:You must be doing something wrong because the increase in performance is dramatic and I also have a 9400 mini.

I'll agree--I tested it last night and my processor load was down to around 35-40% on 1080p content. As mentioned, vc1 streams are not helped by the gpu so maybe you were playing one of those. The only one that wasn't helped in my limited testing was this avatar file:

Code:
+ EBML head
|+ Doc type: matroska
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size 36778476464
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 4025)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: libebml v0.8.0 + libmatroska v0.9.0
| + Writing application: mkvmerge v3.3.0 ('Language') built on Mar 24 2010 14:59:24
| + Duration: 9701.686s (02:41:41.686)
| + Date: Sat Apr 24 14:06:46 2010 UTC
| + Segment UID: 0x82 0x31 0x2d 0x0b 0x28 0x32 0x17 0xcd 0x89 0xcf 0x06 0x23 0xff 0x7b 0xa6 0xb0
|+ Segment tracks
| + A track
|  + Track number: 1
|  + Track UID: 1
|  + Track type: video
|  + Enabled: 1
|  + Default flag: 0
|  + 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 198
|  + Default duration: 41.708ms (23.976 fps for a video track)
|  + Language: und
|  + Video track
|   + Pixel width: 1920
|   + Pixel height: 1080
|   + Interlaced: 0
|   + Display width: 1920
|   + Display height: 1080
| + A track
|  + Track number: 2
|  + Track UID: 1337713817
|  + 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_DTS
|  + Codec decode all: 1
|  + Language: eng
|  + Audio track
|   + Sampling frequency: 48000
|   + Channels: 6
| + A track
|  + Track number: 3
|  + Track UID: 3240295822
|  + Track type: subtitles
|  + Enabled: 1
|  + Default flag: 1
|  + Forced flag: 0
|  + Lacing flag: 0
|  + MinCache: 0
|  + Timecode scale: 1
|  + Max BlockAddition ID: 0
|  + Codec ID: S_TEXT/UTF8
|  + Codec decode all: 1
|  + Language: dut
| + A track
|  + Track number: 4
|  + Track UID: 1702793138
|  + Track type: subtitles
|  + Enabled: 1
|  + Default flag: 0
|  + Forced flag: 0
|  + Lacing flag: 0
|  + MinCache: 0
|  + Timecode scale: 1
|  + Max BlockAddition ID: 0
|  + Codec ID: S_TEXT/UTF8
|  + Codec decode all: 1
|  + Language: eng
|+ EbmlVoid (size: 1024)
|+ Cluster
find quote
RckStr Offline
Senior Member
Posts: 172
Joined: Dec 2009
Reputation: 0
Post: #43
I reinstalled plex from scratch, same problem. then i toggled the refresh rate from 60 to 50 and back to 60 hz. Voilla, Plex shaves up more than 50% of the CPU usage. 2 days after Apple released the API. How fucking amazing isnt this!!!!!

Movies i rip from bluray myself with crazy high bitrate even plays flawless now. Talk about a badass improvement. What plex does now is amazing. Can hardly wait for this in XBMC!
find quote
davilla Offline
Team-XBMC Developer
Posts: 11,390
Joined: Feb 2008
Reputation: 64
Post: #44
jayhawk785 Wrote:I'll agree--I tested it last night and my processor load was down to around 35-40% on 1080p content. As mentioned, vc1 streams are not helped by the gpu so maybe you were playing one of those. The only one that wasn't helped in my limited testing was this avatar file:

Code:
+ EBML head
|+ Doc type: matroska
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size 36778476464
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 4025)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: libebml v0.8.0 + libmatroska v0.9.0
| + Writing application: mkvmerge v3.3.0 ('Language') built on Mar 24 2010 14:59:24
| + Duration: 9701.686s (02:41:41.686)
| + Date: Sat Apr 24 14:06:46 2010 UTC
| + Segment UID: 0x82 0x31 0x2d 0x0b 0x28 0x32 0x17 0xcd 0x89 0xcf 0x06 0x23 0xff 0x7b 0xa6 0xb0
|+ Segment tracks
| + A track
|  + Track number: 1
|  + Track UID: 1
|  + Track type: video
|  + Enabled: 1
|  + Default flag: 0
|  + 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 198
|  + Default duration: 41.708ms (23.976 fps for a video track)
|  + Language: und
|  + Video track
|   + Pixel width: 1920
|   + Pixel height: 1080
|   + Interlaced: 0
|   + Display width: 1920
|   + Display height: 1080
| + A track
|  + Track number: 2
|  + Track UID: 1337713817
|  + 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_DTS
|  + Codec decode all: 1
|  + Language: eng
|  + Audio track
|   + Sampling frequency: 48000
|   + Channels: 6
| + A track
|  + Track number: 3
|  + Track UID: 3240295822
|  + Track type: subtitles
|  + Enabled: 1
|  + Default flag: 1
|  + Forced flag: 0
|  + Lacing flag: 0
|  + MinCache: 0
|  + Timecode scale: 1
|  + Max BlockAddition ID: 0
|  + Codec ID: S_TEXT/UTF8
|  + Codec decode all: 1
|  + Language: dut
| + A track
|  + Track number: 4
|  + Track UID: 1702793138
|  + Track type: subtitles
|  + Enabled: 1
|  + Default flag: 0
|  + Forced flag: 0
|  + Lacing flag: 0
|  + MinCache: 0
|  + Timecode scale: 1
|  + Max BlockAddition ID: 0
|  + Codec ID: S_TEXT/UTF8
|  + Codec decode all: 1
|  + Language: eng
|+ EbmlVoid (size: 1024)
|+ Cluster

Icky, what did this output come from, there's zero info about the video encoding besides Codec ID: V_MPEG4/ISO/AVC and size. Mediainfo tells all, goggle it, get it, use it and nothing else.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
jayhawk785 Offline
Aeon Group
Posts: 230
Joined: Oct 2008
Post: #45
davilla Wrote:Icky, what did this output come from, there's zero info about the video encoding besides Codec ID: V_MPEG4/ISO/AVC and size. Mediainfo tells all, goggle it, get it, use it and nothing else.

haha, i knew that was coming. I have to do it from command line, and thats all i could get to install remotely. I've updated on my lunch Wink

Code:
Format                           : Matroska
File size                        : 34.3 GiB
Duration                         : 2h 41mn
Overall bit rate                 : 30.3 Mbps
Encoded date                     : UTC 2010-04-24 14:06:46
Writing application              : mkvmerge v3.3.0 ('Language') built on Mar 24 2010 14:59:24
Writing library                  : libebml v0.8.0 + libmatroska v0.9.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 2h 41mn
Bit rate                         : 28.2 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate                       : 23.976 fps
Bits/(Pixel*Frame)               : 0.568
Stream size                      : 31.9 GiB (93%)

Audio
ID                               : 2
Format                           : DTS
Format/Info                      : Digital Theater Systems
Codec ID                         : A_DTS
Duration                         : 2h 41mn
Bit rate mode                    : Constant
Bit rate                         : 1 510 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 24 bits
Stream size                      : 1.71 GiB (5%)
Language                         : English

Text #1
ID                               : 3
Format                           : UTF-8
Codec ID                         : S_TEXT/UTF8
Codec ID/Info                    : UTF-8 Plain Text
Language                         : Dutch

Text #2
ID                               : 4
Format                           : UTF-8
Codec ID                         : S_TEXT/UTF8
Codec ID/Info                    : UTF-8 Plain Text
Language                         : English
find quote
Post Reply