Kodi Community Forum

Full Version: [MAC] VDADecoder performance over HDMI on new Mac Mini?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
I am noticing poor FPS stats and continuous dropped frames when playing back a newly created BluRay rip with VDA turned on. The FPS is half of what it is suppose to be and dropped frames make the movie unwatchable.

But when I turn the VDA off, all is fine and the only dropped frames I see is when the movie first starts. Below is some info:

This is with VDA turned off:

Image

This is with VDA turned on:

Image

Here is the MediaInfo for the movie:

Quote:*** MediaInfo Mac // Plain text file report
2010-07-07 14:30:44 -0500
Information for File: Righteous Kill.mkv

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 -> AAC LC
File Format -> Matroska
Play Time -> 1h 40mn
Total File Size -> 7.30 GiB
Total Stream BitRate -> 10.4 Mbps
Encoded with -> HandBrake svn3424
Video Stream # 1
Codec (Human Name) -> AVC
Codec (FourCC) -> V_MPEG4/ISO/AVC
Codec Profile -> [email protected]
Frame Width -> 1 920 pixels
Frame Height -> 816 pixels
Frame Rate -> 23.976 fps
Total Frames -> 145008
Display Aspect Ratio -> 2.35:1
Scan Type -> Progressive
Colorimetry -> 4:2:0
Codec Settings (Summary) -> CABAC / 5 Ref Frames
Codec Settings (CABAC) -> Yes
Video Stream Length -> 1h 40mn 48s 48ms
Bit Depth -> 8 bits
Video Encoder -> x264 - core 100 r1659 57b2e56
Video Encoder (Settings) -> cabac=1 / ref=6 / 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=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=6 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / weightb=0 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Audio Stream # 1
Codec -> AAC
Codec (FourCC) -> A_AAC
Audio Stream Length -> 1h 40mn 48s 42ms
Number of Audio Channels -> 2
Audio Channel's Positions -> Front: L R
Sampling Rate -> 48.0 KHz

I didn't think a log would be warranted, but can provide if needed.
let me guess, new macmini ?
noticed something strange in your MediaInfo dump..

Codec Settings (Summary) -> CABAC / 5 Ref Frames

yet

Video Encoder (Settings) -> cabac=1 / ref=6

Which is it, 5 or 6 ?

native bluray h.264 is typically 4 ref frames so I'm guessing you are transcoding.
davilla Wrote:let me guess, new macmini ?

Yes, the new MacMini

davilla Wrote:noticed something strange in your MediaInfo dump..

Codec Settings (Summary) -> CABAC / 5 Ref Frames

yet

Video Encoder (Settings) -> cabac=1 / ref=6

Which is it, 5 or 6 ?

native bluray h.264 is typically 4 ref frames so I'm guessing you are transcoding.

Shit...I forgot to change my ref statements in my preset to stay within spec for 1080p. Yes, I'm Transcoding to save space on drive. I will re-encode from source with ref=4 and see if that makes a difference.
...forgot, settings were set to ref=6 with CABAC=1.
Sorry to bang on but this looks just like what I've been trying to get attention for here: http://forum.xbmc.org/showthread.php?tid=76614. Apart from the content in the movie frame grabbed, the stats and framerate at the too look very familiar. (my own similar screenshots are posted there).

I posted the media info output on one of my problem files and it's not showing that cabac/ref discrepancy as far as I can tell, so I'd guess that might be a red herring. If you think transcoding is still an issue an obvious thing to try is to play the untranscoded source from blu ray; those are playable as mkv files out of MakeMKV so that's easy; but I'm in bed now so I'll try that tomorrow. :-)
I've also played my sourced .mkv with and without VDA. It plays fine with both, but I don't notice any CPU advantages either way, but the framerate (if I remember correctly) was fine either way. I'll test again later tonight.
Rachel Wrote:Sorry to bang on but this looks just like what I've been trying to get attention for here: http://http://forum.xbmc.org/showthread.php?tid=76614. Apart from the content in the movie frame grabbed, the stats and framerate at the too look very familiar. (my own similar screenshots are posted there).

I posted the media info output on one of my problem files and it's not showing that cabac/ref discrepancy as far as I can tell, so I'd guess that might be a red herring. If you think transcoding is still an issue an obvious thing to try is to play the untranscoded source from blu ray; those are playable as mkv files out of MakeMKV so that's easy; but I'm in bed now so I'll try that tomorrow. :-)

Please do not assume that common symptoms indicate a common problem. Video timing is a rat's nest of interdependencies.

Important points to note, dvdplayer is dropping frames like mad, vq/aq look good so it's being feed demuxer packets. vcpu is sky high and a/v is too high positive. That means dvdplayervideo is late decoding frames and is dropping them to catch up. But this timing is determined by pts timestamps.

All I see so far where is it looks like the pts timestamps are not correct or out of sync. Now other things could also cause this symptom (slow rendering for example). The 5/6 ref frames and both being greater than 4 (bluray spec for this size video) could mean that VDADecoder is internally dropping frames which means that pts timestamps that get passed through the decoder also get dropped. This can cause all hell to break lose Smile
Once I'm done transcoding with the proper reference frames (15 hours from now), I will try again and repot back. My first time encoding 1080p content (didn't have a means for smooth playback before), so excuse my newbiness...
i tried again with HandBrake's High Profile setting, which uses 3 ref frames and cabac no change. i also tried playing the untranscoded bluray rip which does indeed use 4 ref frames, and that *still* showed the same problem.

MediaInfo output on the bluray rip:

Code:
General
Complete name                    : /media/Vault/MKV Bluray Rips 2/The Colour of Magic/The Colour of Magic - part 1.mkv
Format                           : Matroska
File size                        : 11.2 GiB
Duration                         : 1h 37mn
Overall bit rate                 : 16.4 Mbps
Encoded date                     : UTC 2010-06-18 14:34:11
Writing application              : MakeMKV v1.5.6 beta linux(x64-release)
Writing library                  : libmakemkv v1.5.6 beta (0.7.7/0.8.1) x86_64-linux-gnu

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : [email protected]
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Muxing mode                      : Container [email protected]
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 1h 37mn
Bit rate                         : 13.7 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate                       : 25.000 fps
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : MBAFF
Bits/(Pixel*Frame)               : 0.264
Stream size                      : 9.35 GiB (84%)
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 #1
ID                               : 2
Format                           : DTS
Format/Info                      : Digital Theater Systems
Codec ID                         : A_DTS
Duration                         : 1h 37mn
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.03 GiB (9%)
Title                            : 3/2+1
Language                         : English

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

Audio #3
ID                               : 4
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : A_AC3
Duration                         : 1h 37mn
Bit rate mode                    : Constant
Bit rate                         : 224 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 48.0 KHz
Stream size                      : 157 MiB (1%)
Title                            : 2/0
Language                         : English

Menu
00:00:00.000                     : en:Chapter 00
00:10:58.520                     : en:Chapter 01
00:15:47.160                     : en:Chapter 02
00:22:12.480                     : en:Chapter 03
00:30:00.800                     : en:Chapter 04
00:34:21.720                     : en:Chapter 05
00:40:49.080                     : en:Chapter 06
00:50:01.800                     : en:Chapter 07
01:00:05.440                     : en:Chapter 08
01:10:48.760                     : en:Chapter 09
01:22:52.840                     : en:Chapter 10
01:35:31.200                     : en:Chapter 11

And the High Profile transcode of chapter 1 (actually i note a discrepancy in the ref frames this time.):

Code:
General
Complete name                    : /media/Vault/Testing/The Colour of Magic - part 1, chap1, high profile.m4v
Format                           : MPEG-4
Format profile                   : Base Media / Version 2
Codec ID                         : mp42
File size                        : 514 MiB
Duration                         : 10mn 58s
Overall bit rate                 : 6 547 Kbps
Encoded date                     : UTC 2010-07-08 08:41:20
Tagged date                      : UTC 2010-07-08 09:58:16
Writing application              : HandBrake svn3428 2010070501

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                         : 10mn 58s
Bit rate mode                    : Variable
Bit rate                         : 5 773 Kbps
Width                            : 1 920 pixels
Height                           : 1 072 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Variable
Frame rate                       : 25.000 fps
Minimum frame rate               : 8.333 fps
Maximum frame rate               : 25.000 fps
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.112
Stream size                      : 453 MiB (88%)
Writing library                  : x264 core 100 r1659 57b2e56
Encoding settings                : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / 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=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date                     : UTC 2010-07-08 08:41:20
Tagged date                      : UTC 2010-07-08 09:58:16
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 #1
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : No
Codec ID                         : 40
Duration                         : 10mn 58s
Bit rate mode                    : Variable
Bit rate                         : 132.3 Kbps
Maximum bit rate                 : 194 Kbps
Channel(s)                       : 2 channels
Channel positions                : Front: L R
Sampling rate                    : 48.0 KHz
Stream size                      : 10.3 MiB (2%)
Language                         : English
Encoded date                     : UTC 2010-07-08 08:41:20
Tagged date                      : UTC 2010-07-08 09:58:15

Audio #2
ID                               : 3
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : ac-3
Duration                         : 10mn 58s
Bit rate mode                    : Constant
Bit rate                         : 640 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 50.2 MiB (10%)
Language                         : English
Encoded date                     : UTC 2010-07-08 08:41:20
Tagged date                      : UTC 2010-07-08 09:58:15
If you can build, add the following line to CDVDVideoCodecVDA::GetPicture right before the return.

Code:
CLog::Log(LOGNOTICE, "%s - VDADecoderDecode dts(%f), pts(%f)", __FUNCTION__,
    pDvdVideoPicture->dts, pDvdVideoPicture->pts);

This will dump dts/pts for every picture that DVDPlayerVideo requests. Look for a continuous increment of pts by some amount (depends on video fps).
Rachel Wrote:i tried again with HandBrake's High Profile setting, which uses 3 ref frames and cabac no change. i also tried playing the untranscoded bluray rip which does indeed use 4 ref frames, and that *still* showed the same problem.

My issue is a little different than yours. My source file plays fine with or without VDA. In my case, it plays better with VDA:

Source with VDA -

Image

Source without VDA -

Image

MediaInfo for Source -

Code:
*** MediaInfo Mac // Plain text file report
2010-07-08 13:45:51 -0500
Information for File: Righteous Kill.mkv

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 -> A_TRUEHD
    File Format -> Matroska
    Play Time -> 1h 40mn
    Total File Size -> 21.9 GiB
    Total Stream BitRate -> 31.1 Mbps
    Encoded with -> mkvmerge v3.4.0 ('Rapunzel') built on May 15 2010 09:38:20
    Encoding Library -> libebml v0.8.0 + libmatroska v0.9.0
Video Stream # 1
    Codec (Human Name) -> AVC
    Codec (FourCC) -> V_MPEG4/ISO/AVC
    Codec Profile -> [email protected]
    Frame Width -> 1 920 pixels
    Frame Height -> 1 080 pixels
    Frame Rate -> 23.976 fps
    Total Frames -> 145008
    Display Aspect Ratio -> 16:9
    Scan Type -> Progressive
    Colorimetry -> 4:2:0
    Codec Settings (Summary) -> CABAC / 2 Ref Frames
    Codec Settings (CABAC) -> Yes
    Video Stream Length -> 1h 40mn 48s 48ms
    Bit Depth -> 8 bits
Audio Stream # 1
    Codec -> TrueHD
    Codec (FourCC) -> A_TRUEHD
    Audio Stream Length -> 1h 40mn 48s 43ms
    Number of Audio Channels -> 6
    Sampling Rate -> 48.0 KHz

...Notice the ref=2. I don't believe MediaInfo is reading the file correctly due to the fact that I set my new transcode to ref=4 and MediaInfo reads it as ref=3:

Code:
*** MediaInfo Mac // Plain text file report
2010-07-08 13:48:04 -0500
Information for File: Righteous Kill.mkv

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 -> AAC LC
    File Format -> Matroska
    Play Time -> 1h 40mn
    Total File Size -> 7.24 GiB
    Total Stream BitRate -> 10.3 Mbps
    Encoded with -> HandBrake svn3424
Video Stream # 1
    Codec (Human Name) -> AVC
    Codec (FourCC) -> V_MPEG4/ISO/AVC
    Codec Profile -> [email protected]
    Frame Width -> 1 920 pixels
    Frame Height -> 816 pixels
    Frame Rate -> 23.976 fps
    Total Frames -> 145008
    Display Aspect Ratio -> 2.35:1
    Scan Type -> Progressive
    Colorimetry -> 4:2:0
    Codec Settings (Summary) -> CABAC / 3 Ref Frames
    Codec Settings (CABAC) -> Yes
    Video Stream Length -> 1h 40mn 48s 48ms
    Bit Depth -> 8 bits
    Video Encoder -> x264 - core 100 r1659 57b2e56
    Video Encoder (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=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=6 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / weightb=0 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Audio Stream # 1
    Codec -> AAC
    Codec (FourCC) -> A_AAC
    Audio Stream Length -> 1h 40mn 48s 42ms
    Number of Audio Channels -> 2
    Audio Channel's Positions -> Front: L R
    Sampling Rate -> 48.0 KHz

That said, the new transcoded with ref=4 still does not play correctly:

Transcoded with VDA -

Image

Transcoded without VDA -

Image
davilla Wrote:If you can build, add the following line to CDVDVideoCodecVDA::GetPicture right before the return.

Code:
CLog::Log(LOGNOTICE, "%s - VDADecoderDecode dts(%f), pts(%f)", __FUNCTION__,
    pDvdVideoPicture->dts, pDvdVideoPicture->pts);

This will dump dts/pts for every picture that DVDPlayerVideo requests. Look for a continuous increment of pts by some amount (depends on video fps).

I'm not set up for building xbmc atm; Usually I'm quite happy building stuff but xbmc's build process seemed more involved than most, when I last looked, so I left off. I'll see about setting that up this weekend, with macports et al...
Rachel Wrote:I'm not set up for building xbmc atm; Usually I'm quite happy building stuff but xbmc's build process seemed more involved than most, when I last looked, so I left off. I'll see about setting that up this weekend, with macports et al...

Follow this first, http://code.google.com/p/xbmc-port-depends/ , then README.osx
davilla Wrote:Follow this first, http://code.google.com/p/xbmc-port-depends/ , then README.osx

Ugh, I don't like these instructions. That symlinking is breaking my system for building anything else. I don't have *so* many macs that I want to devote one to just building xbmc...

And it seems to be just for keeping compatibility with 10.4. I'm not even interested in that; not like I'm building for distribution. I suppose it's because the AppleTV OS is still 10.4-based iirc.

Oh well... I think this iMac might be getting due for a cleanout reinstall soon anyway. :-}
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19