moonlight-stream / moonlight-common-c

Core implementation of Nvidia's GameStream protocol
GNU General Public License v3.0
448 stars 166 forks source link

GFE 2.11.2.46 and RTSP SETUP streamid=audio request failed: 404 #16

Closed dead closed 8 years ago

dead commented 8 years ago

Moonlight Embedded 2.1.4 (EMBEDDED;PI) Searching for server... Connect to 192.168.1.2... NVIDIA GeForce GTX 980, GFE 2.11.2.46 (protocol version 7) Stream 1280 x 720, 60 fps, 10000 kbps Initializing platform...done Resolving host name...done Starting RTSP handshake...RTSP SETUP streamid=audio request failed: 404 failed: 404 ^CCleaning up platform...done

cgutman commented 8 years ago

I'm aware of this. I've got most of the protocol changes figured out.

Pairing had some changes (replacing SHA-1 hashing with SHA-256) so we'll need to update clients that rely on moonlight-common-c individually - https://github.com/moonlight-stream/moonlight-common/commit/4560fa40d5f526442ff6cb112cf813263f2a6cbc

RTSP changed a bit but it was easy to fix (haven't pushed yet). Video and audio both look fine. The control protocol seems the same as Gen 5, though I believe the remote input stream encryption has changed from AES CBC to AES GCM. I suspect that's the only change (similar to pairing), but I'm still working out the specifics there.

dead commented 8 years ago

That's weird, pairing is working fine here. Just had to revert some stuff in moonlight-embedded that was not working. (https://github.com/irtimmer/moonlight-embedded/commit/016ac91c1c19f868cc46cac5b4d794b414b8d74e) Thanks for the reply :smile:

dead commented 8 years ago

Just saw that OpenAES does not support GCM, what are you guys planning to use instead?

cgutman commented 8 years ago

I'm going to use OpenSSL. It's already being linked to on Moonlight iOS and Moonlight Embedded.

dead commented 8 years ago

I was messing around here with OpenSSL and EVP trying to make this work... It's not working but I think it's almost done https://gist.github.com/dead/5c65902e16dc290fc8b63c2e1baf6b2f Probably I'm missing something...

cgutman commented 8 years ago

Fixed

dead commented 8 years ago

I'm getting:

Initializing platform...done Resolving host name...done Starting RTSP handshake...done Initializing control stream...done Initializing video stream...done Initializing audio stream...done Initializing input stream...done Starting control stream...done Starting video stream...done Starting audio stream...done Starting input stream...done Error: cannot keep up Control stream received disconnect event Loss Stats: Transaction failed: 11 Stopping input stream...done Stopping audio stream...done Stopping video stream...done Stopping control stream...done Cleaning up input stream...done Cleaning up audio stream...done Cleaning up video stream...done Cleaning up control stream...done Terminating RTSP handshake...done Cleaning up platform...done

cgutman commented 8 years ago

What code are you running?

dead commented 8 years ago

I'm using https://github.com/dead/moonlight-embedded and the latest moonlight-common-c

cgutman commented 8 years ago

The problem turned out to be a bug in moonlight-embedded. It was sending the PC an AES IV of 1 then telling moonlight-common-c to use an IV of 0.

I fixed it in my PR: https://github.com/irtimmer/moonlight-embedded/pull/351

dead commented 8 years ago

Thanks!