Plex Media Center for OS X Leopard

Archive for January, 2008

Source updates

I’ve been working on getting all my changes checked in, and I’m mostly done. However, there have been lots of merges into the Linux branch from the trunk, and in getting these to build I’ve had to update ffmpeg to a newer revision. This is all well and fine, but I’ve been having some trouble getting ffmpeg to build. Shouldn’t take me too long, but this is why there haven’t been more updates.

Plus, it’s been raining here like crazy, and there’s snow on Haleakala for the first time in years.

11 comments

Release 0.0.7: Let there be Mini support!

A few changes in this release:

  • Support for GMA950-based video hardware, like Mac Mini and some MacBooks. Until this point you’ve had to live vicariously through your larger-mac’d brethren. No longer. Scott kindly helped me out with a remote Screen Share session, and a few more OpenGL calls had to be changed to their ARB cousins.
  • Multi-threaded decoding has been enabled in ffmpeg. This *may* provide a performance boost for H.264 and MPEG2 content. In practice, I haven’t noticed much difference, but feel free to prove me wrong.
  • The postproc/swscale portions of ffmpeg have been hooked up.
  • CPU ID has been partially written, you’ll at least see something on the home screen.

You can pick up the latest release here.

Oh, and my excuse for not getting this done sooner is shown below. We went whale (and dolphin) watching this weekend. Those humpback whales are some elusive bastards, and tended to jump out of the water right after my arm got tired holding the camera up to my eye. Jerks.

IMG_1430.jpg

IMG_1500.jpg
54 comments

Shortest Release Cycle Ever: 0.0.6

OK, I figured out why DTS wasn’t working. I suppose it would help to actually build libDTS. Now passthrough works with both AC3 and DTS for me and Scott, who has a MacBook Pro.

The audio code isn’t perfect yet, but it’s now much more likely to work correctly, and of course, I’d love to hear how it works for you.

Pick up the 0.0.6 binary and also the libDCA binary. Put the latter in the system/players/dvdplayer directory. Yes, I know, it should update itself auto-magically, and tell stories to put your kids to sleep. One thing at a time.

18 comments

Release 0.0.5: Better AC3 passthrough?

OK, my head is still spinning from all the CoreAudio reading and VLC/Portaudio source browsing I’ve been doing. I’ve made a few changes that seem to help out the passthrough situation for people with the combination analog/digital ports and AC3 audio streams. Check it out here.

Note: DTS is definitely broken, I need to look at this more.

No comments

Looking for some help with AC3/DTS passthrough

Specifically, I’m looking for someone with a surround receiver hooked up to run this binary and send me the console output (specifically, the stuff about “Asked to create device…”, “Considering…”, and “Picked…”). I’m trying to figure out why I’m apparently the only one able to do AC3/DTS passthrough.

Please note that there is nothing new about this new binary besides some extra debugging output. It does not work on the Mac Mini. It does not provide a workable solution for solving world hunger.

Thanks in advance for the help.

5 comments

Release 0.0.4: Yummy!

Lots of good stuff in this release:

  • Video thumbnails are auto-generated for stacked files.
  • More OpenGL fixes for GMA950, it **might** work on Mac Mini and Mac Book now. If it doesn’t please paste a stack trace.
  • Optimized, assembly-enabled version of ffmpeg now statically linked in, which means huge performance improvements.
  • Subtitles appear to work for me better (although still haven’t fixed the assert).
  • Fixed a few multi-threaded crashes, it played a Planet Earth last night the whole way without a single crash.

You can see in the picture that I dropped some frames, but this is the super-high bitrate 1080p version of Planet Earth that brings a grown computer to tears.

Have a try with this new release and let me know how it works. Please be sure to include the model of Mac you’re using, and especially what video hardware you have.

Oh, and reports of success with AC3/DTS passthrough would make my day.

untitled.jpg
31 comments

Status with Mac Mini and Macs with ATI video

Just to let you know, there are still problems with GMA950 video cards (used by the Mac Mini). I changed some of the calls from glMultiTexCoord2f to glMultiTexCoord2fARB, but it turns out I missed a bunch more.

On the other hand, I have successfully played high definition MKV videos on my wife’s iMac, which has the ATI Radeon HD2400. NOTE: You must make sure that the video resolution settings *match* between the video settings and the appearance settings (I used 720p for testing). Otherwise you will end up with a white screen, lack of video, and a completely unexpected audit by the IRS.

Version 0.0.3, available here, has one small change, which may or not make any difference at all. It was suggested by the ever-helpful d4rk as a solution to an OpenGL threading issue I was seeing with the debug display turned on.

18 comments

Much progress on video

Changes in this version:

  • Videos play at the right speed, and don’t lock up. Even seeking works.
  • Audio now works during video playback, including DTS and AC3 passthrough!!
  • SDL’s OpenGL vertical sync support is enabled, to avoid tearing.
  • If we can’t open the selected audio device, try opening the default device. Might prevent some crashes.
  • Integrated fix for Mac Mini OpenGL issue, it *should* run there too (but I haven’t tested it).

The hardest piece of work for this release was tracking down a nefarious deadlock in CSharedSection. Deadlocks are a pain in the ass to track down, and the method I’ve always used is quite simple: printf. I run the program inside gdb, wait for it to deadlock, and then backtrack with the printf output to see what went wrong (looking at thread stack traces to see where the threads blocked). Tracking down this particular problem took me about four hours, which is about par for the course. I would have bet money that it was a bug in my code, since I’ve rewritten the critical section and event code (both of which CSharedSection relies upon heavily), but it turned out to be a bug in the class itself.

deadlock.jpg

Once I fixed the problem the movie 187 (my test video, for whatever reason), played through until the end, at turbo speed. I watched it for a few minutes, left the house, and when I returned I had a glorious kernel panic staring at me (although I could see that the movie had ended, at least). I haven’t seen any panics since, perhaps something to do with the fact that playing it so fast taxed the system much harder than usual. Plus it turns out the debug line on the screen (showing memory, CPU, etc.) isn’t thread safe with the video rendering code so that could have had something to do with it too (although it should never kernel panic, of course).

Once I got the audio working (through Portaudio), the video played at normal speed. This was so exhilarating that I started watching Along Came Polly and my wife came and sat with me and we watched the whole thing. (I have to admit, I was half expecting it to crash halfway through, but it didn’t.)

It was about this time when I realized that the mix-down code was ALSA dependent, so my only hope for multi-channel audio was through my surround receiver. I crossed my fingers, redirected the audio to Digital Output, and selected a video with AC3. It worked!!! DTS worked as well, which was incredibly exciting, because I’ve never found another application on OS X which could do DTS passthrough. No speaker-abusing audio glitches, either, like those that happen with some of the applications that try to feign passthrough with QuickTime. The way I’ve coded it is that if encoded digital audio is to be played, it looks for an output with “Digital” in it (thanks to the people who contributed data on this!). Otherwise it plays to the selected output in Audio Hardware. This isn’t perfect, but it’s probably a decent first take.

After fixing a few more bugs (seeking, OpenGL threading weirdness), and just for giggles, we decided to try to watch our nightly Six Feet Under on our Sony TV, which is connected to the second DVI port on my Mac. I changed the XBMC resolution to 1080i (and had to change it in the video settings as well), and moved the window over to the second display (with Anna yelling from around the corner “right…up…a bit more….stop!”) and we watched S03E03. Worked perfectly. One interesting note: Since it wasn’t officially full-screen, the first display wasn’t black, so it would have been possible to check email or do something else while the other person was using XBMC. This is an advantage over Front Row, which takes over your entire display.

IMG_1400.jpg

Next up:

  • Use an optimized, assembly-enabled (and non-buggy) ffmpeg.
  • Get full-screen display working.
  • Lots of other bugs…

At that point, it should be possible to actually to use XBMC on a TV with a halfway decent experience, and certainly better than that which Front Row offers.

I uploaded the new binary (why bother uploading an entire new package, right?) here. Enjoy!

25 comments

Audio hardware poll

I’m looking for some input into the names of audio outputs on different Mac models (e.g. “Internal Speakers”, “Line Out”, etc.) I’m especially interested in the names of your digital outputs. If you could post them in the comments I’d be very appreciative.

Some good news is forthcoming.

18 comments

Fix for video problems on ATI

For those of you who experience a green screen when viewing videos, download this new version. I’ve disabled the ATI-specific OpenGL renderer, since (a) I’m not quite sure what its raison d’être was and (b) it was causing trouble on OS X (and apparently Linux, as well).

Anyway, ATI users should have better luck with this version. This doesn’t mean video is actually working, but hey, it might render a few frames for you. In order. At some random speed. But beggars can’t be choosers, right?

5 comments

Next Page »

Support Plex

Mmmmm...Beer!

Contact Me

elan at plexapp dot com
  • Meta

  • Recent Comments

    • Mickey"oops I am late :( Happy Thanksgiving Elan and everyone celebrating it! I make a toast to all the things done..."
    • sham"I installed plex 7.1 for the first time yesterday, being a long time htpc guy (done dev for freevo, mce xp, mce..."
    • Anton"Hi, Thanks for the app. I’ve switched from Sapphire, some things I love some thing I hate. Overall great..."
    • Jakob Metzger"ok, yea. I kinda figured that out. I noticed that it is exactly the same OSD as the regular iTunes..."
  • What I'm Doing...

  • Archives