PlexConnectApp (working title) - PlexConnect for AppleTV4 clone

History tends to repeat itself:

  • a couple of years back, I didn’t know how to spell “Python”. But with from great idea of DNS hacking and some stubbornness, PlexConnect was born.
  • now, until recently, I really didn’t care to much about “Swift”. But Apple’s Server/Client architecture with TVML/TVJS really did smell like out old XMLConverter.
    So it goes: Learning a new language, gathering information throughout the web, hacking stuff together… along comes PlexConnectApp (working title), with XMLConverter rethought and rewritten in Swift, with XMLTemplates translated to TVMLTemplates, without the DNS part, 'cause we just don’t need it anymore.

I would like to see that thing fly. It’s Open Source, we all know the address: GitHub - iBaa/PlexConnectApp: PlexConnect clone for AppleTV4 / tvOS
Feel free to have a look and play around. Yes, today you need OSX/XCode… but we are all developers of some kind aren’t we?
Not sure about the distribution model, I guess it will need to go through the AppStore, at some minor cost, it would have to pay for an AppleTV4 plus Apple’s developer program.

It’s not ready, it’s far from done yet. I even haven’t tested it on real hardware…
therefore looking for swift/js developers for code review and bug fixes, layouters and artists for views, thumbs and icons, testers for feedback, translators for the localization to come, a mechanic to fix my car.

Before you leave, let me give a toast to…

  • Apple. For - well, you know - their support with PlexConnect (cough…), their hardware, but mainly the documentation in the developers’ area.
  • stackoverflow.com. For the great knowledge database around coding. I had no need to post a question, everything was basically readily answered beforehand. Well, nearly.
  • raywenderlich.com. For their nice tutorials. And no, they don’t write my paycheck.
  • all the other unnamed sources of tips, tricks and hints, sometimes seemingly hidden in the last corner of the webs.

Not to stress you to much with reading any more: Life is good! Have fun!

Edit 14Nov15 // 19Nov15:
Couple of weeks later - I will try to keep this list updated. Treat it as the one-stop information point for the state of our business for now. Total feature list is pretty much the current state of well known PlexConnect.

Implemented:

  • myPlex sign in/out
  • PMS discovery using plex.tv
  • own/shared libraries, local and remote
  • basic layouts for movies, tv shows, music, photos
  • direct play/transcoding for video, audio
  • pretty simple photo presenter/slideshow
  • search (per library, or “all” from the main menu bar)
  • continuous replay of media from one folder
  • playlist (video/audio) (14Nov15)
  • modal/overlay/context menu - applied to Episodes thus far (19Nov15)
  • resume video (30Nov15)
  • shuffle playlist/tracks (02Dec15)
  • stacked media (04Dec15)
  • channels (20Dec15)
  • myPlex Home user (23Dec15)
  • myPlex Queue under playlists (04Feb16)

Open (as in not yet implemented)

  • PlexGDM, PMS per IP
    - myPlex Home user
  • subtitles, selecting and non-tvOS, in-App rendering
  • audio track selection
    - channels
  • more settings/options (as needed)
    - playlist (video/audio)
  • fanart, background graphics, skining/themes
  • theme music for movies, tv shows
    - shuffle, start continuous replay at specific track
    - modal/overlay menus (all kinds of… change artwork, jump to, the list goes on)

Man… and I thought the “done” list should by now be much longer compared to the open items. :frowning:

So this would be a official app for the aTV4 if approved of course? My other question is will PlexConnect (the original app hijacking way from the original github) still be able to be used for aTV4 as in would the code be modified to detect aTV4 then serve the proper XML’s for TVOS. I read this so I’m guessing if it can be worked out that is a yes:

https://forums.plex.tv/discussion/191385/plexconnect-works-fine-with-the-new-appletv#latest

I guess it could be brought to the AppStore. I just don’t know if it’s worth proceeding. What would/could be the advantage of this app over the Plex Inc.'s one - which is free on top of it?

PlexConnect to hijack aTV4 trailers…
I read that it is possible now - actually this is the way I thought it would, though I was kind of cold-sided to learn, that there is no pre-installed trailers app.
There is only one question on my side: “Why?” Why jump through the hoops if you can do it the easy, elegant way, without another PlexConnect host needed. Why take the limitation and documentation issues of the old aTV-XML language, when aTV4’s TVML provides so much more?

I didn’t notice at the time that they had made that app available to the aTV4. What I meant to say was could PlexConnect detect the aTV4 and serve TVML to it just like xml’s are served to atv2/3?

@baa said:
I guess it could be brought to the AppStore. I just don’t know if it’s worth proceeding. What would/could be the advantage of this app over the Plex Inc.'s one - which is free on top of it?
Well with out own app we can make it look and work exactly the way we want it to, good luck getting Plex Inc to add in any of the small interface tweaks you want or customisation options :frowning: Plus it’s fun… :smiley:

wahlman: No, you can’t just serve TVML files to aTV4. You would still need an App on there to push it further to the screen.

roidy: Yep. It’s fun. I just miss to see the big differentiator…

Gotcha, Just was curious how that worked. Thanks for the clarification :slight_smile:

@baa said:
wahlman: No, you can’t just serve TVML files to aTV4. You would still need an App on there to push it further to the screen.

roidy: Yep. It’s fun. I just miss to see the big differentiator…

Biggest plus for me would be we having a way to further customize the UI, making it more functional for our family needs.

Count me in, although I’m not sure how much I can help - my programming skills suck:) Anyhow, just downloading updated XCode and will try to give it a look. I suppose running it in simulator should not be such a problem but how would I transfer it to ATV4?

Well, I just bought an ATV 4 so I can beta test when you are ready. The official Plex app is fine but could definitely be improved upon.

@institute11 said:
Well, I just bought an ATV 4 so I can beta test when you are ready. The official Plex app is fine but could definitely be improved upon.

+1

OK, builds with some warnings but runs mostly fine in simulator. Playback works as well.

What I like already is that it is using old PlexConnect template for the shelves - you have full 7 posters in each row, which IMHO hits the sweet spot between number of movies presented and poster size. It starts at OnDeck item in top menu bar but I guess it could be made configurable to “All”. That would mean that children can use their media without even knowing there is a top bar with other options.

Recently Added and Released shelves follow - again, still most logical layout IMHO. I guess “Discovery” shelves could be added at the bottom in case they are really needed. I still see them as something content sellers enforce in order to sell or rent you movies. Posters on RA and RR shelves are too small IMHO but I guess you made it like that deliberately in order to test the possibilities.

Tested on my Apple TV 4, the app has no icon, but works fine.
Looks great (as PlexConnect is).
No carousel or any images displayed on the main screen, just the library names list (sad).
Library display is perfect, love it.
Replay screen is beautiful too, just hope you will add Audio/Subs options button soon :wink:
So during the video play, I can’t choose subtitles, always transcoding with first sub (or default one ?), no direct play.
But I know it’s an early version, so I think it’s normal that everything’s inside.
Great work !

Hm. DirectPlay/DirectStream does work on my side. The only explanation I have is as follows:

  • your movies are not m4v, so PMS needs to (at least) direct stream the file
  • when watching the stuff earlier and with another client, you actually selected a subtitle. This is remembered by PMS, and once we request the transcoder to jump it, it will add that, too.

For now, switch of the subtitle on that media using Plex/Web or something else. Or modify PlexAPI.swift around line 373. Uncomment and force skipSubtitles:

        //args["subtitleSize"] = subtitle["size"]
        NSURLQueryItem(name: "skipSubtitles", value: "1"),  // shut off PMS subtitles. Todo: skip only for aTV native/SRT (or other supported)

Thanks Baa, works better now.
I continue some tests (will try some movies tonight)

@dale_coop Are you having any audio issues when Direct Playing files on real hardware?

I’ve got the app running on my aTV 4, when I play anything that’s transcoded the audio is fine, however when I play a file that Direct Plays the audio has an echo sound to it, like the channels are being mixed incorrectly.

If I run the app in Xcode’s simulator then both transcoding and Direct Play work fine, it’s only on the actual hardware I get the problem. Could you test on your hardware to see if you have the same problem. Thanks.

@roidy I don’t have that problem. But I will try again with some movies…
Direct stream is ok, audio is ok (AAC 2.0). I will try to test with different audios.

Anyone care to explain how to transfer the app to ATV4?

  1. Pull the GitHub.
  2. Open PlexConnectApp in Xcode
  3. Connect your aTV4 to your Mac using a USB-C cable, the aTV needs to be powered on already , mine is also connected to a display, not sure weather it work if no display is connected.
  4. Change the active Scheme to your aTV device.
  5. Press the play button :slight_smile:

pecinko: https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html
Haven’t done it myself yet…

@dale_coop Yep, I can Direct Stream and Transcode ok, but not Direct Play. I thought it was a PlexConnect problem, but I just downloaded the official Plex Client and that has the same Direct Play problem, I guess it’s a PMS issue.