Bad Movie, Good News

02.23.08 14 Comments

Last night I was forced to watch Rumor Has It. I say forced, but actually I was staring at the screen transfixed the entire time, not because of the acting (horrible), the plot (puerile) or the surprise peek at half of Jennifer Aniston’s right breast (entirely forgettable), but because of the quality of the output of the 1080p movie by our trusty little mini.

By the numbers: This was an x.264 encode in an MKV container. The average bitrate was 11.5MBps, with spikes between 15 and 20. Total number of frames dropped in the entire movie (counting those 20 odd that always seem to go missing at the beginning): 230. The means the drop rate was 0.16%. Those dropped frames were all clustered around “difficult” scenes in the movie, and resulted in a bit of jerky movement, but no audio loss.

Note that at this point we are peaking at about 130-140% of the (dual core) CPU in use. This means that there is another 70% of a core doing absolutely nothing. With further improvements by the ffmpeg team, we can only do better. This was also a full-quality decode. Tweaking some of the ffmpeg settings. as suggested by inloop would probably improve things as well, at the expense of picture quality.

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedIn
Share this


  • I’m having similar experiences in terms of picture quality, and (lack of) dropped frames as we speak.. though I’m watching a considerably better film!

    Gotta love The Big Lebowski in 1080p

    It’s not perfect, but it’s definitely close enough were the small number of dropped frames don’t really bother me.

  • Just like to say that 1080p MKV’s work almost flawlessly on my 2.0Ghz CoreDuo iMac. Yes, the CoreDuo, not Core2Duo. I have 2Gb of RAM and the ATI x1600 256Mb GPU. I am also using a Pioneer receiver via the optical out to handle the DD and DTS audio. Only real complaint I have is the sharp and loud burst of white noise that occurs when I start video files. It only happens right when I start the movie.

    Anyway, the file was a 1080p x264 encode of Fearless. Great film btw.

  • A 1080p MKV of Ratatouille is seemingly running with OK fluency on my 2GHz Mac Mini C2D, but with fast video (and yes, I’ve got the audio settings set up as the FAQ suggests doing in this case, just not physically connected to a receiver).

    I can send you / make available on my server the 1-minute, 88 meg MKV sample file that accompanied the movie, if it helps in debugging this issue. Contact me in the e-mail that I left in this comment form, if you’d like to have a look.

    A couple of other bugs in the latest release:

    1. XBMC fails to shut down properly; the interface closes, but Force Quit has to be used before it disappears from the dock. This didn’t happen with the previous release.

    2. If I’m running XBMC in a window and put it in the background while doing something else in the foreground, it still dims the entire screen when the UI idle timeout is reached. It probably should only do this in Fullscreen mode :-)

  • I have a Mac Mini 1.83 GHz Intel Core 2 Duo. I experience framedrops with 720p movies. Does anyone else have this CPU, and do you experience framedrops? Does anyone have examples to share?

  • @Jarkko Laiho: I need terminal output to diagnose ($ ./ I don’t see the shutdown problem. Dimming will be fixed in next release.

  • @elan:

    Uhh… this is odd enough. If I run XBMC from the command line as you suggest, it shuts down just fine. But if I run it by double-clicking the icon in Finder, the shutdown doesn’t complete.

    The last two lines, when I run from the command-line, are:

    CRITSEC[0x970c64]: Trying to enter destroyed section.
    CritSect[0x970c64]: Some other thread trying to leave our critical section.

    These never appear in the case of a GUI shutdown (I’m monitoring the messages in Console).

    The first three lines appear in both cases:

    WARNING: The XBMC_HOME environment variable is not set.
    ++ WARN: could not retrieve file info for `image.nrg': No such file or directory
    ++ WARN: can’t open nrg image file image.nrg for reading

    Browsing the Console logs further, these two messages concerning XBMC appeared at some point, too:

    CPSGetCurrentProcess(): This call is deprecated and should not be called anymore.
    CPSSetForegroundOperationState(): This call is deprecated and should not be called anymore.

    Deprecation isn’t fatal, but I thought I should report them anyway.

    I really don’t know what could be causing this. I erased the XBMC app support files before upgrading, so this can’t be due to some inter-version cruft, at least.

    If you think this issue is worth investigating (or even possible to investigate, given its strange nature), just tell me and I’ll file a bug in Trac.

  • inloop deblocking filter decoding in mandatory in the H.264 specification so using the skiploopfilter option in FFmpeg is probably not a good idea. It will not only cause reduced perceived visual quality but it could also generate serious color artifacts to appear.

    Sure it might be fun to test it, but now you have been warned 😛

  • Could PulseAudio be used together with XBMC or PortAudio to do the surround sound downmixing to analog stereo for AC3 and DTS audio streams?

    By the way, how does XBMC handle downmixing to analog on the Xbox?

  • @ Jarkko & elan

    I’m having the same ‘force quit’ problem running on a MBP CoreDuo.

    Don’t know my way around console or logs very well but point me in the right direction and I’ll post some for you if you’d like.


    Very nice work. When the new MBP is purchased, this one will definitely be replaced by a Mini. Cheers.

  • @Jarkko Laiho or anyone else having the shutdown problem. Attach to the process after you’ve exited (but it’s still hanging).

    Use this to look for the process number
    $ ps axuw | grep XBMC

    Attach to process (substitute the process number for xxxx, of course)
    $ gdb /Applications/ xxxx

    Get a list of threads
    (gdb) info threads

    For each thread:
    (gdb) thread x
    (gdb) where

    Send to Pastie and post a link. Thanks!

  • OK. After running gdb and getting a crapload of “warning: Could not find object file “/Volumes/Whopper/Users/elan/Code/Java/XBMC/…(etc)” rows, here’s what happens:

  • @Elan

    Please don’t sacrifice picture quality to get better framerates in OSXBMC.

    For those that have a very fast Mac, we just want the best picture quality no matter what :)

    Of course there should a way for slower machines (Mac Mini’s ie.) to play HD content, but please consider making it an option/setting that can be turned on/off.

    Thanks :)

  • FYI, the FFmpeg devs are currently working on a better “fast option” for H.264 playback with FFmpeg

    [FFmpeg-devel] [PATCH] make fast option with h264 actually do something:

    I think the reason why someone would be willing to use skiploopfilter and sacrifice picture quality is if they got say an older Mac mini connected to a 720p display but they download native 1080p videos that they like to play on that setup. The older Mac mini will not be able to playback that perfectly smooth without some serious compromise like the skiploopfilter.

    Yes but by all means, please make it have an optional setting in the GUI.

  • I have a 1.8 GHz Mini and it have had problems with all 1080p before I found osxbmc.
    I think it is kinda silly that a 1.8 GHz dual core machine can’t play 1080p.
    Well now with osxbmc I can wiew it without any problems.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>