moonlight-stream / moonlight-ios

GameStream client for iOS/tvOS
GNU General Public License v3.0
1.12k stars 284 forks source link

Port to Apple TV #184

Closed kaeltis closed 4 years ago

kaeltis commented 8 years ago

From what I've read, porting from iOS to Apple TV should be fairly easy - would be awesome to see moonlight on the new Apple TV :heart_eyes:

jeaz commented 8 years ago

Yeah, that would be an awesome addition.

awaescher commented 8 years ago

+1

Maimberis commented 8 years ago

would love to see this as well now with the app store on the new Apple TV

InfernoDigital commented 8 years ago

I agree! It would be way easier than streaming from an iphone to it!

basvroegop commented 8 years ago

This would be amazing. Though I'm not sure how you'd handle the on-screen controls for start, select, L3 and R3.

kaeltis commented 8 years ago

Afaik the AppleTV supports some controllers - or just use one connected directly to the PC.

basvroegop commented 8 years ago

There's support for official MFi controllers, but those don't have buttons for start, select, L3 and R3. The app solves this on iPhone and iPad by showing virtual buttons on the screen, but that won't work on Apple TV.

That being said, seems like KinoConsole solved this by showing a dropdown for those buttons when hitting the menu button on the controller. It's not perfect, but should at least get things through Apple's approval.

Anyway, noticed I was a bit early posting here. Turns out the Apple TV-version has already been discussed and seems like they're at least investigating that. Heres the thing @mrb113 posted a while back:

https://github.com/moonlight-stream/moonlight-ios/issues/177

InfernoDigital commented 8 years ago

@basvroegop Wow! Thanks for that link! I hope they "investigate" further now that the iOS app has been released. Using an AppleTV to stream PC games would be an awesome, cheaper alternative to a SHIELD.

basvroegop commented 8 years ago

Yeah, agreed! Recently got a Steam Link, but Moonlight actually performs a lot better. Would be great having this on the tv instead.

InfernoDigital commented 8 years ago

Yeah, at the moment I just have moonlight on my Ipad mini, but we have an old AppleTV, and if we ever upgraded to the new one I'd definitely want this on it!

SvatoplukHus commented 8 years ago

it is the right move, any ETA?

mrb113 commented 8 years ago

Thanks for letting us know which platforms you guys would like to see Moonlight on in the future. We are investigating the feasibility of this - if, in the future, we commit to bringing Moonlight to AppleTV, we will provide an update. For now, I am marking this as a feature request.

basvroegop commented 8 years ago

Noticed someone made an unofficial Apple TV port. No repository for it yet though. Here's hoping! http://www.macrumors.com/2015/12/02/apple-tv-pc-game-streaming/

Aghassi commented 8 years ago

@basvroegop Unfortunately the guy who did that hasn't published his source code. @dwaxemberg is looking into it I'm pretty sure. It is just a matter of porting at this point. In due time.

kevsmithpublic commented 8 years ago

That guy just did :-) I needed to sleep, now posted to Github https://github.com/kevsmithpublic/moonlight-ios

Just a note, I did this as a quick and dirty port so I could use it, I'm sure the original developers will do a proper port in due course.

Aghassi commented 8 years ago

@kevsmithpublic You rock, thanks man! @dwaxemberg and I will have a look when we get a chance. Thanks!

basvroegop commented 8 years ago

You're a real hero, @kevsmithpublic. Thanks a ton! Time to bag my Steam Link again.

mrb113 commented 8 years ago

Thanks @kevsmithpublic! We're all excited to see your port. We plan on pulling in as much of your work as is possible if we're able to make a tvOS port.

For the rest of the community wondering what the holdup is on the official Moonlight end: We can't use what Kevin did to submit to Apple. He had to modify the SDK to enable some functionality Moonlight is depending on - we obviously can't submit something like that to Apple. We're following up to figure out what we can do to make a tvOS port that we can ship on the App Store.

Rest assured that it's one of our top priorities right now. Thanks for bumping this issue and letting us know that a tvOS port is important to you guys!

basvroegop commented 8 years ago

Great to hear, @mrb113!

I just installed @kevsmithpublic's port and it seems to work great. I'm no developer though, so it took me a while to find the file he references to on his repository. Reached it via the following route eventually:

Rightclick the Xcode program > Show package contents > Contents > Developer > Platforms > AppleTVOS.platform > Developer > SDKs > APPLETVOS.sdk > System > Library > Frameworks > AVFoundation.framework > Headers > AVSampleBufferDisplayLayer

Needed to rightclick the folder it was in, hit 'Show info', hit the lock at the bottom and give myself permission to write in that folder first, though.

Really smooth experience so far at least! Only problem I really ran into was a glitchy settings tab on the left, which means you can't really change the bitrate or resolution like on iOS.

ceesco53 commented 8 years ago

If I want to aid in developing this, should I base from @kevsmithpublic port for now? I plan on using the stratus xl steel series controller.

Edit: the steel series nimbus controller looks to be made for the Apple TV. I'll use that too, but I don't have one yet.

Aghassi commented 8 years ago

@ceesco53 It would be better to start with the Moonlight source, and build fresh then work with @kevsmithpublic modified version. As @mrb113 mentioned, that version uses a modified version of the SDK, which we can't publish to Apple's App Store. That doesn't mean however you can't mirror some of what was done in the other port, as long as it isn't the modified SDK part.

cgutman commented 8 years ago

The AVSampleBufferDisplayLayer issue will bite us whether or not we use Kevin's code. TvOS's docs say that AVSampleBufferDisplayLayer should be available, so I've filed a bug report with Apple.

In the meantime, we anyone who wants to help should grab either Kevin's source or the code in master today and begin fixing tvOS incompatibilities.

ClintChil commented 8 years ago

I looked into porting moonlight to tvOS last month and ran into the AVSampleBufferDisplayLayer prohibited in tvOS issue.

After some searching, someone suggested using software decoding as a work around. That's where I gave up on my fork because I figured losing hardware based decoding would have too big of an impact on performance.

Here is a list of prohibited classes and methods in tvOS:

https://gist.github.com/gonzalolarralde/fb9bd2b164e88a287ad8

swallace17 commented 8 years ago

This would be awesome! If an official port is not currently possible due to issues with hardware decoding and private API's as suggested by ClintChil above, is there any possibility the official team would take kevsmithpublic's approach involving modifying the SKD, make the process more official and available for side-loading via X-Code only?

Or is an official version using permissible methods/classes a real possibility?

at45 commented 8 years ago

Putting in a comment to follow-up on this, is there any updates yet?

mrb113 commented 8 years ago

We are not going to modify the SDK in order to release Moonlight. Any release for Apple TV will be on the App Store and modifying the SDK is not permissible there.

As far as I know, the relevant APIs that we need for Moonlight to work are still not available for use on Apple TV. We are investigating if this will be fixed by Apple in a later update. As Cameron said, he's filed a bug with them. All we can do now is be patient :smile:

amolloy commented 8 years ago

Out of curiosity, has anyone filed a RADAR bug with Apple requesting they make this API available to tvOS? On the one hand, I feel like a lot of the "TV Prohibited" APIs were ones they probably just didn't get a chance to vet in time to ship. On the other hand, there may be actual reasons the API in question has been marked prohibited, and there's a reasonable chance Apple won't do anything about it one way or the other without at least one issue logged in their database.

mrb113 commented 8 years ago

As @cgutman said,

TvOS's docs say that AVSampleBufferDisplayLayer should be available, so I've filed a bug report with Apple.

amolloy commented 8 years ago

Sorry, missed that.

On Fri, Jan 22, 2016 at 12:19 PM, Michelle Bergeron < notifications@github.com> wrote:

As @cgutman https://github.com/cgutman said,

TvOS's docs say that AVSampleBufferDisplayLayer should be available, so I've filed a bug report with Apple.

— Reply to this email directly or view it on GitHub https://github.com/moonlight-stream/moonlight-ios/issues/184#issuecomment-173983067 .

manacker commented 8 years ago

Unfortunately there seems to be no change in the availability of AVSampleBufferDisplayLayer in the just released tvOS 9.2. :(

killnine commented 8 years ago

@manacker That's really disappointing. Is there anything developers can do to bring it up as an issue with Apple?

manacker commented 8 years ago

@killnine Duplicating the Bug report seems to be a common method to bring something to Apples attention. I'm not sure how to do this though.

Aghassi commented 8 years ago

http://bugreport.apple.com is the place to go to submit bugs. You can then let the community see by filing them on http://openradar.me.

killnine commented 8 years ago

Opened a ticket: 25661358 Copied to OpenRadar with details: http://www.openradar.me/25661358

If you've also opened a ticket, update post to include as well so we can raise visibility. Thanks!

manacker commented 8 years ago

Duplicated as http://www.openradar.me/25662575

ajmi982 commented 8 years ago

Managed to load the TVos build @kevsmithpublic pulled together a few months back. Followed instructions exactly and Moonlight on TVos sees my PC. I click to pair, gives me a code, PC has a window for me to enter my code, i enter it... Apple TV says Pairing Failed, Incorrect PIN.

I checked to see if they were on the same network, they are.

I checked to see if i could pair my iphone 6s plus with my PC, i can.

What could be going on here? Hope someone has an answer, thank you.

at45 commented 8 years ago

This could be due to the recent update in GE, not being compatible with that TVos build. I had managed to solve this by installing the previous version of GE.

_____________________________

From: ajmi982 notifications@github.com Sent: Thursday, April 21, 2016 7:15 AM Subject: Re: [moonlight-stream/moonlight-ios] Port to Apple TV (#184) To: moonlight-stream/moonlight-ios moonlight-ios@noreply.github.com Cc: Comment comment@noreply.github.com, at45 alitunalioglu@gmail.com

Managed to load the TVos build @kevsmithpublic pulled together a few months back. Followed instructions exactly and Moonlight on TVos sees my PC. I click to pair, gives me a code, PC has a window for me to enter my code, i enter it... Apple TV says Pairing Failed, Incorrect PIN.

I checked to see if they were on the same network, they are.

I checked to see if i could pair my iphone 6s plus with my PC, i can.

What could be going on here? Hope someone has an answer, thank you.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

ajmi982 commented 8 years ago

after some more diggin @at45 i think you are right. Do you know what version of GE i need to go down to? OR, how easily the TVos build could be modified to support the latest GE version? It appears no work has been done on the TVos build for many months unfortunately.

awaescher commented 8 years ago

@ajmi982 For me, GE v2.4.5.57 did the job. I had the same issues with paring my AppleTV as you described. Just try it with the mentioned version from here: http://us.download.nvidia.com/GFE/GFEClient/2.4.5.57/GeForce_Experience_v2.4.5.57.exe

maddox commented 8 years ago

@kevsmithpublic Would you mind pulling master into your tvOS fork so that things run and pair again with the most recent version of GE?

ajmi982 commented 8 years ago

Second @maddox that would be great!!

JustAnotherPU commented 8 years ago

@kevsmithpublic can you please fix it with the new GE version ?

Also can i install it via SSH since my Apple TV 4 is jailbroken or atleast doing it via wifi cause i dont have a usb type C cable.

Thank you

apocolipse commented 8 years ago

@maddox @ajmi982 @JustAnotherPU I rebased @kevsmithpublic's work with upstream changes here, https://github.com/moonlight-stream/moonlight-ios/pull/226 Still requires modifying headers but will now connect with latest GE, also added in working settings page.

ajmi982 commented 8 years ago

Fantastic. Where can we pull the latest code to update our boxes?

Sent from my iPhone

On May 16, 2016, at 11:07 AM, Chris Simpson notifications@github.com wrote:

@maddox @ajmi982 @JustAnotherPU I rebased @kevsmithpublic's work with upstream changes here, #226 Still requires modifying headers but will now connect with latest GE, also added in working settings page.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

apocolipse commented 8 years ago

@ajmi982 Clone from my fork's master (https://github.com/apocolipse/moonlight-ios) or fetch the PR #226 on the main repo

git fetch origin pull/226/head:tvOS
git checkout tvOS
ajmi982 commented 8 years ago

Ok great. I'll give it a shot and report back any issues. Still a github noob

Sent from my iPhone

On May 16, 2016, at 11:10 AM, Chris Simpson notifications@github.com wrote:

@ajml982 Pull from my fork's master or fetch the PR #226

git fetch origin pull/226/head:tvOS git checkout tvOS — You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

ajmi982 commented 8 years ago

Chris are you available to lend support?  Im trying to "check out" your github "apocolipse/moonlight-ios" but its getting hung up at 54.3MB, also i saw the instructions but have no idea how to execute them.  Sorry for being such a n00b.

|

apocolipse/moonlight-ios moonlight-ios - GameStream client for iOS | |

|

|

On Monday, May 16, 2016 11:16 AM, Anthony M <ajmi982@yahoo.com> wrote:

Ok great. I'll give it a shot and report back any issues. Still a github noob 

Sent from my iPhone On May 16, 2016, at 11:10 AM, Chris Simpson notifications@github.com wrote:

@ajml982 Pull from my fork's master or fetch the PR #226 git fetch origin pull/226/head:tvOS git checkout tvOS — You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

ajmi982 commented 8 years ago

managed to pull into xcode and already had the header file fixed since i was running older version of Moonlight on TVos, trying to build your version and getting a ton of errors.  No idea how to fix. Any help would be appreciated.

On Monday, May 16, 2016 11:10 AM, Chris Simpson <notifications@github.com> wrote:

@ajml982 Pull from my fork's master or fetch the PR #226 git fetch origin pull/226/head:tvOS git checkout tvOS — You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

apocolipse commented 8 years ago

Make sure you init the submodules

git submodule update --init --recursive
ajmi982 commented 8 years ago

yeah i dont know where to type that code? i have just been using source control in xcode, this github stuff is very new to me.  I noticed that command but just dont know where to run it.

On Monday, May 16, 2016 1:17 PM, Chris Simpson <notifications@github.com> wrote:

Make sure you init the submodulesgit submodule update --init --recursive — You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub