FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

from [antimof/UxPlay]: connecting ok, but no window with screen #67

Closed trin4ik closed 2 years ago

trin4ik commented 2 years ago

hi i have ubuntu 21.10, i install all needs packages, try some other forks, but always uxplay connect to airplay, on phone i see done connect, but no gui window with stream in ubuntu.

image

log with -a -d flags.

./uxplay -a -d
audio_disabled
Initialized GStreamer video renderer
using system MAC address b4:2e:99:16:e4:43
Initialized server socket(s)
Accepted IPv4 client on socket 19
Local: 10.9.2.54
Remote: 10.9.2.5
Open connections: 1
httpd receiving on socket 19
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 1
Content-Length: 70
Content-Type: application/x-apple-binary-plist
CSeq: 0
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>qualifier</key>
    <array>
        <string>txtAirPlay</string>
    </array>
</dict>
</plist>

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 0 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1068 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPWI0OjJlOjk5OjE2OmU0OjQzE2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@StayHome</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 19
conn_request

POST /pair-setup RTSP/1.0
Content-Length: 32
Content-Type: application/octet-stream
CSeq: 1
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

ff db e0 74 e2 1a 2d 59 e3 a1 2b 69 08 f7 4b 0b 
83 f6 a1 8d b2 4e 96 e8 a5 ff 73 69 72 86 e0 f2 

Handling request POST with URL /pair-setup

RTSP/1.0 200 OK 
CSeq: 1 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

90 b0 6e 0f 07 9b cd 29 5e 26 f3 cf b2 fa 2e 1a 
df 93 a7 15 95 4d 6d c6 df aa 2b 79 f4 c2 32 31 

httpd receiving on socket 19
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 666923710
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 2
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

01 00 00 00 49 71 7b 5b f8 ed 43 07 88 7c 09 ac 
f5 49 f6 fe b3 2f db a5 9c a2 34 ea 62 47 88 39 
45 63 15 4f ff db e0 74 e2 1a 2d 59 e3 a1 2b 69 
08 f7 4b 0b 83 f6 a1 8d b2 4e 96 e8 a5 ff 73 69 
72 86 e0 f2 

Handling request POST with URL /pair-verify

RTSP/1.0 200 OK 
CSeq: 2 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 96 

5c 94 ad 49 fa 05 8e 7e 1a e9 d7 6f 36 ed f5 d7 
f0 55 5d a8 f3 bb 16 bb f9 2e 40 56 d3 50 56 39 
91 41 83 67 ba 96 80 f5 15 ae f3 8c a5 8e dc 07 
45 34 36 f0 1b fc 6d 45 a0 40 e3 83 8b 19 ba fd 
b7 bd d2 40 56 19 92 2b af da 85 1d ef de b2 61 
6b 0a e8 94 40 8a ea de 54 6d a2 5c 5c 39 d3 5c 

httpd receiving on socket 19
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 666923710
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 3
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

00 00 00 00 c4 a0 0e cb 9f df 67 1e 34 5f eb ba 
2a 52 54 cb 92 ad 58 f9 43 8a a7 35 43 04 90 8d 
72 da 9b dd f6 1d c5 f9 c7 0e 0c 3e 24 89 71 2b 
5c a6 52 64 44 ab e1 9b 2d ed 48 9e 38 eb 4f eb 
1a cc b7 1d 

Handling request POST with URL /pair-verify
2nd pair-verify step: checking signature
pair-verify: signature is verified

RTSP/1.0 200 OK 
CSeq: 3 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 

httpd receiving on socket 19
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 16
Content-Type: application/octet-stream
CSeq: 4
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

46 50 4c 59 03 01 01 00 00 00 00 04 02 00 00 bb 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 4 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 142 

46 50 4c 59 03 01 02 00 00 00 00 82 02 00 0f 9f 
3f 9e 0a 25 21 db df 31 2a b2 bf b2 9e 8d 23 2b 
63 76 a8 c8 18 70 1d 22 ae 93 d8 27 37 fe af 9d 
b4 fd f4 1c 2d ba 9d 1f 49 ca aa bf 65 91 ac 1f 
7b c6 f7 e0 66 3d 21 af e0 15 65 95 3e ab 81 f4 
18 ce ed 09 5a db 7c 3d 0e 25 49 09 a7 98 31 d4 
9c 39 82 97 34 34 fa cb 42 c6 3a 1c d9 11 a6 fe 
94 1a 8a 6d 4a 74 3b 46 c3 a7 64 9e 44 c7 89 55 
e4 9d 81 55 00 95 49 c4 e2 f7 a3 f6 d5 ba 

httpd receiving on socket 19
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 164
Content-Type: application/octet-stream
CSeq: 5
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

46 50 4c 59 03 01 03 00 00 00 00 98 00 8f 1a 9c 
72 78 b7 8a ba 2a 32 69 23 e9 69 08 ad aa 4e 57 
f0 fd b4 19 87 98 4d 01 a7 a0 b2 32 1a 8e 14 14 
d1 7a 5b 9d c7 4d a4 7d 83 de eb a6 b2 1f 74 7d 
eb 05 ed 85 b2 44 1c f8 7b 1b 1d bd 8b 63 c0 b3 
79 ab 9a 5f d8 94 09 29 e9 3d 75 db af 9d 1f 15 
99 63 3b 63 3b ad 9b 18 b4 24 46 6a 75 a6 0d 34 
26 bf be e8 69 79 67 3f ea 29 98 09 b0 78 0d cc 
16 08 21 38 1c d9 9f 4d dc 56 33 3b 76 d8 a0 50 
dc 82 93 43 9e d0 83 0e e7 99 ef 28 9c e7 cf 04 
48 ac 17 36 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 5 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

46 50 4c 59 03 01 04 00 00 00 00 14 dc 82 93 43 
9e d0 83 0e e7 99 ef 28 9c e7 cf 04 48 ac 17 36 

httpd receiving on socket 19
conn_request

SETUP rtsp://10.9.2.54/10218585066654157360 RTSP/1.0
Content-Length: 487
Content-Type: application/x-apple-binary-plist
CSeq: 6
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>et</key>
    <integer>32</integer>
    <key>eiv</key>
    <data>
    25Tu+tcWcHXoyaDdo6OGcw==
    </data>
    <key>timingProtocol</key>
    <string>NTP</string>
    <key>sessionUUID</key>
    <string>8DCFB4FA-4D08-4A30-BAFA-33D57D0C9D03</string>
    <key>osName</key>
    <string>iPhone OS</string>
    <key>osBuildVersion</key>
    <string>19B74</string>
    <key>sourceVersion</key>
    <string>595.13.1</string>
    <key>timingPort</key>
    <integer>59738</integer>
    <key>osVersion</key>
    <string>15.1</string>
    <key>ekey</key>
    <data>
    RlBMWQECAQAAAAA8AAAAAHGbhKNhhklWdvAeGPRiVd8AAAAQtXGTvS/NE6AMD0CFXlj/
    6VjdN5QlpYNtWkyul0KbSn/2SUZL
    </data>
    <key>deviceID</key>
    <string>88:A4:79:D3:A3:94</string>
    <key>model</key>
    <string>iPhone12,3</string>
    <key>name</key>
    <string>iPhone 31</string>
    <key>macAddress</key>
    <string>52:73:01:17:75:26</string>
</dict>
</plist>

Handling request SETUP with URL rtsp://10.9.2.54/10218585066654157360
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
Transport: null
SETUP 1
eiv_len = 16
16 byte aesiv (needed for AES-CBC audio decryption iv):
db 94 ee fa d7 16 70 75 e8 c9 a0 dd a3 a3 86 73 

ekey_len = 72
ekey:
46 50 4c 59 01 02 01 00 00 00 00 3c 00 00 00 00 
71 9b 84 a3 61 86 49 56 76 f0 1e 18 f4 62 55 df 
00 00 00 10 b5 71 93 bd 2f cd 13 a0 0c 0f 40 85 
5e 58 ff e9 58 dd 37 94 25 a5 83 6d 5a 4c ae 97 
42 9b 4a 7f f6 49 46 4b 

fairplay_decrypt ret = 0
16 byte aeskey (fairplay-decrypted from ekey):
4d 26 b1 f0 42 66 5b d3 98 c9 c3 f7 f9 88 6b bf 

32 byte shared ecdh_secret:
95 0a 30 f2 68 51 33 85 12 6d 6f 4d cb c6 88 38 
47 b0 97 c0 8a dd 7c 3e 61 ac 7c 9e af 6f 3e 4c 

Client identified as User-Agent: AirPlay/595.13.1
16 byte aeskey after sha-256 hash with ecdh_secret:
9a 0f cc 8f b8 00 e0 5e 38 52 b1 f2 6c 9c a5 fd 

timing_rport = 59738
raop_ntp parse remote ip = 10.9.2.5
raop_ntp starting time
raop_ntp local timing port socket 20 port UDP 39086
raop_rtp parse remote ip = 10.9.2.5
raop_rtp_mirror parse remote ip = 10.9.2.5
eport = 38571, tport = 39086
raop_ntp send_len = 32, now = 1645230910702475

RTSP/1.0 200 OK 
CSeq: 6 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 77 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>timingPort</key>
    <integer>39086</integer>
    <key>eventPort</key>
    <integer>38571</integer>
</dict>
</plist>

raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -1645084734192366
Accepted IPv4 client on socket 21
Local: 10.9.2.54
Remote: 10.9.2.5
Open connections: 2
httpd receiving on socket 19
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 1
CSeq: 7
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 7 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1068 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPWI0OjJlOjk5OjE2OmU0OjQzE2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@StayHome</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 19
conn_request

GET_PARAMETER rtsp://10.9.2.54/10218585066654157360 RTSP/1.0
Content-Length: 8
Content-Type: text/parameters
CSeq: 8
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

volume 

Handling request GET_PARAMETER with URL rtsp://10.9.2.54/10218585066654157360

RTSP/1.0 200 OK 
CSeq: 8 
Server: AirTunes/220.68 
Content-Type: text/parameters 
Content-Length: 13 

volume: 0.0 

httpd receiving on socket 19
conn_request

RECORD rtsp://10.9.2.54/10218585066654157360 RTSP/1.0
CSeq: 9
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request RECORD with URL rtsp://10.9.2.54/10218585066654157360
raop_handler_record

RTSP/1.0 200 OK 
CSeq: 9 
Server: AirTunes/220.68 
Audio-Latency: 11025 
Audio-Jack-Status: connected; type=analog 

httpd receiving on socket 19
conn_request

SET_PARAMETER rtsp://10.9.2.54/10218585066654157360 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 10
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

volume: -20.000000 

Handling request SET_PARAMETER with URL rtsp://10.9.2.54/10218585066654157360

RTSP/1.0 200 OK 
CSeq: 10 
Server: AirTunes/220.68 
===================================================================================
httpd receiving on socket 19         SHOULD HAVE RECEIVED A "SETUP" REQUEST FROM CLIENT HERE
conn_request

POST /feedback RTSP/1.0
CSeq: 11
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 11 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645230913706496
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 12
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 12 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645230916801463
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 13
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 13 
Server: AirTunes/220.68 

httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 14
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 14 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645230919873754
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 15
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 15 
Server: AirTunes/220.68 

httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 16
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 16 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645230922945696
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 72
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 17
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 17 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645230925949742
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 18
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 18 
Server: AirTunes/220.68 

^CStopping...
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 19
DACP-ID: D3ECCFFC92114A3F
Active-Remote: 2499399800
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 19 
Server: AirTunes/220.68 

Removing connection for socket 19
Destroying connection
Open connections: 1
raop_ntp stopping time thread
raop_ntp exiting thread
raop_ntp stopped time thread
Removing connection for socket 21
Destroying connection
Open connections: 0
Exiting HTTP thread
fduncanh commented 2 years ago

at Cseq: 10 (I marked it in your debug), uxplay should have received a "SETUP" request from the client. It did not get it.

according to the record above the client is an iphone 12,3 (iphone 11 pro) For unknown reasons, It never followed through with the connection attempt, to send the "SETUP" request to establish the video connection.

It seems something may be unusual about the client iphone. It is not responding as expected. (Is it a company phone that might have MDM restrictions?) Do you have any other iOS device to test with?

See https://github.com/FDH2/UxPlay/files/7805869/uxplay_debug_output.txt for what a working connection gives as uxplay -d output.

trin4ik commented 2 years ago

its my own phone and i use UxPlay on ubuntu 19.04, in past, its work well. i use phone 4 mobile development on ReactNative, but its not problem, i think. try another ios later, ty

fduncanh commented 2 years ago

Just tested with an iphone SE 2020 running iOS 15.2 , works fine with current uxplay.

Your debug show that instead of sending a TCP SETUP request, your phone just sends the TCP "feedback" request every 2 secs to see it the server is alive, and the server replies OK.

The server also sends a UDP request to the client every 3 secs to ask for a timestamp, and to see if the client is alive, and the client does reply.

So the server and client are watching each other. But nothing will happen until the client sents the SETUP request to setup a video connection, and I have no idea why it's not doing that.

trin4ik commented 2 years ago

start on another device, old device, clear, first-run device.

./uxplay -a -d
audio_disabled
Initialized GStreamer video renderer
using system MAC address b4:2e:99:16:e4:43
Initialized server socket(s)
Accepted IPv4 client on socket 19
Local: 10.9.2.54
Remote: 10.9.3.145
Open connections: 1
httpd receiving on socket 19
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 0
Content-Length: 70
Content-Type: application/x-apple-binary-plist
CSeq: 0
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>qualifier</key>
    <array>
        <string>txtAirPlay</string>
    </array>
</dict>
</plist>

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 0 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1068 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPWI0OjJlOjk5OjE2OmU0OjQzE2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@StayHome</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 19
conn_request

POST /pair-setup RTSP/1.0
Content-Length: 32
Content-Type: application/octet-stream
CSeq: 1
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

10 4f ad 61 f0 23 dd bd 07 94 17 0e 11 b1 85 65 
ec b2 bc 7a dc b7 d8 03 31 c5 23 00 8d 6d 88 ea 

Handling request POST with URL /pair-setup

RTSP/1.0 200 OK 
CSeq: 1 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

c3 0f 3c ba 25 f5 7a 1e 98 99 51 90 b4 57 59 c0 
fa bb 21 b9 a3 d9 fc be ad 7c 64 51 c3 c8 fb f1 

httpd receiving on socket 19
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 666967807
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 2
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

01 00 00 00 8b 39 00 3f 67 c0 94 f6 55 22 0e bb 
58 f0 21 a7 8a 2e f9 5d 1c 16 ba 25 63 c4 8f b5 
ce ac be 39 10 4f ad 61 f0 23 dd bd 07 94 17 0e 
11 b1 85 65 ec b2 bc 7a dc b7 d8 03 31 c5 23 00 
8d 6d 88 ea 

Handling request POST with URL /pair-verify

RTSP/1.0 200 OK 
CSeq: 2 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 96 

17 66 cb d4 ee ea 89 30 8a e3 e7 bb 78 5d 42 29 
8d d1 a5 7a d7 44 e5 b6 8b 17 41 c9 db ea 43 12 
2e 31 08 f7 7e 09 96 83 93 4d c2 02 fc 6b 7d 7e 
b0 f7 1d 54 12 79 36 d9 58 ba 0e 74 40 6c dd a1 
50 d7 89 9b 5e e3 70 79 45 4b 3c 7e 71 18 e1 ac 
c7 06 e2 ba 4c 2f 3c 34 fd 99 31 1b 5d f7 89 b0 

httpd receiving on socket 19
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 666967807
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 3
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

00 00 00 00 ab 46 ff 55 69 13 34 90 19 7d fd db 
3e b0 37 20 8d 28 38 e9 1f cf d3 04 99 e3 0b 25 
e5 e3 e4 77 dd f8 86 1f eb 68 d9 74 3f 35 85 9d 
43 c5 d2 35 9e 4c ed 5d 1d b0 30 e1 de e5 ed c8 
c3 20 69 4f 

Handling request POST with URL /pair-verify
2nd pair-verify step: checking signature
pair-verify: signature is verified

RTSP/1.0 200 OK 
CSeq: 3 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 

httpd receiving on socket 19
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 16
Content-Type: application/octet-stream
CSeq: 4
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

46 50 4c 59 03 01 01 00 00 00 00 04 02 00 01 bb 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 4 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 142 

46 50 4c 59 03 01 02 00 00 00 00 82 02 01 cf 32 
a2 57 14 b2 52 4f 8a a0 ad 7a f1 64 e3 7b cf 44 
24 e2 00 04 7e fc 0a d6 7a fc d9 5d ed 1c 27 30 
bb 59 1b 96 2e d6 3a 9c 4d ed 88 ba 8f c7 8d e6 
4d 91 cc fd 5c 7b 56 da 88 e3 1f 5c ce af c7 43 
19 95 a0 16 65 a5 4e 19 39 d2 5b 94 db 64 b9 e4 
5d 8d 06 3e 1e 6a f0 7e 96 56 16 2b 0e fa 40 42 
75 ea 5a 44 d9 59 1c 72 56 b9 fb e6 51 38 98 b8 
02 27 72 19 88 57 16 50 94 2a d9 46 68 8a 

httpd receiving on socket 19
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 164
Content-Type: application/octet-stream
CSeq: 5
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

46 50 4c 59 03 01 03 00 00 00 00 98 01 8f 1a 9c 
ac 3d 03 94 54 0f a5 0c 66 4c df 9a c1 c4 fd 30 
89 3a 48 d3 84 c7 50 f8 91 ea cd 39 82 29 bd 2c 
b3 7e b5 7f 74 52 64 dd 74 20 5f 82 88 40 84 80 
64 03 c5 b3 e6 33 78 2a 62 59 da 04 16 a7 88 d6 
9a ee 21 45 cd d8 1a c6 1a db 67 cb 5d 6e 52 16 
95 22 d7 a8 bb 05 02 4a 41 a5 49 b0 ac 70 8c e3 
e1 a5 d5 88 5b c9 da b3 32 78 90 1a e6 32 49 2c 
01 ad c6 69 5b c0 a1 dc 51 56 ab fb dc 0d 7e 82 
8d f7 7b 94 00 08 bd 67 40 13 b6 36 91 12 c2 20 
4f 1a 5d b9 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 5 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

46 50 4c 59 03 01 04 00 00 00 00 14 8d f7 7b 94 
00 08 bd 67 40 13 b6 36 91 12 c2 20 4f 1a 5d b9 

httpd receiving on socket 19
conn_request

SETUP rtsp://10.9.2.54/7526412030182246551 RTSP/1.0
Content-Length: 489
Content-Type: application/x-apple-binary-plist
CSeq: 6
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>et</key>
    <integer>32</integer>
    <key>eiv</key>
    <data>
    rt0jo4ReYK7vV9P3zkWmFA==
    </data>
    <key>timingProtocol</key>
    <string>NTP</string>
    <key>sessionUUID</key>
    <string>68732FDD-643D-4897-82DD-745EB8E647B3</string>
    <key>osName</key>
    <string>iPhone OS</string>
    <key>osBuildVersion</key>
    <string>16H62</string>
    <key>sourceVersion</key>
    <string>387.2</string>
    <key>timingPort</key>
    <integer>59808</integer>
    <key>osVersion</key>
    <string>12.5.5</string>
    <key>ekey</key>
    <data>
    RlBMWQECAQAAAAA8AAAAABwfy4Jq06xvoTb+6MS7aQkAAAAQEYfUMPBNc5tV5OTlLkO4
    W1VumnTMgI94LYzRoeUW4kz4PM6e
    </data>
    <key>deviceID</key>
    <string>68:FB:7E:0A:A6:76</string>
    <key>model</key>
    <string>iPhone6,2</string>
    <key>name</key>
    <string>iPhone (Inan)</string>
    <key>macAddress</key>
    <string>68:FB:7E:0A:A6:74</string>
</dict>
</plist>

Handling request SETUP with URL rtsp://10.9.2.54/7526412030182246551
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
Transport: null
SETUP 1
eiv_len = 16
16 byte aesiv (needed for AES-CBC audio decryption iv):
ae dd 23 a3 84 5e 60 ae ef 57 d3 f7 ce 45 a6 14 

ekey_len = 72
ekey:
46 50 4c 59 01 02 01 00 00 00 00 3c 00 00 00 00 
1c 1f cb 82 6a d3 ac 6f a1 36 fe e8 c4 bb 69 09 
00 00 00 10 11 87 d4 30 f0 4d 73 9b 55 e4 e4 e5 
2e 43 b8 5b 55 6e 9a 74 cc 80 8f 78 2d 8c d1 a1 
e5 16 e2 4c f8 3c ce 9e 

fairplay_decrypt ret = 0
16 byte aeskey (fairplay-decrypted from ekey):
c7 d5 16 eb 3a 29 a4 57 a6 6e fe c0 00 af fa 42 

32 byte shared ecdh_secret:
d0 91 db cd 84 a5 c6 b8 47 05 30 6c e3 3c a9 34 
cd 51 2d 6f ce 10 3a b3 ef 6f 35 8f c8 1c 0d 72 

Client identified as User-Agent: AirPlay/387.2
16 byte aeskey after sha-256 hash with ecdh_secret:
30 08 54 8e b6 7a 71 e7 83 2b d2 02 17 90 62 94 

timing_rport = 59808
raop_ntp parse remote ip = 10.9.3.145
raop_ntp starting time
raop_ntp local timing port socket 20 port UDP 40990
raop_rtp parse remote ip = 10.9.3.145
raop_rtp_mirror parse remote ip = 10.9.3.145
eport = 45089, tport = 40990
raop_ntp send_len = 32, now = 1645275007881529

RTSP/1.0 200 OK 
CSeq: 6 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 77 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>timingPort</key>
    <integer>40990</integer>
    <key>eventPort</key>
    <integer>45089</integer>
</dict>
</plist>

raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -1645274087052363
Accepted IPv4 client on socket 21
Local: 10.9.2.54
Remote: 10.9.3.145
Open connections: 2
httpd receiving on socket 19
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 0
CSeq: 7
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 7 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1068 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPWI0OjJlOjk5OjE2OmU0OjQzE2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@StayHome</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 19
conn_request

GET_PARAMETER rtsp://10.9.2.54/7526412030182246551 RTSP/1.0
Content-Length: 8
Content-Type: text/parameters
CSeq: 8
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

volume 

Handling request GET_PARAMETER with URL rtsp://10.9.2.54/7526412030182246551

RTSP/1.0 200 OK 
CSeq: 8 
Server: AirTunes/220.68 
Content-Type: text/parameters 
Content-Length: 13 

volume: 0.0 

httpd receiving on socket 19
conn_request

RECORD rtsp://10.9.2.54/7526412030182246551 RTSP/1.0
CSeq: 9
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request RECORD with URL rtsp://10.9.2.54/7526412030182246551
raop_handler_record

RTSP/1.0 200 OK 
CSeq: 9 
Server: AirTunes/220.68 
Audio-Latency: 11025 
Audio-Jack-Status: connected; type=analog 

httpd receiving on socket 19
conn_request

SET_PARAMETER rtsp://10.9.2.54/7526412030182246551 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 10
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

volume: -20.000000 

Handling request SET_PARAMETER with URL rtsp://10.9.2.54/7526412030182246551

RTSP/1.0 200 OK 
CSeq: 10 
Server: AirTunes/220.68 

httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 11
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 11 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645275010884409
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 12
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 12 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645275013960042
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 13
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 13 
Server: AirTunes/220.68 

httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 14
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 14 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645275016979159
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 459
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 15
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 15 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645275019982042
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 16
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 16 
Server: AirTunes/220.68 

httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 17
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 17 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645275022987851
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

TEARDOWN rtsp://10.9.2.54/7526412030182246551 RTSP/1.0
Content-Length: 42
Content-Type: application/x-apple-binary-plist
CSeq: 18
DACP-ID: 1DA08924B7A0C3F
Active-Remote: 724261259
User-Agent: AirPlay/387.2

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

Handling request TEARDOWN with URL rtsp://10.9.2.54/7526412030182246551
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

TEARDOWN request,  96=0, 110=0

RTSP/1.0 200 OK 
CSeq: 18 
Server: AirTunes/220.68 

httpd receiving on socket 19
Connection closed for socket 19
Destroying connection
Open connections: 1
raop_ntp stopping time thread
raop_ntp exiting thread
raop_ntp stopped time thread
httpd receiving on socket 21
Connection closed for socket 21
Destroying connection
Open connections: 0
^CStopping...
Exiting HTTP thread

same problem. i think, its 21.10 ubuntu version

fduncanh commented 2 years ago

Here is a test on Ubuntu 21.10 (client is iPad with iOS 15.2, works perfectly) can you see anything different in the debugs except for the missing SETUP at Cseq: 10 (sequence 10 in the server-client dialog)? debug.txt

I have never seen your issue before, it's strange that you have two different clients that fail to request the SETUP. Are they failing to hear something from the server that tells them to proceed?

are there any firewall issues? 3 udp and 3 (really 2) tcp ports on the server are used,

UDP port 40900 for the ntp timing signal is open the main communications are on TCP 45089 which is working. the setup request should come on this TCP port, (and then open a socket on a second TCP port to receive the video) but there don't seem to be any firewall issues. Two other UDP ports are used for audio.

could BOTH your iOS clients have some unusual change ?, seems very unlikely??????

See if RPiPlay http://github.com/FD-/RPiPlay also fails. UxPlay is enhanced RPiPlay without the Raspberry Pi OpenMAX renderers, but the early gstreamer implementation from UxPlay was backported to RPiPlay as alternative renderers.

fduncanh commented 2 years ago

the second client is older, uses "X-Apple-ProtocolVersion: 0" but the first one uses Version 1, like my client, so the problem is not that. If an older version of UxPlay worked before, you can find an old one in github by clicking on "commits" and you see the history, and can go back. my work starts in summer 2021. Its antimof before that.

Trying RPiPlay is also an easy test.

fduncanh commented 2 years ago

Your client (both of them) did SETUP 1, which establishes the pairing handshake and starts the ntp timing port. It just doesn't do SETUP 2 to set up video streaming. (WHY???) After that the client would do SETUP 3 to establish audio streaming (the -a option just stops audio rendering, it doesnt stop audio streaming).

Consider updating the newer iPhone to iOS 15.2, so we are testing on the same iOS version. But since the older one (iPhone 5S) on iOS 12.5.5 is on its last update and behaves the same way, its unlikely to be the iOS version that's the issue. Since pairing take place successfully I dont see how it could be a network issue. But either the client didn't hear the confirmation that the successful pairing occurred, or chose not to respond with the second SETUP request. In the first case, it would be a strange network issue, in the second it would be a modified client not behaving normally. you could use netstat to confirm the server-client network traffic.

The ports are found in the debug output and will be different each time (automatic assignment). The server ports can be fixed with the -p option.

trin4ik commented 2 years ago

upgrade 11 pro to 15.3.1, same problem:

RTSP/1.0 200 OK 
CSeq: 9 
Server: AirTunes/220.68 
Audio-Latency: 11025 
Audio-Jack-Status: connected; type=analog 

httpd receiving on socket 19
conn_request

SET_PARAMETER rtsp://10.9.2.54/12393322600652229479 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 10
DACP-ID: 7B69070AB2F8492F
Active-Remote: 731712633
User-Agent: AirPlay/605.1

volume: -20.000000 

Handling request SET_PARAMETER with URL rtsp://10.9.2.54/12393322600652229479

RTSP/1.0 200 OK 
CSeq: 10 
Server: AirTunes/220.68 

httpd receiving on socket 19
conn_request

POST /feedback RTSP/1.0
CSeq: 11
DACP-ID: 7B69070AB2F8492F
Active-Remote: 731712633
User-Agent: AirPlay/605.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 11 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645317358989268
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 19
conn_request

about "in past all work", i think problem with 21.10 ubuntu. i use it on 18 or 19.04, after upgrade to 20.04 and uxplay stop works. its need 1-2 times per year.

fduncanh commented 2 years ago

It's tested regularly on ubuntu 20.04 and 21.10 on intel i86_64 , and I cannot reproduce your problem. Works fine. I can't see what could be different about your setup to make the client not send the second setup request.. The client and server had gone through the pairing dialog.

RTSP/1.0 200 OK 
CSeq: 11 
Server: AirTunes/220.68 

Its crucial that the server claims to be sourceVersion 220.68 (Apple TV 3,2) because it it were later than that, the client would switch to an encrypted protocol after the first SETUP. Perhaps your clients are doing that for unknown reasons (???)

Did you say you had tried with RPiPlay? http://github.com/FD-/RPiPlay ?

trin4ik commented 2 years ago

ty for trying to help me, man run rpiplay on iphone se:

trin@StayHome:~/airplay/RPiPlay/build$ export AVAHI_COMPAT_NOWARN=1
trin@StayHome:~/airplay/RPiPlay/build$ ./rpiplay 
Initialized server socket(s)
^CStopping...
trin@StayHome:~/airplay/RPiPlay/build$ ./rpiplay -d
Initialized server socket(s)
Accepted IPv4 client on socket 25
Local: 10.9.2.54
Remote: 10.9.3.145
httpd receiving on socket 25
conn_request
Handling request GET with URL /info
INFO len = 1006626908
httpd receiving on socket 25
conn_request
Handling request POST with URL /pair-setup
httpd receiving on socket 25
conn_request
Handling request POST with URL /pair-verify
httpd receiving on socket 25
conn_request
Handling request POST with URL /pair-verify
httpd receiving on socket 25
conn_request
Handling request POST with URL /fp-setup
httpd receiving on socket 25
conn_request
Handling request POST with URL /fp-setup
httpd receiving on socket 25
conn_request
Handling request SETUP with URL rtsp://10.9.2.54/10152364964187751263
DACP-ID: 62D4233A38F29678
Active-Remote: 604934485
Transport: null
SETUP 1
eiv_len = 16
ekey_len = 72
fairplay_decrypt ret = 0
timing_rport = 53875
raop_ntp parse remote ip = 10.9.3.145
raop_ntp starting time
raop_rtp parse remote ip = 10.9.3.145
raop_rtp_mirror parse remote ip = 10.9.3.145
eport = 43691, tport = 53719
raop_ntp send_len = 32
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -1645330593451752
Accepted IPv4 client on socket 27
Local: 10.9.2.54
Remote: 10.9.3.145
httpd receiving on socket 25
conn_request
Handling request GET with URL /info
INFO len = 1006626908
httpd receiving on socket 25
conn_request
Handling request GET_PARAMETER with URL rtsp://10.9.2.54/10152364964187751263
httpd receiving on socket 25
conn_request
Handling request RECORD with URL rtsp://10.9.2.54/10152364964187751263
raop_handler_record
httpd receiving on socket 25
conn_request
Handling request SET_PARAMETER with URL rtsp://10.9.2.54/10152364964187751263
httpd receiving on socket 25
conn_request
Handling request SET_PARAMETER with URL rtsp://10.9.2.54/10152364964187751263
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
raop_ntp send_len = 32
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
raop_ntp send_len = 32
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
raop_ntp send_len = 32
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
^CStopping...
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
Removing connection for socket 25
Destroying connection
raop_ntp stopping time thread
raop_ntp exiting thread
raop_ntp stopped time thread
Removing connection for socket 27
Destroying connection
Exiting HTTP thread

on 11 pro:

trin@StayHome:~/airplay/RPiPlay/build$ ./rpiplay -d
Initialized server socket(s)
Accepted IPv4 client on socket 25
Local: 10.9.2.54
Remote: 10.9.2.5
httpd receiving on socket 25
conn_request
Handling request GET with URL /info
INFO len = 1266669660
httpd receiving on socket 25
conn_request
Handling request POST with URL /pair-setup
httpd receiving on socket 25
conn_request
Handling request POST with URL /pair-verify
httpd receiving on socket 25
conn_request
Handling request POST with URL /pair-verify
httpd receiving on socket 25
conn_request
Handling request POST with URL /fp-setup
httpd receiving on socket 25
conn_request
Handling request POST with URL /fp-setup
httpd receiving on socket 25
conn_request
Handling request SETUP with URL rtsp://10.9.2.54/5908302835410816007
DACP-ID: 7F678A4532CA6B44
Active-Remote: 140375925
Transport: null
SETUP 1
eiv_len = 16
ekey_len = 72
fairplay_decrypt ret = 0
timing_rport = 63929
raop_ntp parse remote ip = 10.9.2.5
raop_ntp starting time
raop_rtp parse remote ip = 10.9.2.5
raop_rtp_mirror parse remote ip = 10.9.2.5
eport = 45915, tport = 53614
raop_ntp send_len = 32
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -1645317182030168
Accepted IPv4 client on socket 27
Local: 10.9.2.54
Remote: 10.9.2.5
httpd receiving on socket 25
conn_request
Handling request GET with URL /info
INFO len = 1266669660
httpd receiving on socket 25
conn_request
Handling request GET_PARAMETER with URL rtsp://10.9.2.54/5908302835410816007
httpd receiving on socket 25
conn_request
Handling request RECORD with URL rtsp://10.9.2.54/5908302835410816007
raop_handler_record
httpd receiving on socket 25
conn_request
Handling request SET_PARAMETER with URL rtsp://10.9.2.54/5908302835410816007
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
raop_ntp send_len = 32
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
raop_ntp send_len = 32
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 25
conn_request
Handling request POST with URL /feedback
raop_handler_feedback
raop_ntp send_len = 32
httpd receiving on socket 25
conn_request
Handling request TEARDOWN with URL rtsp://10.9.2.54/5908302835410816007
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 25
Connection closed for socket 25
Destroying connection
raop_ntp stopping time thread
raop_ntp exiting thread
raop_ntp stopped time thread
httpd receiving on socket 27
Connection closed for socket 27
Destroying connection
fduncanh commented 2 years ago

so same thing. No Setup 2 and 3, just Setup1.

trin4ik commented 2 years ago

i think it may be firewall. on ubuntu its disabled, but my router is USG (unifi security gateway), mb he very careful. i try start simple wifi with simple router and start uxplay... 10 minutes

trin4ik commented 2 years ago

clear, reset keenetik router, same here:

trin@StayHome:~/airplay/UxPlay/build$ ./uxplay -d -a
audio_disabled
Initialized GStreamer video renderer
using system MAC address b4:2e:99:16:e4:43
Initialized server socket(s)
Accepted IPv4 client on socket 21
Local: 192.168.1.52
Remote: 192.168.1.93
Open connections: 1
httpd receiving on socket 21
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 0
Content-Length: 70
Content-Type: application/x-apple-binary-plist
CSeq: 0
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>qualifier</key>
    <array>
        <string>txtAirPlay</string>
    </array>
</dict>
</plist>

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 0 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1068 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPWI0OjJlOjk5OjE2OmU0OjQzE2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@StayHome</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 21
conn_request

POST /pair-setup RTSP/1.0
Content-Length: 32
Content-Type: application/octet-stream
CSeq: 1
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

10 4f ad 61 f0 23 dd bd 07 94 17 0e 11 b1 85 65 
ec b2 bc 7a dc b7 d8 03 31 c5 23 00 8d 6d 88 ea 

Handling request POST with URL /pair-setup

RTSP/1.0 200 OK 
CSeq: 1 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

d1 e9 90 e6 10 e7 22 b4 58 c0 0e 3c 4e ef a3 2c 
ea 9f 0d 2e 32 27 6b 22 89 2b dd d3 71 cc 2d fa 

httpd receiving on socket 21
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 667030675
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 2
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

01 00 00 00 29 29 22 28 45 b8 42 98 70 15 7d 82 
95 ff 5e f2 6e 35 c5 b2 da 4c 0f e9 92 34 fa a3 
13 23 14 77 10 4f ad 61 f0 23 dd bd 07 94 17 0e 
11 b1 85 65 ec b2 bc 7a dc b7 d8 03 31 c5 23 00 
8d 6d 88 ea 

Handling request POST with URL /pair-verify

RTSP/1.0 200 OK 
CSeq: 2 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 96 

e9 30 3e c4 48 22 77 d0 14 3f 13 59 71 c5 26 93 
3e 18 2b 3f 7f 5f 8f 62 39 68 0c 19 1e 2b f2 11 
30 34 69 a6 11 53 23 3b 3c 29 49 72 d5 65 2c 66 
6f 71 31 7c f4 c2 e2 9c e7 50 ae 84 de 47 58 8e 
59 2b cf d3 a8 09 1b b8 e9 be c9 28 33 84 e2 e5 
b0 23 d2 db db ca e4 ff cc 18 0b cb 67 c9 b2 4d 

httpd receiving on socket 21
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 667030675
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 3
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

00 00 00 00 af 89 7c 7a 24 98 0f 6a 98 44 af d7 
c2 74 5f 84 f9 e4 05 f0 d0 4d f1 30 91 10 75 ea 
ea 40 10 53 22 e4 c5 c1 1d d0 e9 06 25 11 97 a3 
6a b7 00 2b ff 11 4c 75 d8 7a 3f 42 22 c9 e9 52 
1c 00 a6 c9 

Handling request POST with URL /pair-verify
2nd pair-verify step: checking signature
pair-verify: signature is verified

RTSP/1.0 200 OK 
CSeq: 3 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 

httpd receiving on socket 21
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 16
Content-Type: application/octet-stream
CSeq: 4
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

46 50 4c 59 03 01 01 00 00 00 00 04 02 00 02 bb 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 4 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 142 

46 50 4c 59 03 01 02 00 00 00 00 82 02 02 c1 69 
a3 52 ee ed 35 b1 8c dd 9c 58 d6 4f 16 c1 51 9a 
89 eb 53 17 bd 0d 43 36 cd 68 f6 38 ff 9d 01 6a 
5b 52 b7 fa 92 16 b2 b6 54 82 c7 84 44 11 81 21 
a2 c7 fe d8 3d b7 11 9e 91 82 aa d7 d1 8c 70 63 
e2 a4 57 55 59 10 af 9e 0e fc 76 34 7d 16 40 43 
80 7f 58 1e e4 fb e4 2c a9 de dc 1b 5e b2 a3 aa 
3d 2e cd 59 e7 ee e7 0b 36 29 f2 2a fd 16 1d 87 
73 53 dd b9 9a dc 8e 07 00 6e 56 f8 50 ce 

httpd receiving on socket 21
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 164
Content-Type: application/octet-stream
CSeq: 5
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

46 50 4c 59 03 01 03 00 00 00 00 98 02 8f 1a 9c 
5a 96 70 be 03 29 54 db 34 ce 18 06 95 f0 95 f9 
75 14 5b 39 30 de 8a 8c 11 5f 5a 0e e8 06 94 bd 
09 5b b5 9e 13 d9 10 ce 14 6e 43 ad 46 10 78 dc 
fb d8 9f 0a c8 47 db 3d b2 d8 d7 ab 8f a5 52 35 
04 4e 61 01 0a 35 41 1e c6 4f a2 04 21 89 7e cf 
18 1e 41 b2 8f 56 4d 3c 83 27 02 59 c1 dc 32 2d 
57 f6 a0 dc bf e1 cf fd 9c c3 e9 5b af 80 2a ba 
60 33 70 5e 66 98 6b 25 4c a8 91 9e d5 a0 ee 35 
a2 8e 56 36 94 3d 9b 6e 0f 35 7d 0a 6b fd 45 a4 
a8 5f 97 ca 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 5 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

46 50 4c 59 03 01 04 00 00 00 00 14 a2 8e 56 36 
94 3d 9b 6e 0f 35 7d 0a 6b fd 45 a4 a8 5f 97 ca 

httpd receiving on socket 21
conn_request

SETUP rtsp://192.168.1.52/6930643420426552440 RTSP/1.0
Content-Length: 489
Content-Type: application/x-apple-binary-plist
CSeq: 6
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>et</key>
    <integer>32</integer>
    <key>eiv</key>
    <data>
    ATrSDTLUExDX4GlYy6iyAw==
    </data>
    <key>timingProtocol</key>
    <string>NTP</string>
    <key>sessionUUID</key>
    <string>602E9778-836C-4478-A9C0-545BE5DBB4C9</string>
    <key>osName</key>
    <string>iPhone OS</string>
    <key>osBuildVersion</key>
    <string>16H62</string>
    <key>sourceVersion</key>
    <string>387.2</string>
    <key>timingPort</key>
    <integer>51757</integer>
    <key>osVersion</key>
    <string>12.5.5</string>
    <key>ekey</key>
    <data>
    RlBMWQECAQAAAAA8AAAAAOyRojHFvZouo1RRMUmgIagAAAAQd005+FGMVx54K4r46J69
    z/pSF+gPqk6tPwXa9gTi/PmFFvEE
    </data>
    <key>deviceID</key>
    <string>68:FB:7E:0A:A6:76</string>
    <key>model</key>
    <string>iPhone6,2</string>
    <key>name</key>
    <string>iPhone (Inan)</string>
    <key>macAddress</key>
    <string>68:FB:7E:0A:A6:74</string>
</dict>
</plist>

Handling request SETUP with URL rtsp://192.168.1.52/6930643420426552440
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
Transport: null
SETUP 1
eiv_len = 16
16 byte aesiv (needed for AES-CBC audio decryption iv):
01 3a d2 0d 32 d4 13 10 d7 e0 69 58 cb a8 b2 03 

ekey_len = 72
ekey:
46 50 4c 59 01 02 01 00 00 00 00 3c 00 00 00 00 
ec 91 a2 31 c5 bd 9a 2e a3 54 51 31 49 a0 21 a8 
00 00 00 10 77 4d 39 f8 51 8c 57 1e 78 2b 8a f8 
e8 9e bd cf fa 52 17 e8 0f aa 4e ad 3f 05 da f6 
04 e2 fc f9 85 16 f1 04 

fairplay_decrypt ret = 0
16 byte aeskey (fairplay-decrypted from ekey):
3f 8c 64 a6 85 bc 82 81 9d 48 e1 1f d1 c3 52 cd 

32 byte shared ecdh_secret:
50 b5 b8 37 cb 8a 70 bc ef a7 7a 5a d3 2b 00 1b 
13 95 f0 2c 49 67 31 31 45 78 64 ac 6f 8a 5c 78 

Client identified as User-Agent: AirPlay/387.2
16 byte aeskey after sha-256 hash with ecdh_secret:
d9 4e 40 3f ae 67 0f 04 a8 95 ac 44 19 8c 0c 5d 

timing_rport = 51757
raop_ntp parse remote ip = 192.168.1.93
raop_ntp starting time
raop_ntp local timing port socket 22 port UDP 46695
raop_rtp parse remote ip = 192.168.1.93
raop_rtp_mirror parse remote ip = 192.168.1.93
eport = 43509, tport = 46695
raop_ntp send_len = 32, now = 1645337875452709

RTSP/1.0 200 OK 
CSeq: 6 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 77 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>timingPort</key>
    <integer>46695</integer>
    <key>eventPort</key>
    <integer>43509</integer>
</dict>
</plist>

raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -1645331562035892
Accepted IPv4 client on socket 23
Local: 192.168.1.52
Remote: 192.168.1.93
Open connections: 2
httpd receiving on socket 21
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 0
CSeq: 7
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 7 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1068 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPWI0OjJlOjk5OjE2OmU0OjQzE2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@StayHome</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 21
conn_request

GET_PARAMETER rtsp://192.168.1.52/6930643420426552440 RTSP/1.0
Content-Length: 8
Content-Type: text/parameters
CSeq: 8
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

volume 

Handling request GET_PARAMETER with URL rtsp://192.168.1.52/6930643420426552440

RTSP/1.0 200 OK 
CSeq: 8 
Server: AirTunes/220.68 
Content-Type: text/parameters 
Content-Length: 13 

volume: 0.0 

httpd receiving on socket 21
conn_request

RECORD rtsp://192.168.1.52/6930643420426552440 RTSP/1.0
CSeq: 9
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

Handling request RECORD with URL rtsp://192.168.1.52/6930643420426552440
raop_handler_record

RTSP/1.0 200 OK 
CSeq: 9 
Server: AirTunes/220.68 
Audio-Latency: 11025 
Audio-Jack-Status: connected; type=analog 

httpd receiving on socket 21
conn_request

SET_PARAMETER rtsp://192.168.1.52/6930643420426552440 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 10
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

volume: -20.000000 

Handling request SET_PARAMETER with URL rtsp://192.168.1.52/6930643420426552440

RTSP/1.0 200 OK 
CSeq: 10 
Server: AirTunes/220.68 

httpd receiving on socket 21
conn_request

POST /feedback RTSP/1.0
CSeq: 11
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 11 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645337878465924
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
httpd receiving on socket 21
conn_request

POST /feedback RTSP/1.0
CSeq: 12
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 12 
Server: AirTunes/220.68 

raop_ntp send_len = 32, now = 1645337881516227
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 5973
httpd receiving on socket 21
conn_request

POST /feedback RTSP/1.0
CSeq: 13
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 13 
Server: AirTunes/220.68 

httpd receiving on socket 21
conn_request

TEARDOWN rtsp://192.168.1.52/6930643420426552440 RTSP/1.0
Content-Length: 42
Content-Type: application/x-apple-binary-plist
CSeq: 14
DACP-ID: D14290B42214E2A
Active-Remote: 1478085588
User-Agent: AirPlay/387.2

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

Handling request TEARDOWN with URL rtsp://192.168.1.52/6930643420426552440
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

TEARDOWN request,  96=0, 110=0

RTSP/1.0 200 OK 
CSeq: 14 
Server: AirTunes/220.68 

httpd receiving on socket 21
Connection closed for socket 21
Destroying connection
Open connections: 1
raop_ntp stopping time thread
raop_ntp exiting thread
raop_ntp stopped time thread
httpd receiving on socket 23
Connection closed for socket 23
Destroying connection
Open connections: 0
fduncanh commented 2 years ago

Just strange!

is there anything modified on the iphone clients in any way?

fduncanh commented 2 years ago

just try uxplay -p -d

-p sets a standard set of network ports on the server.

fduncanh commented 2 years ago

and test just with the newer iPhone running iOS15.x

trin4ik commented 2 years ago

no, its my self devices, SE absolutely clear device, find him and reset only for this test. trying to make uxplay on macbook...

p.s. -p flag same here.

fduncanh commented 2 years ago

Yes, use the macbook as a client for the Linux server

trin4ik commented 2 years ago

macbook have native client, or i need make uxplay? try to live-ubuntu too...

fduncanh commented 2 years ago

Use the macbook like an iphone. It should detect uxplay running on the linux server, and show the airplay symbol.

(I know a Monterrey MacBook can also be an AirPlay server, but I'm asking for it to be the client , for uxplay on linux)

trin4ik commented 2 years ago

Use the macbook like an iphone. It should detect uxplay running on the linux server, and show the airplay symbol.

(I know a Monterrey MacBook can also be an AirPlay server, but I'm asking for it to be the client , for uxplay on linux)

i see green screen on ubuntu, but setup 2 correct, as i see

SET_PARAMETER rtsp://10.9.2.54/1707224973179506259 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 10
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

volume: -20.000000 

Handling request SET_PARAMETER with URL rtsp://10.9.2.54/1707224973179506259

RTSP/1.0 200 OK 
CSeq: 10 
Server: AirTunes/220.68 

httpd receiving on socket 21
conn_request

SETUP rtsp://10.9.2.54/1707224973179506259 RTSP/1.0
Content-Length: 188
Content-Type: application/x-apple-binary-plist
CSeq: 11
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10
fduncanh commented 2 years ago

I only see a small part of the debug. but it looks like the second setup is starting. Can I see it all?

The green screen would be a audovideosink issue.

best would probably be uxplay -d -vs xvimagesink

trin4ik commented 2 years ago
./uxplay -d -a
audio_disabled
Initialized GStreamer video renderer
using system MAC address b4:2e:99:16:e4:43
Initialized server socket(s)
Accepted IPv4 client on socket 21
Local: 10.9.2.54
Remote: 10.9.2.228
Open connections: 1
httpd receiving on socket 21
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 1
Content-Length: 70
Content-Type: application/x-apple-binary-plist
CSeq: 0
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>qualifier</key>
    <array>
        <string>txtAirPlay</string>
    </array>
</dict>
</plist>

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 0 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1068 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPWI0OjJlOjk5OjE2OmU0OjQzE2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@StayHome</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 21
conn_request

POST /pair-setup RTSP/1.0
Content-Length: 32
Content-Type: application/octet-stream
CSeq: 1
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

ad 41 e8 1f 53 79 11 c9 c2 e1 00 e1 78 df 9f 27 
db bf 1e 97 6e f1 2a 92 d5 1d 0a 8b 90 84 e0 52 

Handling request POST with URL /pair-setup

RTSP/1.0 200 OK 
CSeq: 1 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

12 e5 6c 5e 4c 78 4d 28 fe 07 75 b9 04 32 8d d0 
87 b7 78 0e 21 20 57 97 8b 15 fa f2 c7 9c 99 f6 

httpd receiving on socket 21
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 2
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

01 00 00 00 14 82 f3 cf 8f b0 39 f0 d0 97 1c 20 
09 28 e3 8c 1b 70 93 53 33 ab ff 57 c5 94 f6 54 
c9 03 dc 39 ad 41 e8 1f 53 79 11 c9 c2 e1 00 e1 
78 df 9f 27 db bf 1e 97 6e f1 2a 92 d5 1d 0a 8b 
90 84 e0 52 

Handling request POST with URL /pair-verify

RTSP/1.0 200 OK 
CSeq: 2 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 96 

14 8d 16 d0 02 40 d4 1d be 05 dd 59 13 ad af 9a 
46 74 9c d6 c7 6f e4 20 56 a6 3b 6d 87 98 b6 0d 
69 c1 86 98 8e be e4 88 dc 1c d2 9a 96 c1 9f b8 
2b 5f a2 6e 55 81 0d 6c 33 63 53 9e 02 f5 dd 83 
f1 f8 f8 83 4a f6 e5 11 44 4d d8 85 02 6b 89 6e 
36 ef 6c 30 c1 7c c6 1f d9 eb f6 bb 36 17 e5 d6 

httpd receiving on socket 21
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 3
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

00 00 00 00 f1 a6 e2 24 92 c6 c7 a9 c7 3a 6a a6 
04 0d dd ce e1 40 16 f3 d5 7e fb b5 83 ec a2 83 
88 2d 37 62 d3 4f 1b e2 20 4e 11 4a 03 f1 d7 26 
ad 4d ba 91 be d2 00 44 d9 b6 69 e5 43 a0 49 c7 
eb 55 52 be 

Handling request POST with URL /pair-verify
2nd pair-verify step: checking signature
pair-verify: signature is verified

RTSP/1.0 200 OK 
CSeq: 3 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 

httpd receiving on socket 21
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 16
Content-Type: application/octet-stream
CSeq: 4
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

46 50 4c 59 03 01 01 00 00 00 00 04 02 00 00 bb 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 4 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 142 

46 50 4c 59 03 01 02 00 00 00 00 82 02 00 0f 9f 
3f 9e 0a 25 21 db df 31 2a b2 bf b2 9e 8d 23 2b 
63 76 a8 c8 18 70 1d 22 ae 93 d8 27 37 fe af 9d 
b4 fd f4 1c 2d ba 9d 1f 49 ca aa bf 65 91 ac 1f 
7b c6 f7 e0 66 3d 21 af e0 15 65 95 3e ab 81 f4 
18 ce ed 09 5a db 7c 3d 0e 25 49 09 a7 98 31 d4 
9c 39 82 97 34 34 fa cb 42 c6 3a 1c d9 11 a6 fe 
94 1a 8a 6d 4a 74 3b 46 c3 a7 64 9e 44 c7 89 55 
e4 9d 81 55 00 95 49 c4 e2 f7 a3 f6 d5 ba 

httpd receiving on socket 21
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 164
Content-Type: application/octet-stream
CSeq: 5
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

46 50 4c 59 03 01 03 00 00 00 00 98 00 8f 1a 9c 
ce 94 c4 ae 83 77 0d 4e 44 c4 b7 14 18 78 cd f0 
1b 95 ec b2 39 83 a1 5c 4b af db 40 30 e4 00 e7 
21 a0 88 b6 f1 b9 eb 2a b2 04 bb 66 94 5f 32 9d 
a2 52 bf ac 88 ac 6a fd 54 4a 93 68 06 fe 90 e3 
e8 26 53 85 74 c3 ee d6 54 e7 1e c4 f2 cb 18 ac 
71 39 30 68 23 8c 90 3b ef ea f9 3b cd 2d eb 92 
ac 48 1d 92 b6 0f d7 29 9d dd cd 89 fe 6b 8d 63 
4c 25 30 85 0f 4a f0 6f 1b d4 52 18 ad c4 23 5f 
92 a8 55 b2 6a 72 83 af 0c 3a 25 db e7 31 35 20 
30 fc a4 04 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 5 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

46 50 4c 59 03 01 04 00 00 00 00 14 92 a8 55 b2 
6a 72 83 af 0c 3a 25 db e7 31 35 20 30 fc a4 04 

httpd receiving on socket 21
conn_request

SETUP rtsp://10.9.2.54/1707224973179506259 RTSP/1.0
Content-Length: 522
Content-Type: application/x-apple-binary-plist
CSeq: 6
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>et</key>
    <integer>32</integer>
    <key>eiv</key>
    <data>
    A0eSukwsg7C/2OZhGEI6gQ==
    </data>
    <key>timingProtocol</key>
    <string>NTP</string>
    <key>sessionUUID</key>
    <string>17B14811-5E0A-4E53-AAD4-62631C1BC2A5</string>
    <key>osName</key>
    <string>macOS</string>
    <key>osBuildVersion</key>
    <string>20G314</string>
    <key>sourceVersion</key>
    <string>550.10</string>
    <key>timingPort</key>
    <integer>55191</integer>
    <key>isScreenMirroringSession</key>
    <true/>
    <key>osVersion</key>
    <string>11.6.2</string>
    <key>ekey</key>
    <data>
    RlBMWQECAQAAAAA8AAAAABEKDGLbVV66c98BXWzqRdIAAAAQI789+FOSZqHUO0obTTWt
    aIF1rGpw4O2bAlDP1bTHbMqHRSH5
    </data>
    <key>deviceID</key>
    <string>38:F9:D3:39:2A:85</string>
    <key>model</key>
    <string>MacBookPro15,2</string>
    <key>name</key>
    <string>LostMan</string>
    <key>macAddress</key>
    <string>38:F9:D3:39:2A:85</string>
</dict>
</plist>

Handling request SETUP with URL rtsp://10.9.2.54/1707224973179506259
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
Transport: null
SETUP 1
eiv_len = 16
16 byte aesiv (needed for AES-CBC audio decryption iv):
03 47 92 ba 4c 2c 83 b0 bf d8 e6 61 18 42 3a 81 

ekey_len = 72
ekey:
46 50 4c 59 01 02 01 00 00 00 00 3c 00 00 00 00 
11 0a 0c 62 db 55 5e ba 73 df 01 5d 6c ea 45 d2 
00 00 00 10 23 bf 3d f8 53 92 66 a1 d4 3b 4a 1b 
4d 35 ad 68 81 75 ac 6a 70 e0 ed 9b 02 50 cf d5 
b4 c7 6c ca 87 45 21 f9 

fairplay_decrypt ret = 0
16 byte aeskey (fairplay-decrypted from ekey):
a5 a9 14 d7 e7 fe 8c ad 54 fa 2e 73 34 6e 9c 06 

32 byte shared ecdh_secret:
dd e9 da 82 f8 bc 52 6f d2 a5 a4 66 4f 09 d7 21 
3c e4 74 23 5b 3c 09 1c 7b fe d6 c9 f2 ef 0a 51 

Client identified as User-Agent: AirPlay/550.10
16 byte aeskey after sha-256 hash with ecdh_secret:
32 f0 75 cf 7a 78 a2 3e 65 44 71 34 3f 49 09 c9 

timing_rport = 55191
raop_ntp parse remote ip = 10.9.2.228
raop_ntp starting time
raop_ntp local timing port socket 22 port UDP 33938
raop_rtp parse remote ip = 10.9.2.228
raop_rtp_mirror parse remote ip = 10.9.2.228
eport = 37449, tport = 33938
raop_ntp send_len = 32, now = 1645338996877348

RTSP/1.0 200 OK 
CSeq: 6 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 77 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>timingPort</key>
    <integer>33938</integer>
    <key>eventPort</key>
    <integer>37449</integer>
</dict>
</plist>

raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -1644805312233867
Accepted IPv4 client on socket 23
Local: 10.9.2.54
Remote: 10.9.2.228
Open connections: 2
httpd receiving on socket 21
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 1
CSeq: 7
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 7 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1068 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPWI0OjJlOjk5OjE2OmU0OjQzE2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@StayHome</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>b4:2e:99:16:e4:43</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 21
conn_request

GET_PARAMETER rtsp://10.9.2.54/1707224973179506259 RTSP/1.0
Content-Length: 8
Content-Type: text/parameters
CSeq: 8
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

volume 

Handling request GET_PARAMETER with URL rtsp://10.9.2.54/1707224973179506259

RTSP/1.0 200 OK 
CSeq: 8 
Server: AirTunes/220.68 
Content-Type: text/parameters 
Content-Length: 13 

volume: 0.0 

httpd receiving on socket 21
conn_request

RECORD rtsp://10.9.2.54/1707224973179506259 RTSP/1.0
CSeq: 9
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

Handling request RECORD with URL rtsp://10.9.2.54/1707224973179506259
raop_handler_record

RTSP/1.0 200 OK 
CSeq: 9 
Server: AirTunes/220.68 
Audio-Latency: 11025 
Audio-Jack-Status: connected; type=analog 

httpd receiving on socket 21
conn_request

SET_PARAMETER rtsp://10.9.2.54/1707224973179506259 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 10
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

volume: -20.000000 

Handling request SET_PARAMETER with URL rtsp://10.9.2.54/1707224973179506259

RTSP/1.0 200 OK 
CSeq: 10 
Server: AirTunes/220.68 

httpd receiving on socket 21
conn_request

SETUP rtsp://10.9.2.54/1707224973179506259 RTSP/1.0
Content-Length: 188
Content-Type: application/x-apple-binary-plist
CSeq: 11
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>streams</key>
    <array>
        <dict>
            <key>type</key>
            <integer>110</integer>
            <key>timestampInfo</key>
            <array>
                <dict>
                    <key>name</key>
                    <string>SubSu</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>BePxT</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>AfPxT</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>BefEn</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>EmEnc</string>
                </dict>
            </array>
            <key>streamConnectionID</key>
            <integer>-8660930610203702749</integer>
        </dict>
    </array>
</dict>
</plist>

Handling request SETUP with URL rtsp://10.9.2.54/1707224973179506259
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
Transport: null
type = 110
streamConnectionID (needed for AES-CTR video decryption key and iv): 9785813463505848867
raop_rtp_mirror starting mirroring
raop_rtp_mirror local data port socket 24 port TCP 42017
Mirroring initialized successfully

RTSP/1.0 200 OK 
CSeq: 11 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 85 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>streams</key>
    <array>
        <dict>
            <key>dataPort</key>
            <integer>42017</integer>
            <key>type</key>
            <integer>110</integer>
        </dict>
    </array>
</dict>
</plist>

raop_rtp_mirror accepting client

Received video streaming performance info packet from client
httpd receiving on socket 21
conn_request

POST /feedback RTSP/1.0
CSeq: 12
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 12 
Server: AirTunes/220.68 

Received video streaming performance info packet from client
raop_ntp send_len = 32, now = 1645338999879347
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -318

Received video streaming performance info packet from client
begin video stream wxh = 1920x1080; source 1920x1080
raop_rtp_mirror width_source = 1920.000000 height_source = 1080.000000 width = 1920.000000 height = 1080.000000
raop_rtp_mirror sps size = 30
raop_rtp_mirror pps size = 4
raop_rtp_mirror video ntp = 1645338999854185, now = 1645339000431262, latency = 577077
Begin streaming to GStreamer video pipeline
raop_rtp_mirror video ntp = 1645338999904185, now = 1645339000431830, latency = 527645
raop_rtp_mirror video ntp = 1645338999954185, now = 1645339000451158, latency = 496973
raop_rtp_mirror video ntp = 1645339000454185, now = 1645339000482611, latency = 28426
raop_rtp_mirror video ntp = 1645339000554185, now = 1645339000497488, latency = -56697
raop_rtp_mirror video ntp = 1645339000587519, now = 1645339000537190, latency = -50329
raop_rtp_mirror video ntp = 1645339000637519, now = 1645339000563713, latency = -73806
raop_rtp_mirror video ntp = 1645339000670852, now = 1645339000610550, latency = -60302
raop_rtp_mirror video ntp = 1645339000704185, now = 1645339000639299, latency = -64886
raop_rtp_mirror video ntp = 1645339000737519, now = 1645339000678692, latency = -58827
raop_rtp_mirror video ntp = 1645339000787519, now = 1645339000741835, latency = -45684
raop_rtp_mirror video ntp = 1645339000837519, now = 1645339000783485, latency = -54034
raop_rtp_mirror video ntp = 1645339000870852, now = 1645339000803076, latency = -67776
raop_rtp_mirror video ntp = 1645339000937519, now = 1645339000874312, latency = -63207
raop_rtp_mirror video ntp = 1645339000970852, now = 1645339000917428, latency = -53424
raop_rtp_mirror video ntp = 1645339001004185, now = 1645339000939763, latency = -64422
httpd receiving on socket 21
conn_request

POST /feedback RTSP/1.0
CSeq: 13
DACP-ID: B66B9D102A7F8188
Active-Remote: 3737705804
User-Agent: AirPlay/550.10

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 13 
Server: AirTunes/220.68 

raop_rtp_mirror video ntp = 1645339001037519, now = 1645339001006552, latency = -30967
raop_rtp_mirror video ntp = 1645339001070852, now = 1645339001015507, latency = -55345

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645339001120852, now = 1645339001070295, latency = -50557
raop_rtp_mirror video ntp = 1645339001154185, now = 1645339001078469, latency = -75716
raop_rtp_mirror video ntp = 1645339001187519, now = 1645339001122911, latency = -64608
raop_rtp_mirror video ntp = 1645339001220852, now = 1645339001168378, latency = -52474
raop_rtp_mirror video ntp = 1645339001287519, now = 1645339001208769, latency = -78750
raop_rtp_mirror video ntp = 1645339001320852, now = 1645339001277356, latency = -43496
raop_rtp_mirror video ntp = 1645339001354185, now = 1645339001284947, latency = -69238
raop_rtp_mirror video ntp = 1645339001387519, now = 1645339001353814, latency = -33705
raop_rtp_mirror video ntp = 1645339001437519, now = 1645339001362930, latency = -74589
raop_rtp_mirror video ntp = 1645339001470852, now = 1645339001394782, latency = -76070
raop_rtp_mirror video ntp = 1645339001504185, now = 1645339001429428, latency = -74757
raop_rtp_mirror video ntp = 1645339001537519, now = 1645339001461445, latency = -76074
raop_rtp_mirror video ntp = 1645339001570852, now = 1645339001506268, latency = -64584
raop_rtp_mirror video ntp = 1645339001604185, now = 1645339001538749, latency = -65436
raop_rtp_mirror video ntp = 1645339001637519, now = 1645339001577817, latency = -59702
raop_rtp_mirror video ntp = 1645339001687519, now = 1645339001619851, latency = -67668
raop_rtp_mirror video ntp = 1645339001737519, now = 1645339001657122, latency = -80397
raop_rtp_mirror video ntp = 1645339001770852, now = 1645339001725944, latency = -44908
raop_rtp_mirror video ntp = 1645339001787519, now = 1645339001736846, latency = -50673
raop_rtp_mirror video ntp = 1645339001820852, now = 1645339001756137, latency = -64715
raop_rtp_mirror video ntp = 1645339001854185, now = 1645339001791450, latency = -62735
raop_rtp_mirror video ntp = 1645339001887519, now = 1645339001825078, latency = -62441
raop_rtp_mirror video ntp = 1645339001920852, now = 1645339001856036, latency = -64816
raop_rtp_mirror video ntp = 1645339001954185, now = 1645339001890545, latency = -63640
raop_rtp_mirror video ntp = 1645339001987519, now = 1645339001931626, latency = -55893
fduncanh commented 2 years ago

yes its streaming well.

If the image is still bad or absent, that's a gstreamer issue with the choice of videosink.

fduncanh commented 2 years ago

if there is a intel vaapi sink issue, force software h264 decoding with

uxplay -avdec -vs xvimagesink

trin4ik commented 2 years ago

image

20.04 vbox ) try to install 18.04

trin4ik commented 2 years ago

18.04 same problem. wtf. in 18.04 i cant install gstreamer1.0-plugins-bad, but its dont care, right?

trin4ik commented 2 years ago

ok, never mind, ty for help. try other devices and other os`s later.

fduncanh commented 2 years ago

plugins bad is needed for software h264 decoding (by libav)

I had no trouble with virtualbox.

If you got streaming the mac to work, that supports suspicion that something is changed on the iphones, if you have been resetting them.

Maybe the ability to use legacy protocol (no encryption of SETUP 2 and 3 dialogs) got switched off. That would explain the client not making the SETUP2 request, if it expected an encrypted response from the server after the unencrypted SETUP 1 which must be unencrypted, as it establishes the crypto handshake.

The precise way to unecrypt the dialog after SETUP1 has not been cracked. it seems. All known third party Airplay servers (at least in 2019) use the legacy protocol used by the 32 bit Apple TV gen 3. which modern 64 bit 15.x iOS still supports, if the client claims sourceVersion 220.68, as in Server: AirTunes/220.68

Some weird things have been happening after Apple resets: the Apple TV gen 3 no longer resets in a working state. One needs to use a Mac on which the app Apple Configurator 2 (from the App store) has been installed, to reset properly.

This is the tool for adding or removing MDM (mobile device management) restrictions that employers can add to employee mobile devices.

It might be useful to use Apple Configurator 2 to inspect the "hidden" configuration of your iPhones, to see if the ability to interact with Apple TV Airplay without encryption somehow got turned off in a reset. You need to connect the device to the mac with the USB-lightning cable to inspect it with the app.

fduncanh commented 2 years ago

Hmm. 'It seems what I wrote above is wrong. (I was following what RPiPlay author FD- wrote in his notes, which are attached at the end of the UxPlay README)

I make uxplay claim to be AirTunes/350.92.4 and it still worked. Server: AirTunes/350.92.4 (this is tvOS 12.2.1)

I 'm wondering if it is the AirTunes (as opposed to AirPlay), and not the 220.68, that triggers the legacy protocol that uses unencrypted SETUP2. I guess you can't believe everything you read...

qrkourier commented 2 years ago

I can reproduce the good connect but no window on server conditions with Ubuntu 21.10, specifically downstream Pop!_OS 21.10 and iOS 15.1 running on an iPad.

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Pop
Description:    Pop!_OS 21.10
Release:        21.10
Codename:       impish

I have tried each off the videosink options mentioned in usage hints and encountered only two results:

  1. no window at all, terminal window has focus
  2. window appears briefly then disappears and terminal window loses focus and some other unrelated window has focus e.g. Nautilus file manager, browser, etc...

iOS 15.3.1 is available so I will try again after the update.

I am running a build from this revision:

[171130d] fduncanh@gmail.com, 36 minutes ago: make sourceVersion = GLOBAL_VERSION from global.h and other cleanups

qrkourier commented 2 years ago

This is the output from command:

$ ./uxplay -nc -p -d -a

After running this command on the Ubuntu server I took exactly two actions on the iPad:

  1. select uxplay in Airplay drop down
  2. after a few moments the in-progress spinner disappears and I select uxplay a second time

Then the streaming data seems to be flowing, but there is no window at all on the server.

audio_disabled
GStreamer video pipeline will be:
"appsrc name=video_source stream-type=0 format=GST_FORMAT_TIME is-live=true ! queue ! decodebin ! videoconvert ! autovideosink name=video_sink sync=false"
Initialized GStreamer video renderer
using network ports UDP 7011 6001 6000 TCP 7100 7000 7001
using system MAC address 80:fa:5b:5a:61:46
Initialized server socket(s)
Accepted IPv4 client on socket 19
Local: 192.168.0.170
Remote: 192.168.0.140
Open connections: 1
httpd receiving on socket 19
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 1
Content-Length: 70
Content-Type: application/x-apple-binary-plist
CSeq: 0
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>qualifier</key>
    <array>
        <string>txtAirPlay</string>
    </array>
</dict>
</plist>

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 0 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1063 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPTgwOmZhOjViOjVhOjYxOjQ2E2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@kpop4</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>80:fa:5b:5a:61:46</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>80:fa:5b:5a:61:46</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 19
conn_request

POST /pair-setup RTSP/1.0
Content-Length: 32
Content-Type: application/octet-stream
CSeq: 1
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

10 77 0e 09 82 50 65 02 83 24 fe 75 41 57 29 30 
13 34 fd b3 fe e2 26 fe 44 81 cc ef 70 8e a9 df 

Handling request POST with URL /pair-setup

RTSP/1.0 200 OK 
CSeq: 1 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

f9 d6 f7 a0 e3 aa 4b 41 9d 92 72 6c e0 97 ff ef 
98 cc c4 ed 5e e6 63 2c c4 e6 27 48 50 92 62 83 

httpd receiving on socket 19
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 667076499
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 2
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

01 00 00 00 8f 20 9a f4 bf c0 71 ce b6 a0 d4 82 
20 20 e5 a2 4c 1f cb 29 c7 de 4c 58 7d 4a 32 0e 
cb bf fa 1b 10 77 0e 09 82 50 65 02 83 24 fe 75 
41 57 29 30 13 34 fd b3 fe e2 26 fe 44 81 cc ef 
70 8e a9 df 

Handling request POST with URL /pair-verify

RTSP/1.0 200 OK 
CSeq: 2 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 96 

21 8f 2c c5 2c 86 c0 8a 18 96 80 6a 2f 90 97 aa 
e6 b2 c8 13 3e 8a 11 e2 c5 78 07 4a 60 64 ca 0a 
9d 66 5d d0 27 50 3a ba e2 17 df a9 f2 4d a3 67 
79 74 84 45 1a c6 85 a4 af 89 b6 55 3b 4e b9 dc 
15 71 d8 19 a0 c1 a5 b3 89 e5 05 10 d0 98 36 7c 
c9 8f 06 3f 89 08 61 1a 27 51 b0 36 b5 b8 16 db 

httpd receiving on socket 19
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 667076499
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 3
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

00 00 00 00 d7 5d 9b 8b 83 aa 92 05 2f c4 57 fb 
5f c3 6f 3b 1c ab 03 6e ac ed d4 4f e3 4a e8 83 
d7 97 ea d2 94 8b 76 c5 24 4b a9 d9 3e 8d c2 2c 
7a b0 47 fb b4 27 41 af b8 08 f7 db 45 a2 bd 10 
4d 48 96 e5 

Handling request POST with URL /pair-verify
2nd pair-verify step: checking signature
pair-verify: signature is verified

RTSP/1.0 200 OK 
CSeq: 3 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 

httpd receiving on socket 19
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 16
Content-Type: application/octet-stream
CSeq: 4
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

46 50 4c 59 03 01 01 00 00 00 00 04 02 00 03 bb 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 4 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 142 

46 50 4c 59 03 01 02 00 00 00 00 82 02 03 90 01 
e1 72 7e 0f 57 f9 f5 88 0d b1 04 a6 25 7a 23 f5 
cf ff 1a bb e1 e9 30 45 25 1a fb 97 eb 9f c0 01 
1e be 0f 3a 81 df 5b 69 1d 76 ac b2 f7 a5 c7 08 
e3 d3 28 f5 6b b3 9d bd e5 f2 9c 8a 17 f4 81 48 
7e 3a e8 63 c6 78 32 54 22 e6 f7 8e 16 6d 18 aa 
7f d6 36 25 8b ce 28 72 6f 66 1f 73 88 93 ce 44 
31 1e 4b e6 c0 53 51 93 e5 ef 72 e8 68 62 33 72 
9c 22 7d 82 0c 99 94 45 d8 92 46 c8 c3 59 

httpd receiving on socket 19
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 164
Content-Type: application/octet-stream
CSeq: 5
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

46 50 4c 59 03 01 03 00 00 00 00 98 03 8f 1a 9c 
96 66 40 85 5c 63 9a 5f 94 74 5b b8 b1 04 9f c8 
40 f9 47 1d cc 48 bc b1 ca 9c 6b 86 b0 7e 31 ac 
b9 db ac b4 0e e8 e3 30 c2 8c 2f 64 93 29 ef b3 
f5 ef 35 ba ed fc ff 1d d3 07 fe 3e 99 b8 85 8b 
e2 35 79 95 5c fa c2 5e e9 88 e0 0c 15 9b fe 48 
bd 3d db 74 f7 5f 2e 63 da 0c 22 66 14 0c fd bb 
c6 f1 a8 b7 de 6f 47 a5 84 a1 c9 41 f3 19 59 f9 
08 3c 3e a3 20 50 62 a6 de 81 7e a9 8c 21 7b ed 
81 4f 9e fd 0f 5b f5 61 e9 5a 4a 40 53 fc ad 5d 
0b 10 81 51 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 5 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

46 50 4c 59 03 01 04 00 00 00 00 14 81 4f 9e fd 
0f 5b f5 61 e9 5a 4a 40 53 fc ad 5d 0b 10 81 51 

httpd receiving on socket 19
conn_request

SETUP rtsp://192.168.0.170/6448156397161170831 RTSP/1.0
Content-Length: 611
Content-Type: application/x-apple-binary-plist
CSeq: 6
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>et</key>
    <integer>32</integer>
    <key>eiv</key>
    <data>
    4mXN8jL3pjgl2TxnjEaVjg==
    </data>
    <key>timingProtocol</key>
    <string>NTP</string>
    <key>sessionUUID</key>
    <string>597C7414-54F4-478F-9FFB-5CA05B7E8758</string>
    <key>diagnosticsAndUsage</key>
    <true/>
    <key>osName</key>
    <string>iPhone OS</string>
    <key>osBuildVersion</key>
    <string>19B74</string>
    <key>sourceVersion</key>
    <string>595.13.1</string>
    <key>timingPort</key>
    <integer>58600</integer>
    <key>isScreenMirroringSession</key>
    <true/>
    <key>osVersion</key>
    <string>15.1</string>
    <key>ekey</key>
    <data>
    RlBMWQECAQAAAAA8AAAAADeFdH0Yq6hP6g+xgGXy+E0AAAAQ+vn5AFVI1xNw9fiE3+Df
    eEFaX/htx6u9iOgV5LwanmLajLCe
    </data>
    <key>internalBuild</key>
    <false/>
    <key>deviceID</key>
    <string>9C:E6:5E:A7:F9:20</string>
    <key>model</key>
    <string>iPad8,7</string>
    <key>name</key>
    <string>Kenneth’s iPad Pro 12.9"</string>
    <key>macAddress</key>
    <string>56:19:8A:4A:AB:24</string>
</dict>
</plist>

Handling request SETUP with URL rtsp://192.168.0.170/6448156397161170831
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
Transport: null
SETUP 1
eiv_len = 16
16 byte aesiv (needed for AES-CBC audio decryption iv):
e2 65 cd f2 32 f7 a6 38 25 d9 3c 67 8c 46 95 8e 

ekey_len = 72
ekey:
46 50 4c 59 01 02 01 00 00 00 00 3c 00 00 00 00 
37 85 74 7d 18 ab a8 4f ea 0f b1 80 65 f2 f8 4d 
00 00 00 10 fa f9 f9 00 55 48 d7 13 70 f5 f8 84 
df e0 df 78 41 5a 5f f8 6d c7 ab bd 88 e8 15 e4 
bc 1a 9e 62 da 8c b0 9e 

fairplay_decrypt ret = 0
16 byte aeskey (fairplay-decrypted from ekey):
ac a0 37 97 64 0d 4d ff 94 e1 dc 0a de 6f 28 27 

32 byte shared ecdh_secret:
b9 b9 1c 44 5d 4a 6e d8 62 64 99 77 f1 ed 5f 6a 
0a 89 f5 4f dd e1 19 f4 8e c1 54 dc 46 9c fe 65 

Client identified as User-Agent: AirPlay/595.13.1
16 byte aeskey after sha-256 hash with ecdh_secret:
f6 d1 7e ce 84 c6 29 c4 37 5f 93 89 d8 87 0f 8a 

timing_rport = 58600
raop_ntp parse remote ip = 192.168.0.140
raop_ntp starting time
raop_ntp local timing port socket 20 port UDP 7011
raop_rtp parse remote ip = 192.168.0.140
raop_rtp_mirror parse remote ip = 192.168.0.140
eport = 7000, tport = 7011
raop_ntp send_len = 32, now = 1645383699238312

RTSP/1.0 200 OK 
CSeq: 6 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 77 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>timingPort</key>
    <integer>7011</integer>
    <key>eventPort</key>
    <integer>7000</integer>
</dict>
</plist>

raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -1645366124700962
Accepted IPv4 client on socket 21
Local: 192.168.0.170
Remote: 192.168.0.140
Open connections: 2
httpd receiving on socket 19
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 1
CSeq: 7
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 7 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1063 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPTgwOmZhOjViOjVhOjYxOjQ2E2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@kpop4</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>80:fa:5b:5a:61:46</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>80:fa:5b:5a:61:46</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 19
conn_request

GET_PARAMETER rtsp://192.168.0.170/6448156397161170831 RTSP/1.0
Content-Length: 8
Content-Type: text/parameters
CSeq: 8
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

volume 

Handling request GET_PARAMETER with URL rtsp://192.168.0.170/6448156397161170831

RTSP/1.0 200 OK 
CSeq: 8 
Server: AirTunes/220.68 
Content-Type: text/parameters 
Content-Length: 13 

volume: 0.0 

httpd receiving on socket 19
conn_request

RECORD rtsp://192.168.0.170/6448156397161170831 RTSP/1.0
CSeq: 9
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

Handling request RECORD with URL rtsp://192.168.0.170/6448156397161170831
raop_handler_record

RTSP/1.0 200 OK 
CSeq: 9 
Server: AirTunes/220.68 
Audio-Latency: 11025 
Audio-Jack-Status: connected; type=analog 

httpd receiving on socket 19
conn_request

SET_PARAMETER rtsp://192.168.0.170/6448156397161170831 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 10
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

volume: -20.000000 

Handling request SET_PARAMETER with URL rtsp://192.168.0.170/6448156397161170831

RTSP/1.0 200 OK 
CSeq: 10 
Server: AirTunes/220.68 

httpd receiving on socket 19
conn_request

SETUP rtsp://192.168.0.170/6448156397161170831 RTSP/1.0
Content-Length: 204
Content-Type: application/x-apple-binary-plist
CSeq: 11
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>streams</key>
    <array>
        <dict>
            <key>timestampInfo</key>
            <array>
                <dict>
                    <key>name</key>
                    <string>SubSu</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>BePxT</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>AfPxT</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>BefEn</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>EmEnc</string>
                </dict>
            </array>
            <key>latencyMs</key>
            <integer>100</integer>
            <key>type</key>
            <integer>110</integer>
            <key>streamConnectionID</key>
            <integer>967618670142964685</integer>
        </dict>
    </array>
</dict>
</plist>

Handling request SETUP with URL rtsp://192.168.0.170/6448156397161170831
DACP-ID: 1A88199F6226E6E5
Active-Remote: 3835374285
Transport: null
type = 110
streamConnectionID (needed for AES-CTR video decryption key and iv): 967618670142964685
raop_rtp_mirror starting mirroring
raop_rtp_mirror local data port socket 22 port TCP 7100
Mirroring initialized successfully

RTSP/1.0 200 OK 
CSeq: 11 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 85 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>streams</key>
    <array>
        <dict>
            <key>dataPort</key>
            <integer>7100</integer>
            <key>type</key>
            <integer>110</integer>
        </dict>
    </array>
</dict>
</plist>

raop_rtp_mirror accepting client
begin video stream wxh = 1442x1080; source 1442x1080
raop_rtp_mirror width_source = 1442.000000 height_source = 1080.000000 width = 1442.000000 height = 1080.000000
raop_rtp_mirror sps size = 18
raop_rtp_mirror pps size = 4
raop_rtp_mirror video ntp = 1645383699404706, now = 1645383699340099, latency = -64607
Begin streaming to GStreamer video pipeline
raop_rtp_mirror video ntp = 1645383699446398, now = 1645383699352029, latency = -94369
raop_rtp_mirror video ntp = 1645383699471414, now = 1645383699377486, latency = -93928
raop_rtp_mirror video ntp = 1645383699521445, now = 1645383699426946, latency = -94499
raop_rtp_mirror video ntp = 1645383699571476, now = 1645383699479289, latency = -92187
raop_rtp_mirror video ntp = 1645383699621507, now = 1645383699532316, latency = -89191
raop_rtp_mirror video ntp = 1645383699671538, now = 1645383699582057, latency = -89481
raop_rtp_mirror video ntp = 1645383699721569, now = 1645383699634006, latency = -87563
raop_rtp_mirror video ntp = 1645383699771600, now = 1645383699682838, latency = -88762
GStreamer error: Internal data stream error.
raop_rtp_mirror video ntp = 1645383699821631, now = 1645383699730976, latency = -90655
raop_rtp_mirror video ntp = 1645383699871694, now = 1645383699782923, latency = -88771
raop_rtp_mirror video ntp = 1645383699921725, now = 1645383699830707, latency = -91018
raop_rtp_mirror video ntp = 1645383699971756, now = 1645383699880683, latency = -91073
raop_rtp_mirror video ntp = 1645383700021787, now = 1645383699930503, latency = -91284
raop_rtp_mirror video ntp = 1645383700071818, now = 1645383699980016, latency = -91802
raop_rtp_mirror video ntp = 1645383700121849, now = 1645383700029050, latency = -92799
raop_rtp_mirror video ntp = 1645383700171880, now = 1645383700081109, latency = -90771
raop_rtp_mirror video ntp = 1645383700221911, now = 1645383700129192, latency = -92719
raop_rtp_mirror video ntp = 1645383700271942, now = 1645383700180533, latency = -91409
raop_rtp_mirror video ntp = 1645383700330312, now = 1645383700244705, latency = -85607
Removing connection for socket 19
Destroying connection
Open connections: 1
raop_ntp stopping time thread
raop_ntp exiting thread
raop_ntp stopped time thread

Received video streaming performance info packet from client
raop_rtp_mirror exiting TCP thread
Removing connection for socket 21
Destroying connection
Open connections: 0
Exiting HTTP thread
Initialized server socket(s)
Accepted IPv4 client on socket 6
Local: 192.168.0.170
Remote: 192.168.0.140
Open connections: 1
httpd receiving on socket 6
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 1
Content-Length: 70
Content-Type: application/x-apple-binary-plist
CSeq: 0
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>qualifier</key>
    <array>
        <string>txtAirPlay</string>
    </array>
</dict>
</plist>

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 0 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1063 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPTgwOmZhOjViOjVhOjYxOjQ2E2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@kpop4</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>80:fa:5b:5a:61:46</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>80:fa:5b:5a:61:46</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 6
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 667076511
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 1
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

01 00 00 00 2c 44 fa fb e1 89 75 e1 db 98 a4 c6 
1b 89 80 ee cb 70 c5 90 66 84 32 75 14 fa ae 0f 
46 82 1d 3b 10 77 0e 09 82 50 65 02 83 24 fe 75 
41 57 29 30 13 34 fd b3 fe e2 26 fe 44 81 cc ef 
70 8e a9 df 

Handling request POST with URL /pair-verify

RTSP/1.0 200 OK 
CSeq: 1 
Server: AirTunes/220.68 

httpd receiving on socket 6
conn_request

POST /pair-setup RTSP/1.0
Content-Length: 32
Content-Type: application/octet-stream
CSeq: 2
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

10 77 0e 09 82 50 65 02 83 24 fe 75 41 57 29 30 
13 34 fd b3 fe e2 26 fe 44 81 cc ef 70 8e a9 df 

Handling request POST with URL /pair-setup

RTSP/1.0 200 OK 
CSeq: 2 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

f9 d6 f7 a0 e3 aa 4b 41 9d 92 72 6c e0 97 ff ef 
98 cc c4 ed 5e e6 63 2c c4 e6 27 48 50 92 62 83 

httpd receiving on socket 6
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 667076511
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 3
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

01 00 00 00 8f 46 43 d5 5e 50 e7 f6 11 0d 9f 28 
7f 94 80 93 74 55 4c 78 d7 f1 be d6 29 4f e3 81 
7a b4 cc 3c 10 77 0e 09 82 50 65 02 83 24 fe 75 
41 57 29 30 13 34 fd b3 fe e2 26 fe 44 81 cc ef 
70 8e a9 df 

Handling request POST with URL /pair-verify

RTSP/1.0 200 OK 
CSeq: 3 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 96 

76 10 05 ed ab 53 87 18 0c 12 e9 a7 ba d7 b8 90 
1d 10 5c fa 14 3d 20 ad c6 45 34 bb 41 2a f5 56 
c7 81 69 d2 cf 89 f6 bc 37 81 e4 61 af e6 71 e6 
02 d3 5f ec 0b a6 e1 14 5c e5 da 79 15 45 c1 7e 
22 78 c5 cc 7d d8 e9 a0 7d 43 53 c5 9f c3 eb d7 
4d f3 4f 36 68 96 53 8f 3f 5a 1f 65 6f ef 67 43 

httpd receiving on socket 6
conn_request

POST /pair-verify RTSP/1.0
X-Apple-PD: 1
X-Apple-AbsoluteTime: 667076511
Content-Length: 68
Content-Type: application/octet-stream
CSeq: 4
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

00 00 00 00 ea 8e 7a ed f5 ce c1 2a c5 93 23 7c 
49 f3 cd f4 5d fd 20 10 9e 7d 6d dc 81 42 2b a6 
3f 67 dc 7a 10 65 34 17 f1 b3 80 07 79 dd 65 30 
79 83 6e 41 f4 26 de b8 5c 6a fa e7 9d 2e 36 81 
08 3c 3d 1d 

Handling request POST with URL /pair-verify
2nd pair-verify step: checking signature
pair-verify: signature is verified

RTSP/1.0 200 OK 
CSeq: 4 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 

httpd receiving on socket 6
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 16
Content-Type: application/octet-stream
CSeq: 5
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

46 50 4c 59 03 01 01 00 00 00 00 04 02 00 01 bb 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 5 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 142 

46 50 4c 59 03 01 02 00 00 00 00 82 02 01 cf 32 
a2 57 14 b2 52 4f 8a a0 ad 7a f1 64 e3 7b cf 44 
24 e2 00 04 7e fc 0a d6 7a fc d9 5d ed 1c 27 30 
bb 59 1b 96 2e d6 3a 9c 4d ed 88 ba 8f c7 8d e6 
4d 91 cc fd 5c 7b 56 da 88 e3 1f 5c ce af c7 43 
19 95 a0 16 65 a5 4e 19 39 d2 5b 94 db 64 b9 e4 
5d 8d 06 3e 1e 6a f0 7e 96 56 16 2b 0e fa 40 42 
75 ea 5a 44 d9 59 1c 72 56 b9 fb e6 51 38 98 b8 
02 27 72 19 88 57 16 50 94 2a d9 46 68 8a 

httpd receiving on socket 6
conn_request

POST /fp-setup RTSP/1.0
X-Apple-ET: 32
Content-Length: 164
Content-Type: application/octet-stream
CSeq: 6
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

46 50 4c 59 03 01 03 00 00 00 00 98 01 8f 1a 9c 
3c bb b0 71 91 c9 23 7e c7 22 6b d8 92 24 db 3c 
57 98 d0 9f 5f 08 90 12 10 c3 21 87 f6 b3 4a cf 
24 03 76 8b a6 ff f3 c4 20 bd 1b c8 86 dd 77 75 
a1 38 b3 20 e8 8d 26 de f9 88 53 aa aa 9b 2b 29 
72 e3 7c 30 6b cd 9a 43 6a b2 5b 84 68 48 94 53 
90 e8 7a 5a 1d 49 0a 16 4a 57 4b e7 d8 ac 06 02 
29 bb c0 56 8d d1 cc 2e 36 9d c9 74 4d 05 42 66 
41 88 af 3a af 80 63 7b 94 0c ff cc e7 ab 88 4d 
7a 97 9f 87 42 48 b2 ff 57 29 7d 7a 98 94 34 c5 
65 ec ac a8 

Handling request POST with URL /fp-setup

RTSP/1.0 200 OK 
CSeq: 6 
Server: AirTunes/220.68 
Content-Type: application/octet-stream 
Content-Length: 32 

46 50 4c 59 03 01 04 00 00 00 00 14 7a 97 9f 87 
42 48 b2 ff 57 29 7d 7a 98 94 34 c5 65 ec ac a8 

httpd receiving on socket 6
conn_request

SETUP rtsp://192.168.0.170/736674876820441846 RTSP/1.0
Content-Length: 611
Content-Type: application/x-apple-binary-plist
CSeq: 7
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>et</key>
    <integer>32</integer>
    <key>eiv</key>
    <data>
    qcgwH0GlJEKGLkqgvfUNAg==
    </data>
    <key>timingProtocol</key>
    <string>NTP</string>
    <key>sessionUUID</key>
    <string>0A3931E5-BBD6-4AF6-A2AD-7B84B8CE563B</string>
    <key>diagnosticsAndUsage</key>
    <true/>
    <key>osName</key>
    <string>iPhone OS</string>
    <key>osBuildVersion</key>
    <string>19B74</string>
    <key>sourceVersion</key>
    <string>595.13.1</string>
    <key>timingPort</key>
    <integer>56446</integer>
    <key>isScreenMirroringSession</key>
    <true/>
    <key>osVersion</key>
    <string>15.1</string>
    <key>ekey</key>
    <data>
    RlBMWQECAQAAAAA8AAAAAOWWe56qRoqGz9BTfWRKJtUAAAAQlVdpcB7Mcmz8zSP0h7oa
    fOnESkA3l3H7+95fRj9BE7KmD7c3
    </data>
    <key>internalBuild</key>
    <false/>
    <key>deviceID</key>
    <string>9C:E6:5E:A7:F9:20</string>
    <key>model</key>
    <string>iPad8,7</string>
    <key>name</key>
    <string>Kenneth’s iPad Pro 12.9"</string>
    <key>macAddress</key>
    <string>56:19:8A:4A:AB:24</string>
</dict>
</plist>

Handling request SETUP with URL rtsp://192.168.0.170/736674876820441846
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
Transport: null
SETUP 1
eiv_len = 16
16 byte aesiv (needed for AES-CBC audio decryption iv):
a9 c8 30 1f 41 a5 24 42 86 2e 4a a0 bd f5 0d 02 

ekey_len = 72
ekey:
46 50 4c 59 01 02 01 00 00 00 00 3c 00 00 00 00 
e5 96 7b 9e aa 46 8a 86 cf d0 53 7d 64 4a 26 d5 
00 00 00 10 95 57 69 70 1e cc 72 6c fc cd 23 f4 
87 ba 1a 7c e9 c4 4a 40 37 97 71 fb fb de 5f 46 
3f 41 13 b2 a6 0f b7 37 

fairplay_decrypt ret = 0
16 byte aeskey (fairplay-decrypted from ekey):
cf a8 c6 cc 90 20 9b 9e 5c 08 dc ca 57 fa 03 74 

32 byte shared ecdh_secret:
99 1a ab 05 48 2a 65 53 5d 9b 1c 21 e9 d5 b2 4e 
7b a5 a9 66 9e ad 58 eb a2 d9 dd fa 05 1d 54 2f 

Client identified as User-Agent: AirPlay/595.13.1
16 byte aeskey after sha-256 hash with ecdh_secret:
cf a9 5c 0c 50 52 d2 bd 47 52 f2 d5 a3 4b a6 1a 

timing_rport = 56446
raop_ntp parse remote ip = 192.168.0.140
raop_ntp starting time
raop_ntp local timing port socket 19 port UDP 7011
raop_rtp parse remote ip = 192.168.0.140
raop_rtp_mirror parse remote ip = 192.168.0.140
eport = 7000, tport = 7011

RTSP/1.0 200 OK 
CSeq: 7 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 77 

raop_ntp send_len = 32, now = 1645383711543120
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>timingPort</key>
    <integer>7011</integer>
    <key>eventPort</key>
    <integer>7000</integer>
</dict>
</plist>

raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = -1645366124700102
Accepted IPv4 client on socket 20
Local: 192.168.0.170
Remote: 192.168.0.140
Open connections: 2
httpd receiving on socket 6
conn_request

GET /info RTSP/1.0
X-Apple-ProtocolVersion: 1
CSeq: 8
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

Handling request GET with URL /info

RTSP/1.0 200 OK 
CSeq: 8 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 1063 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>txtAirPlay</key>
    <data>
    GmRldmljZWlkPTgwOmZhOjViOjVhOjYxOjQ2E2ZlYXR1cmVzPTB4NUE3RkZFRTYJZmxh
    Z3M9MHg0EG1vZGVsPUFwcGxlVFYzLDJDcGs9YjA3NzI3ZDZmNmNkNmUwOGI1OGVkZTUy
    NWVjM2NkZWFhMjUyYWQ5ZjY4M2ZlYjIxMmVmOGEyMDUyNDY1NTRlNydwaT0yZTM4ODAw
    Ni0xM2JhLTQwNDEtOWE2Ny0yNWRkNGE0M2Q1MzYOc3JjdmVycz0yMjAuNjgEdnY9Mg==
    </data>
    <key>features</key>
    <integer>130367356919</integer>
    <key>name</key>
    <string>UxPlay@kpop4</string>
    <key>audioFormats</key>
    <array>
        <dict>
            <key>type</key>
            <integer>100</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
        <dict>
            <key>type</key>
            <integer>101</integer>
            <key>audioInputFormats</key>
            <integer>67108860</integer>
            <key>audioOutputFormats</key>
            <integer>67108860</integer>
        </dict>
    </array>
    <key>pi</key>
    <string>2e388006-13ba-4041-9a67-25dd4a43d536</string>
    <key>vv</key>
    <integer>2</integer>
    <key>statusFlags</key>
    <integer>68</integer>
    <key>keepAliveLowPower</key>
    <integer>1</integer>
    <key>sourceVersion</key>
    <string>220.68</string>
    <key>pk</key>
    <data>
    sHcn1vbNbgi1jt5SXsPN6qJSrZ9oP+shLviiBSRlVOc=
    </data>
    <key>keepAliveSendStatsAsBody</key>
    <integer>1</integer>
    <key>deviceID</key>
    <string>80:fa:5b:5a:61:46</string>
    <key>audioLatencies</key>
    <array>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>100</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
        <dict>
            <key>outputLatencyMicros</key>
            <false/>
            <key>type</key>
            <integer>101</integer>
            <key>audioType</key>
            <string>default</string>
            <key>inputLatencyMicros</key>
            <false/>
        </dict>
    </array>
    <key>model</key>
    <string>AppleTV3,2</string>
    <key>macAddress</key>
    <string>80:fa:5b:5a:61:46</string>
    <key>displays</key>
    <array>
        <dict>
            <key>uuid</key>
            <string>e0ff8a27-6738-3d56-8a16-cc53aacee925</string>
            <key>widthPhysical</key>
            <false/>
            <key>heightPhysical</key>
            <false/>
            <key>width</key>
            <integer>1920</integer>
            <key>height</key>
            <integer>1080</integer>
            <key>widthPixels</key>
            <integer>1920</integer>
            <key>heightPixels</key>
            <integer>1080</integer>
            <key>rotation</key>
            <false/>
            <key>refreshRate</key>
            <integer>60</integer>
            <key>maxFPS</key>
            <integer>30</integer>
            <key>overscanned</key>
            <false/>
            <key>features</key>
            <integer>14</integer>
        </dict>
    </array>
</dict>
</plist>

httpd receiving on socket 6
conn_request

GET_PARAMETER rtsp://192.168.0.170/736674876820441846 RTSP/1.0
Content-Length: 8
Content-Type: text/parameters
CSeq: 9
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

volume 

Handling request GET_PARAMETER with URL rtsp://192.168.0.170/736674876820441846

RTSP/1.0 200 OK 
CSeq: 9 
Server: AirTunes/220.68 
Content-Type: text/parameters 
Content-Length: 13 

volume: 0.0 

httpd receiving on socket 6
conn_request

RECORD rtsp://192.168.0.170/736674876820441846 RTSP/1.0
CSeq: 10
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

Handling request RECORD with URL rtsp://192.168.0.170/736674876820441846
raop_handler_record

RTSP/1.0 200 OK 
CSeq: 10 
Server: AirTunes/220.68 
Audio-Latency: 11025 
Audio-Jack-Status: connected; type=analog 

httpd receiving on socket 6
conn_request

SET_PARAMETER rtsp://192.168.0.170/736674876820441846 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 11
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

volume: -20.000000 

Handling request SET_PARAMETER with URL rtsp://192.168.0.170/736674876820441846

RTSP/1.0 200 OK 
CSeq: 11 
Server: AirTunes/220.68 

httpd receiving on socket 6
conn_request

SETUP rtsp://192.168.0.170/736674876820441846 RTSP/1.0
Content-Length: 204
Content-Type: application/x-apple-binary-plist
CSeq: 12
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>streams</key>
    <array>
        <dict>
            <key>timestampInfo</key>
            <array>
                <dict>
                    <key>name</key>
                    <string>SubSu</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>BePxT</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>AfPxT</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>BefEn</string>
                </dict>
                <dict>
                    <key>name</key>
                    <string>EmEnc</string>
                </dict>
            </array>
            <key>latencyMs</key>
            <integer>100</integer>
            <key>type</key>
            <integer>110</integer>
            <key>streamConnectionID</key>
            <integer>8797705803375526924</integer>
        </dict>
    </array>
</dict>
</plist>

Handling request SETUP with URL rtsp://192.168.0.170/736674876820441846
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
Transport: null
type = 110
streamConnectionID (needed for AES-CTR video decryption key and iv): 8797705803375526924
raop_rtp_mirror starting mirroring
raop_rtp_mirror local data port socket 21 port TCP 7100
Mirroring initialized successfully

RTSP/1.0 200 OK 
CSeq: 12 
Server: AirTunes/220.68 
Content-Type: application/x-apple-binary-plist 
Content-Length: 85 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>streams</key>
    <array>
        <dict>
            <key>dataPort</key>
            <integer>7100</integer>
            <key>type</key>
            <integer>110</integer>
        </dict>
    </array>
</dict>
</plist>

raop_rtp_mirror accepting client
begin video stream wxh = 1442x1080; source 1442x1080
raop_rtp_mirror width_source = 1442.000000 height_source = 1080.000000 width = 1442.000000 height = 1080.000000
raop_rtp_mirror sps size = 18
raop_rtp_mirror pps size = 4
raop_rtp_mirror video ntp = 1645383711719875, now = 1645383711653950, latency = -65925
raop_rtp_mirror video ntp = 1645383711761568, now = 1645383711665190, latency = -96378
raop_rtp_mirror video ntp = 1645383711786583, now = 1645383711693112, latency = -93471
raop_rtp_mirror video ntp = 1645383711803250, now = 1645383711742146, latency = -61104
raop_rtp_mirror video ntp = 1645383711836614, now = 1645383711746543, latency = -90071
raop_rtp_mirror video ntp = 1645383711886645, now = 1645383711797511, latency = -89134
raop_rtp_mirror video ntp = 1645383711936676, now = 1645383711847983, latency = -88693
raop_rtp_mirror video ntp = 1645383711986707, now = 1645383711898532, latency = -88175
raop_rtp_mirror video ntp = 1645383712036738, now = 1645383711948824, latency = -87914
raop_rtp_mirror video ntp = 1645383712086769, now = 1645383711997877, latency = -88892
raop_rtp_mirror video ntp = 1645383712136800, now = 1645383712047818, latency = -88982
raop_rtp_mirror video ntp = 1645383712186831, now = 1645383712097380, latency = -89451
raop_rtp_mirror video ntp = 1645383712236862, now = 1645383712148856, latency = -88006
raop_rtp_mirror video ntp = 1645383712286893, now = 1645383712198139, latency = -88754
raop_rtp_mirror video ntp = 1645383712336924, now = 1645383712246506, latency = -90418
raop_rtp_mirror video ntp = 1645383712386955, now = 1645383712297210, latency = -89745
raop_rtp_mirror video ntp = 1645383712436986, now = 1645383712344218, latency = -92768
raop_rtp_mirror video ntp = 1645383712487017, now = 1645383712397381, latency = -89636
raop_rtp_mirror video ntp = 1645383712537048, now = 1645383712446662, latency = -90386
raop_rtp_mirror video ntp = 1645383712587079, now = 1645383712497705, latency = -89374
raop_rtp_mirror video ntp = 1645383712637110, now = 1645383712549763, latency = -87347
raop_rtp_mirror video ntp = 1645383712687141, now = 1645383712596772, latency = -90369

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383712737172, now = 1645383712646234, latency = -90938
raop_rtp_mirror video ntp = 1645383712795542, now = 1645383712707487, latency = -88055
raop_rtp_mirror video ntp = 1645383712845573, now = 1645383712755227, latency = -90346
raop_rtp_mirror video ntp = 1645383712878927, now = 1645383712788608, latency = -90319
raop_rtp_mirror video ntp = 1645383712937296, now = 1645383712847787, latency = -89509
raop_rtp_mirror video ntp = 1645383712987327, now = 1645383712896168, latency = -91159
raop_rtp_mirror video ntp = 1645383713020681, now = 1645383712930648, latency = -90033
raop_rtp_mirror video ntp = 1645383713054015, now = 1645383712992334, latency = -61681
raop_rtp_mirror video ntp = 1645383713095728, now = 1645383713004668, latency = -91060
raop_rtp_mirror video ntp = 1645383713145759, now = 1645383713055200, latency = -90559
raop_rtp_mirror video ntp = 1645383713195790, now = 1645383713105698, latency = -90092
raop_rtp_mirror video ntp = 1645383713245821, now = 1645383713156244, latency = -89577
raop_rtp_mirror video ntp = 1645383713279175, now = 1645383713189191, latency = -89984
raop_rtp_mirror video ntp = 1645383713337544, now = 1645383713247401, latency = -90143
raop_rtp_mirror video ntp = 1645383713387575, now = 1645383713297685, latency = -89890
raop_rtp_mirror video ntp = 1645383713420929, now = 1645383713329795, latency = -91134
raop_rtp_mirror video ntp = 1645383713454263, now = 1645383713396086, latency = -58177
raop_rtp_mirror video ntp = 1645383713504314, now = 1645383713414219, latency = -90095
raop_rtp_mirror video ntp = 1645383713554345, now = 1645383713464250, latency = -90095
raop_rtp_mirror video ntp = 1645383713587699, now = 1645383713498152, latency = -89547
raop_rtp_mirror video ntp = 1645383713637730, now = 1645383713547457, latency = -90273
httpd receiving on socket 6
conn_request

POST /feedback RTSP/1.0
CSeq: 13
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 13 
Server: AirTunes/220.68 

raop_rtp_mirror video ntp = 1645383713687761, now = 1645383713597172, latency = -90589

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383713737792, now = 1645383713647889, latency = -89903
raop_rtp_mirror video ntp = 1645383713787823, now = 1645383713698720, latency = -89103
raop_rtp_mirror video ntp = 1645383713821177, now = 1645383713731652, latency = -89525
raop_rtp_mirror video ntp = 1645383713879547, now = 1645383713790567, latency = -88980
raop_rtp_mirror video ntp = 1645383713929578, now = 1645383713840029, latency = -89549
raop_rtp_mirror video ntp = 1645383713987947, now = 1645383713902498, latency = -85449
raop_rtp_mirror video ntp = 1645383714037978, now = 1645383713948455, latency = -89523
raop_rtp_mirror video ntp = 1645383714088009, now = 1645383714001075, latency = -86934
raop_rtp_mirror video ntp = 1645383714138040, now = 1645383714048802, latency = -89238
raop_rtp_mirror video ntp = 1645383714188071, now = 1645383714098900, latency = -89171
raop_rtp_mirror video ntp = 1645383714221425, now = 1645383714132986, latency = -88439
raop_rtp_mirror video ntp = 1645383714254759, now = 1645383714196722, latency = -58037
raop_rtp_mirror video ntp = 1645383714296472, now = 1645383714207422, latency = -89050
raop_rtp_mirror video ntp = 1645383714329826, now = 1645383714239963, latency = -89863
raop_rtp_mirror video ntp = 1645383714379857, now = 1645383714289402, latency = -90455
raop_rtp_mirror video ntp = 1645383714446565, now = 1645383714356052, latency = -90513
raop_rtp_mirror video ntp = 1645383714479919, now = 1645383714390009, latency = -89910
raop_rtp_mirror video ntp = 1645383714529950, now = 1645383714440291, latency = -89659
raop_rtp_mirror video ntp = 1645383714596658, now = 1645383714506399, latency = -90259
raop_ntp send_len = 32, now = 1645383714547451
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
raop_rtp_mirror video ntp = 1645383714655027, now = 1645383714565694, latency = -89333
raop_rtp_mirror video ntp = 1645383714688381, now = 1645383714597796, latency = -90585

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383714746751, now = 1645383714656475, latency = -90276
raop_rtp_mirror video ntp = 1645383714796782, now = 1645383714708289, latency = -88493
raop_rtp_mirror video ntp = 1645383714846813, now = 1645383714756659, latency = -90154
raop_rtp_mirror video ntp = 1645383714880167, now = 1645383714789425, latency = -90742
raop_rtp_mirror video ntp = 1645383714938536, now = 1645383714847989, latency = -90547
raop_rtp_mirror video ntp = 1645383714988567, now = 1645383714897310, latency = -91257
raop_rtp_mirror video ntp = 1645383715021921, now = 1645383714931978, latency = -89943
raop_rtp_mirror video ntp = 1645383715080291, now = 1645383714990579, latency = -89712
raop_rtp_mirror video ntp = 1645383715130322, now = 1645383715040610, latency = -89712
raop_rtp_mirror video ntp = 1645383715180353, now = 1645383715090386, latency = -89967
raop_rtp_mirror video ntp = 1645383715230384, now = 1645383715138695, latency = -91689
raop_rtp_mirror video ntp = 1645383715280415, now = 1645383715189941, latency = -90474
raop_rtp_mirror video ntp = 1645383715330446, now = 1645383715240527, latency = -89919
raop_rtp_mirror video ntp = 1645383715380477, now = 1645383715290896, latency = -89581
raop_rtp_mirror video ntp = 1645383715413831, now = 1645383715323844, latency = -89987
raop_rtp_mirror video ntp = 1645383715447164, now = 1645383715388520, latency = -58644
raop_rtp_mirror video ntp = 1645383715488877, now = 1645383715398162, latency = -90715
raop_rtp_mirror video ntp = 1645383715538908, now = 1645383715449730, latency = -89178
raop_rtp_mirror video ntp = 1645383715597278, now = 1645383715510027, latency = -87251
raop_rtp_mirror video ntp = 1645383715647309, now = 1645383715557012, latency = -90297
raop_rtp_mirror video ntp = 1645383715680663, now = 1645383715589937, latency = -90726

Received video streaming performance info packet from client
httpd receiving on socket 6
conn_request

POST /feedback RTSP/1.0
CSeq: 14
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 14 
Server: AirTunes/220.68 

raop_rtp_mirror video ntp = 1645383715739032, now = 1645383715649171, latency = -89861
raop_rtp_mirror video ntp = 1645383715789063, now = 1645383715699807, latency = -89256
raop_rtp_mirror video ntp = 1645383715822417, now = 1645383715731618, latency = -90799
raop_rtp_mirror video ntp = 1645383715880787, now = 1645383715791175, latency = -89612
raop_rtp_mirror video ntp = 1645383715930818, now = 1645383715841608, latency = -89210
raop_rtp_mirror video ntp = 1645383715989187, now = 1645383715901840, latency = -87347
raop_rtp_mirror video ntp = 1645383716039218, now = 1645383715949571, latency = -89647
raop_rtp_mirror video ntp = 1645383716089249, now = 1645383715999039, latency = -90210
raop_rtp_mirror video ntp = 1645383716139280, now = 1645383716048977, latency = -90303
raop_rtp_mirror video ntp = 1645383716189311, now = 1645383716099474, latency = -89837
raop_rtp_mirror video ntp = 1645383716222665, now = 1645383716133685, latency = -88980
raop_rtp_mirror video ntp = 1645383716281035, now = 1645383716190776, latency = -90259
raop_rtp_mirror video ntp = 1645383716331066, now = 1645383716240431, latency = -90635
raop_rtp_mirror video ntp = 1645383716389435, now = 1645383716303870, latency = -85565
raop_rtp_mirror video ntp = 1645383716439466, now = 1645383716348773, latency = -90693
raop_rtp_mirror video ntp = 1645383716489497, now = 1645383716399016, latency = -90481
raop_rtp_mirror video ntp = 1645383716539528, now = 1645383716449469, latency = -90059
raop_rtp_mirror video ntp = 1645383716589559, now = 1645383716499131, latency = -90428
raop_rtp_mirror video ntp = 1645383716622913, now = 1645383716532281, latency = -90632
raop_rtp_mirror video ntp = 1645383716681283, now = 1645383716591471, latency = -89812

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383716731314, now = 1645383716640666, latency = -90648
raop_rtp_mirror video ntp = 1645383716789683, now = 1645383716702063, latency = -87620
raop_rtp_mirror video ntp = 1645383716839714, now = 1645383716749634, latency = -90080
raop_rtp_mirror video ntp = 1645383716889745, now = 1645383716799305, latency = -90440
raop_rtp_mirror video ntp = 1645383716939776, now = 1645383716849750, latency = -90026
raop_rtp_mirror video ntp = 1645383716989807, now = 1645383716900847, latency = -88960
raop_rtp_mirror video ntp = 1645383717023161, now = 1645383716933579, latency = -89582
raop_rtp_mirror video ntp = 1645383717081531, now = 1645383716990193, latency = -91338
raop_rtp_mirror video ntp = 1645383717131562, now = 1645383717041578, latency = -89984
raop_rtp_mirror video ntp = 1645383717189931, now = 1645383717102839, latency = -87092
raop_rtp_mirror video ntp = 1645383717239962, now = 1645383717149787, latency = -90175
raop_rtp_mirror video ntp = 1645383717289993, now = 1645383717199847, latency = -90146
raop_rtp_mirror video ntp = 1645383717340024, now = 1645383717249721, latency = -90303
raop_rtp_mirror video ntp = 1645383717390055, now = 1645383717300884, latency = -89171
raop_rtp_mirror video ntp = 1645383717423409, now = 1645383717395858, latency = -27551
raop_rtp_mirror video ntp = 1645383717456743, now = 1645383717408988, latency = -47755
raop_rtp_mirror video ntp = 1645383717490117, now = 1645383717411782, latency = -78335
raop_rtp_mirror video ntp = 1645383717548487, now = 1645383717487477, latency = -61010
raop_rtp_mirror video ntp = 1645383717581841, now = 1645383717492590, latency = -89251
raop_rtp_mirror video ntp = 1645383717631872, now = 1645383717543410, latency = -88462
raop_ntp send_len = 32, now = 1645383717552291
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
raop_rtp_mirror video ntp = 1645383717681903, now = 1645383717594964, latency = -86939

Received video streaming performance info packet from client
httpd receiving on socket 6
conn_request

POST /feedback RTSP/1.0
CSeq: 15
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 15 
Server: AirTunes/220.68 

raop_rtp_mirror video ntp = 1645383717731934, now = 1645383717642696, latency = -89238
raop_rtp_mirror video ntp = 1645383717781965, now = 1645383717691993, latency = -89972
raop_rtp_mirror video ntp = 1645383717815319, now = 1645383717725013, latency = -90306
raop_rtp_mirror video ntp = 1645383717848652, now = 1645383717789191, latency = -59461
raop_rtp_mirror video ntp = 1645383717898704, now = 1645383717809524, latency = -89180
raop_rtp_mirror video ntp = 1645383717948735, now = 1645383717859178, latency = -89557
raop_rtp_mirror video ntp = 1645383717990427, now = 1645383717900812, latency = -89615
raop_rtp_mirror video ntp = 1645383718048797, now = 1645383717958397, latency = -90400
raop_rtp_mirror video ntp = 1645383718098828, now = 1645383718010222, latency = -88606
raop_rtp_mirror video ntp = 1645383718140520, now = 1645383718053284, latency = -87236
raop_rtp_mirror video ntp = 1645383718190551, now = 1645383718101561, latency = -88990
raop_rtp_mirror video ntp = 1645383718223905, now = 1645383718133142, latency = -90763
raop_rtp_mirror video ntp = 1645383718282275, now = 1645383718192300, latency = -89975
raop_rtp_mirror video ntp = 1645383718332306, now = 1645383718241648, latency = -90658
raop_rtp_mirror video ntp = 1645383718382337, now = 1645383718292045, latency = -90292
raop_rtp_mirror video ntp = 1645383718432368, now = 1645383718341927, latency = -90441
raop_rtp_mirror video ntp = 1645383718482399, now = 1645383718392352, latency = -90047
raop_rtp_mirror video ntp = 1645383718532430, now = 1645383718442370, latency = -90060
raop_rtp_mirror video ntp = 1645383718582461, now = 1645383718489478, latency = -92983
raop_rtp_mirror video ntp = 1645383718615815, now = 1645383718522369, latency = -93446
raop_rtp_mirror video ntp = 1645383718649148, now = 1645383718588669, latency = -60479
raop_rtp_mirror video ntp = 1645383718690861, now = 1645383718599762, latency = -91099

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383718740892, now = 1645383718650928, latency = -89964
raop_rtp_mirror video ntp = 1645383718790923, now = 1645383718701110, latency = -89813
raop_rtp_mirror video ntp = 1645383718840954, now = 1645383718750919, latency = -90035
raop_rtp_mirror video ntp = 1645383718874308, now = 1645383718783540, latency = -90768
raop_rtp_mirror video ntp = 1645383718932678, now = 1645383718843055, latency = -89623
raop_rtp_mirror video ntp = 1645383718982709, now = 1645383718893477, latency = -89232
raop_rtp_mirror video ntp = 1645383719016063, now = 1645383718925412, latency = -90651
raop_rtp_mirror video ntp = 1645383719049396, now = 1645383718991329, latency = -58067
raop_rtp_mirror video ntp = 1645383719091109, now = 1645383719000244, latency = -90865
raop_rtp_mirror video ntp = 1645383719141140, now = 1645383719050762, latency = -90378
raop_rtp_mirror video ntp = 1645383719191171, now = 1645383719100597, latency = -90574
raop_rtp_mirror video ntp = 1645383719241202, now = 1645383719150906, latency = -90296
raop_rtp_mirror video ntp = 1645383719274556, now = 1645383719185747, latency = -88809
raop_rtp_mirror video ntp = 1645383719307890, now = 1645383719248019, latency = -59871
raop_rtp_mirror video ntp = 1645383719341264, now = 1645383719253685, latency = -87579
raop_rtp_mirror video ntp = 1645383719399634, now = 1645383719308659, latency = -90975
raop_rtp_mirror video ntp = 1645383719449665, now = 1645383719361537, latency = -88128
raop_rtp_mirror video ntp = 1645383719499696, now = 1645383719409578, latency = -90118
raop_rtp_mirror video ntp = 1645383719549727, now = 1645383719459402, latency = -90325
raop_rtp_mirror video ntp = 1645383719599758, now = 1645383719510261, latency = -89497
raop_rtp_mirror video ntp = 1645383719649789, now = 1645383719559674, latency = -90115
raop_rtp_mirror video ntp = 1645383719683143, now = 1645383719592417, latency = -90726

Received video streaming performance info packet from client
httpd receiving on socket 6
conn_request

POST /feedback RTSP/1.0
CSeq: 16
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 16 
Server: AirTunes/220.68 

raop_rtp_mirror video ntp = 1645383719733174, now = 1645383719641964, latency = -91210
raop_rtp_mirror video ntp = 1645383719799882, now = 1645383719709651, latency = -90231
raop_rtp_mirror video ntp = 1645383719849913, now = 1645383719759354, latency = -90559
raop_rtp_mirror video ntp = 1645383719899944, now = 1645383719809822, latency = -90122
raop_rtp_mirror video ntp = 1645383719949975, now = 1645383719859452, latency = -90523
raop_rtp_mirror video ntp = 1645383720000006, now = 1645383719909706, latency = -90300
raop_rtp_mirror video ntp = 1645383720050037, now = 1645383719961690, latency = -88347
raop_rtp_mirror video ntp = 1645383720083391, now = 1645383719992275, latency = -91116
raop_rtp_mirror video ntp = 1645383720133422, now = 1645383720042880, latency = -90542
raop_rtp_mirror video ntp = 1645383720166755, now = 1645383720110624, latency = -56131
raop_rtp_mirror video ntp = 1645383720208505, now = 1645383720117765, latency = -90740
raop_rtp_mirror video ntp = 1645383720258536, now = 1645383720164643, latency = -93893
raop_rtp_mirror video ntp = 1645383720291891, now = 1645383720202927, latency = -88964
raop_rtp_mirror video ntp = 1645383720341922, now = 1645383720251414, latency = -90508
raop_rtp_mirror video ntp = 1645383720391954, now = 1645383720302539, latency = -89415
raop_rtp_mirror video ntp = 1645383720441985, now = 1645383720351593, latency = -90392
raop_rtp_mirror video ntp = 1645383720475339, now = 1645383720384206, latency = -91133
raop_rtp_mirror video ntp = 1645383720508673, now = 1645383720448942, latency = -59731
raop_rtp_mirror video ntp = 1645383720550387, now = 1645383720459214, latency = -91173
raop_rtp_mirror video ntp = 1645383720583741, now = 1645383720493626, latency = -90115
raop_rtp_mirror video ntp = 1645383720617095, now = 1645383720525950, latency = -91145
raop_ntp send_len = 32, now = 1645383720562520
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 0
raop_rtp_mirror video ntp = 1645383720650429, now = 1645383720589213, latency = -61216
raop_rtp_mirror video ntp = 1645383720692143, now = 1645383720601514, latency = -90629

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383720742174, now = 1645383720652016, latency = -90158
raop_rtp_mirror video ntp = 1645383720792206, now = 1645383720702160, latency = -90046
raop_rtp_mirror video ntp = 1645383720842237, now = 1645383720751923, latency = -90314
raop_rtp_mirror video ntp = 1645383720883930, now = 1645383720793714, latency = -90216
raop_rtp_mirror video ntp = 1645383720917263, now = 1645383720856822, latency = -60441
raop_rtp_mirror video ntp = 1645383720950639, now = 1645383720863845, latency = -86794
raop_rtp_mirror video ntp = 1645383720992332, now = 1645383720901621, latency = -90711
raop_rtp_mirror video ntp = 1645383721042363, now = 1645383720951583, latency = -90780
raop_rtp_mirror video ntp = 1645383721092395, now = 1645383721001990, latency = -90405
raop_rtp_mirror video ntp = 1645383721142426, now = 1645383721051497, latency = -90929
raop_rtp_mirror video ntp = 1645383721192458, now = 1645383721101851, latency = -90607
raop_rtp_mirror video ntp = 1645383721242489, now = 1645383721152729, latency = -89760
raop_rtp_mirror video ntp = 1645383721275843, now = 1645383721186502, latency = -89341
raop_rtp_mirror video ntp = 1645383721309177, now = 1645383721249822, latency = -59355
raop_rtp_mirror video ntp = 1645383721350891, now = 1645383721261799, latency = -89092
raop_rtp_mirror video ntp = 1645383721384245, now = 1645383721293127, latency = -91118
raop_rtp_mirror video ntp = 1645383721417599, now = 1645383721326028, latency = -91571
raop_rtp_mirror video ntp = 1645383721450933, now = 1645383721391865, latency = -59068
raop_rtp_mirror video ntp = 1645383721492647, now = 1645383721401847, latency = -90800
raop_rtp_mirror video ntp = 1645383721542678, now = 1645383721451505, latency = -91173
raop_rtp_mirror video ntp = 1645383721592710, now = 1645383721503149, latency = -89561
raop_rtp_mirror video ntp = 1645383721642741, now = 1645383721552342, latency = -90399
raop_rtp_mirror video ntp = 1645383721676095, now = 1645383721584531, latency = -91564

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383721734466, now = 1645383721646647, latency = -87819
httpd receiving on socket 6
conn_request

POST /feedback RTSP/1.0
CSeq: 17
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 17 
Server: AirTunes/220.68 

raop_rtp_mirror video ntp = 1645383721784497, now = 1645383721693401, latency = -91096
raop_rtp_mirror video ntp = 1645383721817851, now = 1645383721727282, latency = -90569
raop_rtp_mirror video ntp = 1645383721851185, now = 1645383721790951, latency = -60234
raop_rtp_mirror video ntp = 1645383721892899, now = 1645383721802752, latency = -90147
raop_rtp_mirror video ntp = 1645383721942930, now = 1645383721853136, latency = -89794
raop_rtp_mirror video ntp = 1645383721992962, now = 1645383721903849, latency = -89113
raop_rtp_mirror video ntp = 1645383722042993, now = 1645383721954433, latency = -88560
raop_rtp_mirror video ntp = 1645383722076347, now = 1645383721986808, latency = -89539
raop_rtp_mirror video ntp = 1645383722109681, now = 1645383722052863, latency = -56818
raop_rtp_mirror video ntp = 1645383722151395, now = 1645383722062907, latency = -88488
raop_rtp_mirror video ntp = 1645383722184749, now = 1645383722096483, latency = -88266
raop_rtp_mirror video ntp = 1645383722218103, now = 1645383722128858, latency = -89245
raop_rtp_mirror video ntp = 1645383722251437, now = 1645383722192129, latency = -59308
raop_rtp_mirror video ntp = 1645383722301489, now = 1645383722211648, latency = -89841
raop_rtp_mirror video ntp = 1645383722351521, now = 1645383722264071, latency = -87450
raop_rtp_mirror video ntp = 1645383722384875, now = 1645383722294381, latency = -90494
raop_rtp_mirror video ntp = 1645383722434907, now = 1645383722344558, latency = -90349
raop_rtp_mirror video ntp = 1645383722484938, now = 1645383722394798, latency = -90140
raop_rtp_mirror video ntp = 1645383722534970, now = 1645383722444673, latency = -90297
raop_rtp_mirror video ntp = 1645383722585001, now = 1645383722494351, latency = -90650
raop_rtp_mirror video ntp = 1645383722618355, now = 1645383722528356, latency = -89999
raop_rtp_mirror video ntp = 1645383722651689, now = 1645383722592578, latency = -59111
raop_rtp_mirror video ntp = 1645383722693403, now = 1645383722606597, latency = -86806

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383722743434, now = 1645383722653152, latency = -90282
raop_rtp_mirror video ntp = 1645383722793466, now = 1645383722702977, latency = -90489
raop_rtp_mirror video ntp = 1645383722843497, now = 1645383722752362, latency = -91135
raop_rtp_mirror video ntp = 1645383722876851, now = 1645383722785461, latency = -91390
raop_rtp_mirror video ntp = 1645383722910185, now = 1645383722848043, latency = -62142
raop_rtp_mirror video ntp = 1645383722943560, now = 1645383722854800, latency = -88760
raop_rtp_mirror video ntp = 1645383722993592, now = 1645383722903527, latency = -90065
raop_rtp_mirror video ntp = 1645383723043623, now = 1645383722952807, latency = -90816
raop_rtp_mirror video ntp = 1645383723093655, now = 1645383723004433, latency = -89222
raop_rtp_mirror video ntp = 1645383723143686, now = 1645383723053753, latency = -89933
raop_rtp_mirror video ntp = 1645383723193718, now = 1645383723103453, latency = -90265
raop_rtp_mirror video ntp = 1645383723243749, now = 1645383723153696, latency = -90053
raop_rtp_mirror video ntp = 1645383723277103, now = 1645383723185758, latency = -91345
raop_rtp_mirror video ntp = 1645383723310437, now = 1645383723248661, latency = -61776
raop_rtp_mirror video ntp = 1645383723343812, now = 1645383723254908, latency = -88904
raop_rtp_mirror video ntp = 1645383723393844, now = 1645383723302926, latency = -90918
raop_rtp_mirror video ntp = 1645383723452214, now = 1645383723363860, latency = -88354
raop_rtp_mirror video ntp = 1645383723502245, now = 1645383723412242, latency = -90003
raop_rtp_mirror video ntp = 1645383723535600, now = 1645383723444639, latency = -90961
raop_rtp_mirror video ntp = 1645383723585631, now = 1645383723495908, latency = -89723
raop_rtp_mirror video ntp = 1645383723635663, now = 1645383723545215, latency = -90448
raop_ntp send_len = 32, now = 1645383723567847
raop_ntp receive time type_t packetlen = 32
raop_ntp sync correction = 597
raop_rtp_mirror video ntp = 1645383723685097, now = 1645383723594682, latency = -90415

Received video streaming performance info packet from client
raop_rtp_mirror video ntp = 1645383723735129, now = 1645383723644717, latency = -90412
httpd receiving on socket 6
conn_request

POST /feedback RTSP/1.0
CSeq: 18
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

Handling request POST with URL /feedback
raop_handler_feedback

RTSP/1.0 200 OK 
CSeq: 18 
Server: AirTunes/220.68 

raop_rtp_mirror video ntp = 1645383723785160, now = 1645383723694530, latency = -90630
raop_rtp_mirror video ntp = 1645383723818514, now = 1645383723728139, latency = -90375
raop_rtp_mirror video ntp = 1645383723851848, now = 1645383723792584, latency = -59264
raop_rtp_mirror video ntp = 1645383723893562, now = 1645383723803120, latency = -90442
raop_rtp_mirror video ntp = 1645383723943593, now = 1645383723853609, latency = -89984
raop_rtp_mirror video ntp = 1645383723993625, now = 1645383723904097, latency = -89528
raop_rtp_mirror video ntp = 1645383724043656, now = 1645383723954719, latency = -88937
raop_rtp_mirror video ntp = 1645383724093688, now = 1645383724001609, latency = -92079
httpd receiving on socket 6
conn_request

SET_PARAMETER rtsp://192.168.0.170/736674876820441846 RTSP/1.0
Content-Length: 20
Content-Type: text/parameters
CSeq: 19
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

volume: -30.000000 

Handling request SET_PARAMETER with URL rtsp://192.168.0.170/736674876820441846

RTSP/1.0 200 OK 
CSeq: 19 
Server: AirTunes/220.68 

raop_rtp_mirror tcp socket closed
httpd receiving on socket 6
conn_request

TEARDOWN rtsp://192.168.0.170/736674876820441846 RTSP/1.0
Content-Length: 69
Content-Type: application/x-apple-binary-plist
CSeq: 20
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>streams</key>
    <array>
        <dict>
            <key>type</key>
            <integer>110</integer>
        </dict>
    </array>
</dict>
</plist>

Handling request TEARDOWN with URL rtsp://192.168.0.170/736674876820441846
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>streams</key>
    <array>
        <dict>
            <key>type</key>
            <integer>110</integer>
        </dict>
    </array>
</dict>
</plist>

TEARDOWN request,  96=0, 110=1
raop_rtp_mirror exiting TCP thread

RTSP/1.0 200 OK 
CSeq: 20 
Server: AirTunes/220.68 

httpd receiving on socket 6
conn_request

TEARDOWN rtsp://192.168.0.170/736674876820441846 RTSP/1.0
Content-Length: 42
Content-Type: application/x-apple-binary-plist
CSeq: 21
DACP-ID: 6B24AB60FC104D46
Active-Remote: 2615597776
User-Agent: AirPlay/595.13.1

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

Handling request TEARDOWN with URL rtsp://192.168.0.170/736674876820441846
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

TEARDOWN request,  96=0, 110=0

RTSP/1.0 200 OK 
CSeq: 21 
Server: AirTunes/220.68 

httpd receiving on socket 6
Connection closed for socket 6
Destroying connection
Open connections: 1
raop_ntp stopping time thread
raop_ntp exiting thread
raop_ntp stopped time thread
httpd receiving on socket 20
Connection closed for socket 20
Destroying connection
Open connections: 0
Stopping...
Exiting HTTP thread

This is a pcap from the iOS 15.1 attempt with capture filter where host 192.168.0.140 is the iPad client:

host 192.168.0.140 and (udp and (port 7011 or port 6000 or port 6001)) or (tcp and (port 7100 or port 7000 or port 7001))
fduncanh commented 2 years ago

can you start a new issue with this, I dont think it is same as @trin4ik 's issue.

It looks like the video pipeline didnt start. I have pop!_os 21.10 on a virtualbox, and may add an extra debug output at the point where the video is supposed to start.

EDIT it's not on virtual box, its a true PoP!_os install. (NVIDIA edition). will test

fduncanh commented 2 years ago

@qrkourier

worked perfectly for me on Pop!-OS 21.10 (Nvidia edition)

Linux pop-os 5.15.23-76051523-generic #202202110435~1644952300~21.10~96763f1 SMP Tue Feb 15 19:52:40 U x86_64 x86_64 x86_64 GNU/Linux

(since its not a uxplay (RAOP) error, don't bother with the -d option) instead use export GST_DEBUG=2 to see GStreamer errors and warnings, then run uxplay

$ export  GST_DEBUG=2
$ uxplay
using system MAC address xx:xx:xx:xx:xx:xx
Initialized server socket(s)
Accepted IPv4 client on socket 28
Local: 192.168.1.10
Remote: 192.168.1.38
Open connections: 1
Client identified as User-Agent: AirPlay/600.8.1
Accepted IPv4 client on socket 30
Local: 192.168.1.10
Remote: 192.168.1.38
Open connections: 2
raop_rtp_mirror starting mirroring
Begin streaming to GStreamer video pipeline
ct=8 spf=480 usingScreen=1 isMedia=1  audioFormat=0x1000000
start audio connection, format AAC-ELD 44100/2
raop_rtp starting audio
0:00:25.873451325  5649 0x7fb1c8007b60 WARN                   pulse pulsesink.c:702:gst_pulsering_stream_underflow_cb:<autoaudiosink0-actual-sink-pulse> Got underflow

There is only some kind of audio underflow warning from GStreamer, that all. I'm concerned that I didn't see "Begin streaming to GStreamer video pipeline" in your out[put

I don't see how this could happen unless the video pipeline wasn't started. I'll put some extra error message to monitor for this and let you know when its on github (next hour or so)_

fduncanh commented 2 years ago

@qrkourier looking at your debug output again, I see you do have the correct message.

Begin streaming to GStreamer video pipeline
raop_rtp_mirror video ntp = 1645383699446398, now = 1645383699352029, latency = -94369
raop_rtp_mirror video ntp = 1645383699471414, now = 1645383699377486, latency = -93928
raop_rtp_mirror video ntp = 1645383699521445, now = 1645383699426946, latency = -94499
raop_rtp_mirror video ntp = 1645383699571476, now = 1645383699479289, latency = -92187
raop_rtp_mirror video ntp = 1645383699621507, now = 1645383699532316, latency = -89191
raop_rtp_mirror video ntp = 1645383699671538, now = 1645383699582057, latency = -89481
raop_rtp_mirror video ntp = 1645383699721569, now = 1645383699634006, latency = -87563
raop_rtp_mirror video ntp = 1645383699771600, now = 1645383699682838, latency = -88762
GStreamer error: Internal data stream error.
raop_rtp_mirror video ntp = 1645383699821631, now = 1645383699730976, latency = -90655
raop_rtp_mirror video ntp = 1645383699871694, now = 1645383699782923, latency = -88771
raop_rtp_mirror video ntp = 1645383699921725, now = 1645383699830707, latency = -91018
raop_rtp_mirror video ntp = 1645383699971756, now = 1645383699880683, latency = -91073
raop_rtp_mirror video ntp = 1645383700021787, now = 1645383699930503, latency = -91284
raop_rtp_mirror video ntp = 1645383700071818, now = 1645383699980016, latency = -91802
raop_rtp_mirror video ntp = 1645383700121849, now = 1645383700029050, latency = -92799
raop_rtp_mirror video ntp = 1645383700171880, now = 1645383700081109, latency = -90771
raop_rtp_mirror video ntp = 1645383700221911, now = 1645383700129192, latency = -92719
raop_rtp_mirror video ntp = 1645383700271942, now = 1645383700180533, latency = -91409
raop_rtp_mirror video ntp = 1645383700330312, now = 1645383700244705, latency = -85607
Removing connection for socket 19
Destroying connection
Open connections: 1
raop_ntp stopping time thread
raop_ntp exiting thread
raop_ntp stopped time thread

Received video streaming performance info packet from client
raop_rtp_mirror exiting TCP thread
Removing connection for socket 21
Destroying connection
Open connections: 0
Exiting HTTP thread

What happened after this is confusing. Did you restart uxplay, or did it renegotiate a new connection by itself?

Its possible that "raop_rtp_mirror exiting TCP thread" might leave the video in a closed state, and i will need to check that

but the error that led there was some GStreamer issue.

EDIT: so what you need to do is correct the GStreamer issues. GST_DEBUG=2 should be useful.

qrkourier commented 2 years ago

After running $ ./uxplay -nc -p -d -a on the Pop!_OS 21.10 I took exactly two actions on the iPad w/ iOS 15.3.1:

  1. select uxplay in Airplay drop down
  2. after a few moments the in-progress spinner disappears and I select uxplay a second time

Informed my your reminder about how to assign GST_DEBUG=2 I noted the following errors pertaining to vaapisink:

0:03:10.121098879 707330 0x55968a97baa0 WARN                   vaapi gstvaapiutils.c:78:gst_vaapi_warning: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
0:03:10.241066289 707330 0x55968a97baa0 WARN             vaapifilter gstvaapifilter.c:1373:gst_vaapi_filter_set_property:<vaapifilter0> VA display doesn't support VPP
0:03:10.241338309 707330 0x55968a97baa0 WARN           vaapipostproc gstvaapipostproc.c:1316:ensure_allowed_sinkpad_caps:<vaapipostproc0> failed to create YUV sink caps
0:03:10.241485552 707330 0x55968a97baa0 WARN           vaapipostproc gstvaapipostproc.c:1316:ensure_allowed_sinkpad_caps:<vaapipostproc0> failed to create YUV sink caps
0:03:10.241707786 707330 0x55968a97baa0 WARN           vaapipostproc gstvaapipostproc.c:1316:ensure_allowed_sinkpad_caps:<vaapipostproc0> failed to create YUV sink caps
0:03:10.241927896 707330 0x55968a97baa0 WARN           vaapipostproc gstvaapipostproc.c:1316:ensure_allowed_sinkpad_caps:<vaapipostproc0> failed to create YUV sink caps
0:03:10.400235130 707330 0x55968a97baa0 WARN           vaapipostproc gstvaapipostproc.c:1316:ensure_allowed_sinkpad_caps:<vaapipostproc0> failed to create YUV sink caps
0:03:10.400667933 707330 0x7f3a4406fea0 WARN             vaapifilter gstvaapifilter.c:1373:gst_vaapi_filter_set_property:<vaapifilter1> VA display doesn't support VPP
0:03:10.403184931 707330 0x7f3a4406fea0 WARN             vaapifilter gstvaapifilter.c:1373:gst_vaapi_filter_set_property:<vaapifilter2> VA display doesn't support VPP                  
0:03:10.403257840 707330 0x7f3a4406fea0 ERROR       vaapivideomemory gstvaapivideomemory.c:832:allocator_configure_surface_try_other_format: Cannot handle format NV12
0:03:10.403268746 707330 0x7f3a4406fea0 ERROR          vaapipostproc gstvaapipluginbase.c:535:ensure_sinkpad_allocator:<vaapipostproc0> failed to create sink pad's allocator  
0:03:10.403306210 707330 0x7f3a4406fea0 WARN           basetransform gstbasetransform.c:1378:gst_base_transform_setcaps:<vaapipostproc0> FAILED to configure incaps video/x-raw(memory:VASurface), format=(stri
ng)NV12, width=(int)1442, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/
right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)1:3:5:1, framerate=(fraction)0/1 and outcaps video/x-raw, format=(string)N
V12, width=(int)1442, height=(int)1080, framerate=(fraction)0/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)
0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-site=(string)mpeg2, colorimetry=(string)bt709
0:03:10.403461469 707330 0x7f3a4406fea0 WARN             vaapifilter gstvaapifilter.c:1373:gst_vaapi_filter_set_property:<vaapifilter3> VA display doesn't support VPP
0:03:10.405443502 707330 0x7f3a4406fea0 ERROR       vaapivideomemory gstvaapivideomemory.c:832:allocator_configure_surface_try_other_format: Cannot handle format NV12
0:03:10.405465976 707330 0x7f3a4406fea0 ERROR          vaapipostproc gstvaapipluginbase.c:660:ensure_srcpad_allocator:<vaapipostproc0> failed to create src pad's allocator
0:03:10.405473626 707330 0x7f3a4406fea0 WARN           basetransform gstbasetransform.c:995:gst_base_transform_do_bufferpool:<vaapipostproc0> Subclass failed to decide allocation
0:03:10.405495289 707330 0x7f3a4406fea0 WARN                GST_PADS gstpad.c:4308:gst_pad_peer_query:<capsfilter1:src> could not send sticky events                   
0:03:10.405596328 707330 0x55968a97baa0 ERROR       vaapivideomemory gstvaapivideomemory.c:832:allocator_configure_surface_try_other_format: Cannot handle format NV12 
0:03:10.405622721 707330 0x55968a97baa0 ERROR            vaapidecode gstvaapipluginbase.c:660:ensure_srcpad_allocator:<vaapidecode0> failed to create src pad's allocator
0:03:10.405635042 707330 0x55968a97baa0 WARN            videodecoder gstvideodecoder.c:3966:gst_video_decoder_negotiate_pool:<vaapidecode0> Subclass failed to decide allocation
0:03:10.707147633 707330 0x55968a97ba40 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<video_source> error: Internal data stream error.             
0:03:10.707172864 707330 0x55968a97ba40 WARN                 basesrc gstbasesrc.c:3127:gst_base_src_loop:<video_source> error: streaming stopped, reason error (-5)    
0:03:10.707236160 707330 0x55968a97ba40 WARN                   queue gstqueue.c:990:gst_queue_handle_sink_event:<queue0> error: Internal data stream error.            
0:03:10.707244921 707330 0x55968a97ba40 WARN                   queue gstqueue.c:990:gst_queue_handle_sink_event:<queue0> error: streaming stopped, reason error (-5)   

Then I found mention in the README to now use vaapisink with NVIDIA, only Intel VA. I wasn't able to uninstall, however.

❯ sudo apt remove gstreamer1.0-vaapi
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pop-desktop : Depends: gstreamer1.0-vaapi but it is not going to be installed
               Recommends: io.elementary.sideload but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Then I noticed the option to force software decoding, bypassing hardware acceleration which WORKS:

export GST_DEBUG=2; ./uxplay -t 22 -nc -p -avdec

I do imagine the HW acceleration is desirable, and so I'll try to get that working with one of the arguments to -vs other than vaapisink and will open another issue if I find it's not merely operator impatience or error.

Summary: with GS vaapisink plugin installed on a system with NVIDIA it seemed necessary to disable HW acceleration in uxplay by falling back to software-only h264 decoding.

fduncanh commented 2 years ago

I see you can't uninstall gstreamer1.0-vaapi on pop_os because pop_os_desktop has it as a requirement. -vs xvimagesink or -vs glimagesink will prevent vaapisink from being selected by autovideosink. There is someway to blacklist vaapisink, but I forget how.

On the other hand On Pop!_OS (Nvidia edition) I see that gst-inspect-1.0 nvcodec shows that the NVIDIA plugin nvcodec is installed, and this includes nvh264dec for hardware h264 decoding.

 gst-inspect-1.0 nvcodec
Plugin Details:
  Name                     nvcodec
  Description              GStreamer NVCODEC plugin
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvcodec.so
  Version                  1.18.5
  License                  LGPL
  Source module            gst-plugins-bad
  Source release date      2021-09-08
  Binary package           GStreamer Bad Plugins (Ubuntu)
  Origin URL               https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1.0

  nvmpegvideodec: NVDEC mpegvideo Video Decoder
  nvmpeg2videodec: NVDEC mpeg2video Video Decoder
  nvmpeg4videodec: NVDEC mpeg4video Video Decoder
  nvh264sldec: NVDEC H.264 Stateless Decoder
  nvh264dec: NVDEC h264 Video Decoder
  nvjpegdec: NVDEC jpeg Video Decoder
  nvh264enc: NVENC H.264 Video Encoder

  7 features:
  +-- 7 elements

so I have added a new (so-far undocumented) option uxplay -nvdec to use it.

you might like to combine it with -vs glimagesink (assuming you installed the NVIDIA version of Pop_OS! which you certainly should if you have NVIDIA graphics.

The GPU section of NVDIA X-server settings (in system) confirms the that Video Engine is being used with - nvdec option and not with the -avdec option.

qrkourier commented 2 years ago

Nice going and thank you! I do have a good stream and verified it's using the NVIDIA GPU.

❯ apt list --installed 2>/dev/null|egrep nvidia-driver
nvidia-driver-460/impish,now 470.86-1pop0~1637635465~21.10~47710c4 amd64 [installed,automatic]
nvidia-driver-470/impish,now 470.86-1pop0~1637635465~21.10~47710c4 amd64 [installed]

❯ export GST_DEBUG=2; ./uxplay -nc -p -n "Ken's iPad" -nh -a -nvdec -vs glimagesink 
audio_disabled
using network ports UDP 7011 6001 6000 TCP 7100 7000 7001
using system MAC address 80:fa:5b:5a:61:46
Initialized server socket(s)
Accepted IPv4 client on socket 54
Local: 192.168.0.170
Remote: 192.168.0.140
Open connections: 1
Client identified as User-Agent: AirPlay/605.1
Accepted IPv4 client on socket 56
Local: 192.168.0.170
Remote: 192.168.0.140
Open connections: 2
raop_rtp_mirror starting mirroring
Begin streaming to GStreamer video pipeline
0:05:22.947601694 769167 0x55b114012700 WARN            videodecoder gstvideodecoder.c:2909:gst_video_decoder_prepare_finish_frame:<nvh264dec0> decreasing timestamp (457:04:45.217065716 < 457:04:45.217165716)
0:05:22.949458453 769167 0x55b114012700 WARN            videodecoder gstvideodecoder.c:2909:gst_video_decoder_prepare_finish_frame:<nvh264dec0> decreasing timestamp (457:04:45.217132383 < 457:04:45.217165716)

❯ nvidia-smi -q
...
        GPU instance ID                   : N/A
        Compute instance ID               : N/A
        Process ID                        : 769167
            Type                          : C+G
            Name                          : ./uxplay
            Used GPU Memory               : 157 MiB
fduncanh commented 2 years ago

@qrkourier

the way this now works is: (uxplay-1.48)

uxplay -vd nvh264dec -vs glimagesink

(vd = video decoder)

(I found that on GStreamer-1.16.x when one compiles the nvdia plugin using the NVIDIA codec SDK download for gst-plugins-bad, the plugins are called nvdec.) The name change to nvh264dec seems to be in gstreamer-1.18. -vd allows any decoder to be used.

fduncanh commented 2 years ago

This issue is a bit long and mixed up.

closing now.

Please open a new issue if there anything further to do.

rodrigogonegit commented 2 years ago

Hey, I'm not sure I got the fix was @fduncanh. I'm running PopOS 21.10. The output of running uxplay -vd nvh264dec -vs glimagesink is (without even trying to connect the iPad):

0:00:00.075567944 46433 0x55b3967b7490 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:467:gst_element_factory_make: no such element factory "nvh264dec"!
0:00:00.075609568 46433 0x55b3967b7490 ERROR           GST_PIPELINE gst/parse/grammar.y:857:priv_gst_parse_yyparse: no element "nvh264dec"
0:00:00.075635223 46433 0x55b3967b7490 ERROR           GST_PIPELINE gst/parse/grammar.y:945:priv_gst_parse_yyparse: link has no sink [source=@0x55b3967c6a80]
0:00:00.076136482 46433 0x55b3967b7490 ERROR           GST_PIPELINE gst/parse/grammar.y:945:priv_gst_parse_yyparse: link has no source [sink=@0x55b3967d4320]

gst-inspect is also not able to find the nvcodec plugin:

➜  ~ gst-inspect-1.0 nvcodec             
Plugin Details:
  Name                     nvcodec
  Description              GStreamer NVCODEC plugin
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvcodec.so
  Version                  1.18.5
  License                  LGPL
  Source module            gst-plugins-bad
  Source release date      2021-09-08
  Binary package           GStreamer Bad Plugins (Ubuntu)
  Origin URL               https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1.0

  0 features:

Using the software decoding flag works but I would like to use hardware acceleration, if possible. Any idea what's happening?

fduncanh commented 2 years ago

@rodrigogonegit post this as a new issue and reference this old issue if necessary.

Are you using the pop!OS "nvidia edition" I have this and it has the plugin as you can see earlier in this thread.

On the other hand On Pop!_OS (Nvidia edition) I see that
gst-inspect-1.0 nvcodec
shows that the NVIDIA plugin nvcodec is installed, and this includes nvh264dec for hardware h264 decoding.

 gst-inspect-1.0 nvcodec
Plugin Details:
  Name                     nvcodec
  Description              GStreamer NVCODEC plugin
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvcodec.so
  Version                  1.18.5
  License                  LGPL
  Source module            gst-plugins-bad
  Source release date      2021-09-08
  Binary package           GStreamer Bad Plugins (Ubuntu)
  Origin URL               https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1.0

  nvmpegvideodec: NVDEC mpegvideo Video Decoder
  nvmpeg2videodec: NVDEC mpeg2video Video Decoder
  nvmpeg4videodec: NVDEC mpeg4video Video Decoder
  nvh264sldec: NVDEC H.264 Stateless Decoder
  nvh264dec: NVDEC h264 Video Decoder
  nvjpegdec: NVDEC jpeg Video Decoder
  nvh264enc: NVENC H.264 Video Encoder

  7 features:
  +-- 7 elements
trin4ik commented 1 year ago

hi, dont know, what happend, but i install with sudo apt install uxplay gstreamer1.0-* and its ork now