Mac mini and 23.976Hz

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jingai Offline
Skilled Skinner
Posts: 1,072
Joined: Mar 2010
Reputation: 12
Post: #1
On my 2011 Mac mini (i5, 8GB RAM, OS 10.8.2) I've managed to get a resolution set up at 23.977Hz, which was as close as I could get to 23.976Hz due to limited precision in the OS itself (according to the author of SwitchResX). Which results in it dropping a frame every ~42 seconds when synced to the Audio Clock. Syncing to the Video Clock (Resample Audio) looks much better (zero dropped video frames), but the audio has minutely audible clicks also roughly every 42 seconds. FYI, I am bitstreaming DD/DTS.

I have confirmed that XBMC is actually correctly switching to my resolution. I achieved this by redirecting the existing 24Hz resolution to my custom 23.977Hz resolution via SwitchResX. I also added the following to my advancedsettings.xml:

Code:
<measurerefreshrate>true</measurerefreshrate>
  <video>
    <fpsdetect>1</fpsdetect>
    <adjustrefreshrate>
      <override>
        <fpsmin>23.95</fpsmin>
        <fpsmax>24.05</fpsmax>
        <refresh>24</refresh>
      </override>
      <fallback>
        <refresh>60</refresh>
      </fallback>
    </adjustrefreshrate>
    <latency>
      <delay>125</delay>
    </latency>
  </video>

Note that it says 24 there in the override, but that is redirected (at the OS level) to the 23.977Hz resolution and I have verified that this is in fact the case.

The 125ms audio delay is what I found necessary for most (all?) my videos to have correct audio sync.

I am running a Frodo nightly from 2012/10/09.

Does anyone know if I can do any better than this ?
(This post was last modified: 2012-10-23 18:11 by jingai.)
find quote
jingai Offline
Skilled Skinner
Posts: 1,072
Joined: Mar 2010
Reputation: 12
Post: #2
FYI for anyone struggling with this.. I removed the following:

Code:
<measurerefreshrate>true</measurerefreshrate>
    <fpsdetect>1</fpsdetect>
    <latency>
      <delay>125</delay>
    </latency>

And suddenly the audio glitches when syncing to the Video Clock (Resample Audio) went away. I am not positive which one fixed it, but I suspect it's the audio delay. I'd keep playing with this to narrow it down but I've been mucking with this for too long and I've had a rough week, so instead, I'm going to bed...

Figured I'd share at least this much in case it helps anyone else though. It's about as perfect as I'd expect it to be now (as in, no complaints, and I am pretty damn sensitive to this kind of thing) given that I can't nail 23.976Hz exactly on the Mac mini.
find quote
jingai Offline
Skilled Skinner
Posts: 1,072
Joined: Mar 2010
Reputation: 12
Post: #3
Ok, so it wasn't the audio delay.. put that back and it's still fine. Was one of the other two then. Now I'm going to bed lol
find quote
claudius139 Offline
Junior Member
Posts: 4
Joined: Mar 2009
Reputation: 0
Post: #4
Jingai, now that Frodo Beta 1 is out, I want to switch from Plex to XBMC on my Mini Mac 2009 (Nvidia 9400).

This computer will be dedicated to XBMC and I want to make sure that I have the best setup to play HD movies. I was struggling in the past about movies in 24p, audio sync, refresh and all and never had a proper solution.

Is it possible for you to give tell me exactly what it takes to make it work?

Lots of movies I have are 24p HD mkv but I have some tv series not in that format that I still want to watch of course.

Now my MiniMac resolution is at 1080p60 but when I play an HD 24p movie, no drop frames but I can that it's not always fluid (pan scene for example), when I play with the setting to change the resolution for each movie, It's fluid but I have audio delays.

I would like to have a perfect solution without my tv switching resolution all the time. And since the majority of what I watch is in HD 24p, I would like to know if I can do it.

1. What are the settings with SwitchResX?
2. What are the settings in the advancedsettings.xml file?
3. What are the settings in the Video section inside XBMC?

Thank you in advance!
find quote
jingai Offline
Skilled Skinner
Posts: 1,072
Joined: Mar 2010
Reputation: 12
Post: #5
(2012-11-16 17:55)claudius139 Wrote:  1. What are the settings with SwitchResX?

This is entirely dependent on your video card and monitor. Basically though:
  • Copy your current 1080p60 resolution to the clipboard within SwitchResX
  • Create a new Custom Resolution and paste from clipboard to it
  • Enter "23.976" into the Vertical Scan Rate
  • Save and reboot
  • If you already had a 1080p24 resolution in Current Resolutions, right-click it and Redirect it to the new one

Again, I was not able to nail 23.976Hz exactly myself. Closest I got was 23.977Hz. I did this by actually entering "23.975" (I think...) instead of "23.976" for the Vertical Scan Rate. If I entered "23.976" it rounded it to "23.978".

According to the author of SwitchResX, this is because OSX only retains 2 decimal places of precision for all of the values.

(2012-11-16 17:55)claudius139 Wrote:  2. What are the settings in the advancedsettings.xml file?

Code:
<video>
  <adjustrefreshrate>
    <override>
      <fpsmin>23.95</fpsmin>
      <fpsmax>24.05</fpsmax>
      <refresh>24</refresh>
    </override>
    <fallback>
      <refresh>60</refresh>
    </fallback>
  </adjustrefreshrate>
  <latency>
    <delay>125</delay>
  </latency>
</video>

The latency section is specific to my setup, of course. You'll need to find a value (in ms) that syncs the audio to the video correctly on your own system.

(2012-11-16 17:55)claudius139 Wrote:  3. What are the settings in the Video section inside XBMC?

I use:
  • Adjust display refresh rate to match video: On
  • Sync playback to display: On
  • A/V sync method: Video clock (Resample audio)

The last item is basically up to what bugs you most: video frame drops/dupes, or audio drops/dupes/resampling. Personally, video anomalies bug me more so I chose to resample the audio. The audio does still glitch every now and again, but I think I'm noticing it less as I use these settings more. YMMV, but the bottom line is that it has to keep sync somehow, so unless you can nail 23.976Hz exactly, you have to choose.
(This post was last modified: 2012-11-17 02:06 by jingai.)
find quote
idioteque Offline
Fan
Posts: 407
Joined: Aug 2008
Reputation: 0
Post: #6
what brand and type TV are you using. On my panasonic I had to disable all artificial software on the TV to enable 24p mode

MBP late 2009 - TimeCapsule 2TB - Harmony One+ - Readynas NV+ 8TB RAID5 - Mac Mini late 2009 with 10.9.0 and VDA - Panasonic TX-PG420ES -
find quote
claudius139 Offline
Junior Member
Posts: 4
Joined: Mar 2009
Reputation: 0
Post: #7
Thank you! I will try that today. For the tv, I have a Samsung Serie 7.

I will report my tests here with those settings later.
find quote
idioteque Offline
Fan
Posts: 407
Joined: Aug 2008
Reputation: 0
Post: #8
We opted to turn off motion and judder compensation; although these features generally lend a smoother feel to video, we preferred the Samsung Series 7 (PS50C7000)'s output of The Dark Knight and Watchmen with them disabled. As you'd expect, the Samsung Series 7 (PS50C7000) supports 24p Film Mode playback for a proper cinematic frame rate.

MBP late 2009 - TimeCapsule 2TB - Harmony One+ - Readynas NV+ 8TB RAID5 - Mac Mini late 2009 with 10.9.0 and VDA - Panasonic TX-PG420ES -
find quote
jingai Offline
Skilled Skinner
Posts: 1,072
Joined: Mar 2010
Reputation: 12
Post: #9
(2012-11-17 08:51)idioteque Wrote:  what brand and type TV are you using. On my panasonic I had to disable all artificial software on the TV to enable 24p mode

I have a Panasonic IPS panel. I wasn't forced to turn the extra stuff off to get 24p, but I do anyway. The only thing I have enabled is the faux local dimming (360 backlight or whatever it is called).
find quote
idioteque Offline
Fan
Posts: 407
Joined: Aug 2008
Reputation: 0
Post: #10
24p is supported on my Panasonic TX-PG420ES , however, motion compensation and smooth playback are by default turned on when in 24p mode.
This causes judder, and when disabling these all is fine

MBP late 2009 - TimeCapsule 2TB - Harmony One+ - Readynas NV+ 8TB RAID5 - Mac Mini late 2009 with 10.9.0 and VDA - Panasonic TX-PG420ES -
find quote
jingai Offline
Skilled Skinner
Posts: 1,072
Joined: Mar 2010
Reputation: 12
Post: #11
Hmm it didn't cause judder on mine -- I just didn't like it.
find quote
Scott R Offline
Fan
Posts: 321
Joined: Feb 2008
Reputation: 0
Post: #12
Hi guys, I recently got a 2012 base-model Mac Mini and I'm trying to decide whether or not to keep it or return it. It has the Intel HD4000 graphics. I was originally intending to install Windows 7 on a partition and use Windows Media Center for PVR purposes and Plex or XBMC for movie playback, but I'm recently thinking of using it as a client, in which case I'd prefer not to have to change the OS if I don't have to. What is the current state of XBMC under Mac OSX with the 2012/HD4000? Can it do "24" fps movie playback smoothly and without the audio getting out of sync? If there are issues, are these issues non-issues if I run under Windows 7?
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 11,174
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #13
mac mini 2012 is restricted to mountain lion (which is full of strange behaviour). I have this setup and it works ok as long as you are not trying to passthrough audio and having the automated refreshrate adaption turned on. Also there is this 1h2min bug reported (which i wasn't able to reproduce yet with my mini).

Ubuntu runs really fine with it but even 12.10 doesn't have the right ethernet drivers for it (i had to compile them by my own). Well if you ask me - that mac mini 2012 in conjunction with 10.8 is an expensive pos...

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
jingai Offline
Skilled Skinner
Posts: 1,072
Joined: Mar 2010
Reputation: 12
Post: #14
I get 23.977Hz (note, not exactly 23.976) playback on my 2011 Mac mini with Intel HD 3000 under MacOSX 10.8. I use SwitchResX to achieve that.

I haven't used a 2012 mini with HD4000, but I suspect it's a similar experience in this regard (24fps playback), because the limitation is with OSX, not (necessarily) the hardware. OSX doesn't store more than 3 decimal places precision in any of the fields, so I couldn't get the refresh rate exact.

I don't use Windows at all, but it (or Linux) may work better (or worse) -- not sure. I don't have Linux installed on any hardware that uses Intel GPUs so I can't really say.

I'd say give it a go under each OS and decide what's acceptable to you. I am living with 23.977Hz because my mini is responsible for other tasks that are OSX-specific (Indigo for home automation). Yes, I can do the home automation stuff under other OSes, but I really like Indigo, so...

All that said, I'm not unhappy with the mini in OSX 10.8. And I'm a pretty picky person.
find quote
Scott R Offline
Fan
Posts: 321
Joined: Feb 2008
Reputation: 0
Post: #15
Thanks for the replies guys. I can live (for the forseeable future) without lossless audio. Since ripping all of my Blu-rays to .mkv over the last year or more I've intentionally selected only the core 5.1 audio tracks because for a while I was thinking I was going to then convert my movies to .m4v files using Handbrake so as to make everything compatible with the Apple TV 2/3. Smooth playback is a bigger sore point for me, and part of the reason why I've shelved the idea of optimizing anything for the ATV. I may be able to live with not-quite-perfect 23.976; I'll let my eyes be the judge, so I guess I'll need to play back some more samples. I did one very quick test when I first got the Mini home where I installed Plex and hooked it up to my Epson 8350 1080p projector. The projector reported getting a 24Hz signal (whatever that really means) and the short sample looked really smooth to me, so I was pleasantly surprised. My other concern would be around the audio getting out of sync, which I thought I read might have been a problem in the past with the Macs and 24Hz.

Memphiz, just to be clear...if I don't care about lossless audio, and am running under 10.8 (10.8.2 as of this moment), what issues do I need to be concerned about?
find quote
Post Reply