Plex Media Center for OS X Leopard

Archive for the 'Coding' Category

A Quick 1080p Tip

For some reason, OS X seems to be reluctant to output 1080p to TVs, and usually defaults to 1080i. At first I thought it was the cable (a 50′ HDMI cable purchased from Eforcity for $40), but that turned out to work perfectly. The problem was that the only option for 1920×1080 that showed up in the Displays System Preference was interlaced.

However, when I checked the “Show displays in menu bar” option, lo and behold, there were two options. Both of these looked exactly the same, but when I switched between them, I found that one was 1080p and the other was 1080i.

I found this to be the case on both Macs I tried it on, so check your TV and make sure you’ve got progressive mode enabled!

untitled.jpg

23 comments

Release 0.4.5: An interim release

The Apple Remote work is taking a bit longer than I expected, so another release is probably a good idea, to share some of the bug-fixes and new features that are complete. Here are the changes in this release:

  • NEW: High quality software upscaling is now supported. You can specify preferences in Video -> Player as to when the scaling is enabled and what scaling algorithm is used. This makes a huge difference when viewing SD content. It takes quite a bit of processing power, but the good news is that decoding SD content doesn’t.
  • NEW: Monitor blanking is now supported. When selecting a full-screen mode, you have the option of telling XBMC to blank the other monitors. The preference is in Appearance -> Screen. I suspect Martin will be happy that he can stop throwing a sweater over his iMac, which sounded like a total fire hazard to me.
  • NEW: The built-in web server now works. Among other things, it serves as an alternate remote control for those of you using a laptop as an expensive remote. Make sure to set a port above 1024.
  • NEW: You can now store your own skins in the /Users/XXX/Library/Application Support/XBMC/skin directory, to avoid having to move aside and reinstall skins every time you upgrade. Thanks to d4rk for coding this up!
  • FIX: A crash when reading WMA files.
  • FIX: The OS X mouse cursor sometimes made an unwelcome appearance in full-screen mode.
  • FIX: Settings that made no sense for OS X have been removed to reduce confusion.

The XBMC source has been updated to near-trunk as well, which means a host of improvements and fixes. Note that the new music library features may still have some kinks, but hopefully things work pretty well for you.

We’ve got some good stuff in the pipeline for 0.5.0, including the improved Apple Remote support and some display/computer sleep stuff that Cayce’s been working on.

Also, as a side note, if you have a moment, register your usage of the application on http://osx.iusethis.com/. I’ve tried to update the version on there, but unfortunately someone else “owns” the application and doesn’t seem willing to give it up.

And now of course, the moment you’ve all been waiting for.

IMG_1735.jpg

65 comments

High quality upscaling in next release

OK, I just adding software upscaling as a full-fledged feature for the next release. Both bicubic and lanczos upscaling is selectable, and you can enable it for SD content only, or if you’re feeling like making your CPU sweat, for all content (meaning 720p is upscaled to 1080p using the same algorithms, and — to my eyes, at least — little visual effect).

untitled.png

I think the next thing I want to look into on the quality front is ffmpeg’s ability to post-process. If you look at the bottom of this page, you’ll see what looks like a very impressive example of (I think) a deblocking filter. It even looks like the XBox XBMC code had preferences for post-processing (with mplayer), but they were lost in the port to Linux (which doesn’t use mplayer). If anyone out there has experience with ffmpeg and knows some good settings to use, please let me know.

14 comments

Experimenting with Bicubic scaling

So for lack of anything better to do, I played around with getting swscale (a component of ffmpeg) to attempt performing high quality software upscaling. By default we perform bilinear upscaling, and with SD content, it looks pretty crappy, with lots of jagged lines.

After getting it to work, I took a couple of screenshots to show you the difference. In terms of performance, my desktop had enough power to do bicubic upscaling of both SD and 720p content to 1080p. It has to be said that it is definitely an expensive operation.

The win was most obvious — to my eyes, at least — with SD content. Here’s a sample from the intro of a movie. The first is bilinear (notice the jagged circle), and the second is bicubic.

bilinear.png

bicubic.png

Pretty nice, right? Now let’s try 720p, with some good diagonal lines taken from Kevin Spacey’s jawline:

bilinear2.png
bicubic2.png
Again, the first is bilinear, the second is bicubic. The screenshot is unfortunately not taken from the same exact frame, and I think that’s why his face looks more “textured” in the second shot. But you’ll also notice that there doesn’t appear be a great deal of difference between the two. It’s possible that I didn’t pick a very good spot, but it’s also possible that the difference between the two algorithms doesn’t really kick in until you’re doing more than a 2x scaling. This kind of makes sense to me, but it’s late and I’ve been drinking.
8 comments

Roadmap improved

We’ve restructured the milestones on our Trac site to correspond to specific versions and better illustrate the bugs and features that will make it into these versions. A few things to note about this:

  • When you’re reporting a bug or requesting a feature, please leave the milestone blank! Please do indicate the version for bug reports.
  • We’ll decide which milestone (if any) will include the bug-fix/feature based upon a few things: the number of comments the ticket receives, how difficult it is to implement/fix, and how important it is to our core user group, comprised primarily of our wives and Barkley. (Hence, anything requiring opposable thumbs is out.)

Remember, the more detailed the bug report, the more likely it is that (a) we’ll look at it and (b) we’ll be able to fix it.

Thanks!

5 comments

Release 0.4.0: Python and Virtual File System

It’s been hell trying to get anything done lately. A friend is in town getting married and we’ve been partaking in all the wedding activities, which involve an ungodly amount of high quality alcohol. And we all all know how alcohol and coding don’t mix.

Anyway, better late than never. We’ve decided to push the version number up a bit more than usual, to reflect the major changes in this version:

  • NEW: Work has been completed on the Mach5 Ruby script, which processes Mach-O library files and performs mapping on symbols (so that printf calls __wrap_printf, for example). This enables the XBMC virtual file system to work. I’ve processed all the libraries, so we should be good to go. What this means in practical terms is that things like reading images over SMB shares should now work.
  • NEW: Relying also on Mach5 is Python scripting support, new to this release. I will note first and foremost that Python support is unstable, and crashes a lot. This is a known problem with the Linux port of XBMC too, and I consider it a high priority issue. However, Python is stable enough for you to play a few games of Tetris, or even view some Apple Movie Trailers (remember that 5-channel AAC support is lacking).
  • UPDATED: I’ve updated ffmpeg to the latest trunk, and added a few XBMC patches that were missing. Certain MKV files that wouldn’t play at all or would crash will now work.
  • UPDATED: The XBMC code is near trunk as well; I’m missing a bunch of changes that went in the day or two, because I haven’t had a chance to test things out.
  • FIX: Bug #141 has been fixed (XBMC crashes when changing aspect ratio with the “z” key).
  • FIX: Bug #106 has been fixed (Initial graphics glitch when playing a movie). Thanks to d4rk for helping me out with this fix.
  • FIX: The skin hang-on-exit problem (which I worked around) was actually fixed by charlydoes. Unfortunately I’ve noticed that Python can cause a similar problem.
  • FIX: Bug #135 has been fixed (Playing Apple Lossless files in Library mode doesn’t work).

There is also a known issue in this version with loading RAW files. I worked for a while today trying to work around it, to no avail. Essentially, the problem is that the performance reading the RAW files (which appear to be read byte by byte) is extremely bad through XBMC’s VFS layer. I tried to enable some file buffering, but I wasn’t able to get it to work.

This photo of Barley illustrates how I feel after the last week…

IMG_8408.jpg
35 comments

XBMC and Google Summer of Code

XBMC is participating in the most excellent Google Summer of Code this year. You can see a list of some ideas for projects over here and discuss in the forum. There are a few days left for submitting applications, so if you’re interested, by all means go for it! This would be a fun project for a student to work on and get paid for doing so.

1 comment

More Python goodness

I fixed a few more issues with Python, and now Apple Movies Trailers work! Browsing, playing, it all works. I did need to replace some of the Python libraries in the downloaded script with the OS X version. This raises the issue of how to support downloading scripts for different platforms, when the scripts need binary components.

trailers.png
10 comments

Good news and bad news

The good news is that I’ve made substantial progress in getting Python to work in OSXBMC. The bad news? I’m now addicted to the Tetris script and likely won’t get much more work done this weekend.

There are still some issues to be figured out, but hopefully I’ll be able to make a release this coming week with Python enabled.

(This also means that the Mach-O processor that wraps some stdio/stdlib calls seems to be working, which means that the full power of XBMC’s virtual file system should work once I run the processor on all the libraries. Which means thumbnails over SMB and probably lot of other things.)

Now I have to get back to Tetris.

tetris.png
Luckily my C++ is better than my Tetris

untitled.png
Downloads the zip, but is unable to unzip it.
10 comments

Working on Python and VFS

Why so quiet lately? I’ve been working on a tool that processing Mach-O shared libraries and remaps symbols, so that libraries that we load inside OSXBMC call our own versions of some functions. This is needed in order to make paths and virtual file system behavior work (e.g. so that ImageLib can be told to open “smb://…..”).

Having this working will not only allow scripts to work (with correct paths, especially), but will also fix a number of problems people have reported like “Thumbnails don’t work over SMB shares”. At least, that’s the theory.

mach5.png

I’ve gotten things near working to the point where the resulting libraries appear to be valid, and hooked functions are getting called, but now I’m running into some other issues. If you’d like to take a peek at the code for the Mach-O processor, it’s here.

8 comments

« Previous PageNext Page »

Support Plex

Mmmmm...Beer!

Contact Me

elan at plexapp dot com
  • Meta

  • Recent Comments

    • elan"@Spence: The iTunes visualizers are just not really meant for an OSD, as they usually display their own album..."
    • elan"@breakfingah: Good idea, please file a feature request on Lighthouse :) @Koxman: Crackling sound at start of..."
    • theTraveler"What a great an innovative release! Plex team is truly amazing. You make Front Row look like an entry..."
    • DJ Rick"I’ve been using Plex a long time now, especially for playing HD content, better then VLC (also when..."
  • What I'm Doing...

  • Archives