homeworkc / lazycast

A Simple Wireless Display Receiver
GNU General Public License v3.0
702 stars 90 forks source link

PLEASE HELP!! The connection is made in player 1 and player 2, but my phone's screen is not reflected (the delay in VLC is very high in player 0) #125

Open purplepencil opened 1 month ago

purplepencil commented 1 month ago

PLAYER 1:

---M1---> OPTIONS * RTSP/1.0 CSeq: 1 Server: AllShareCast/Galaxy/3.1/NIBC Require: org.wfa.wfd1.0

<-------- RTSP/1.0 200 OK CSeq: 1 Public: org.wfa.wfd1.0, SET_PARAMETER, GET_PARAMETER

<---M2--- OPTIONS * RTSP/1.0 CSeq: 1 Require: org.wfa.wfd1.0

--------> RTSP/1.0 200 OK CSeq: 1 Public: org.wfa.wfd1.0, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER

---M3---> GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 CSeq: 2 Content-Type: text/parameters Content-Length: 200

wfd_video_formats wfd_audio_codecs wfd_uibc_capability wfd_client_rtp_ports wfd_content_protection wfd_sec_screensharing wfd_sec_portrait_display wfd_sec_volume_support wfd_sec_volume_status

Nothing written! <-------- RTSP/1.0 200 OK CSeq: 2 Content-Type: text/parameters Content-Length: 460

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play wfd_audio_codecs: AAC 00000001 00 wfd_video_formats: 00 00 02 10 0001FEFF 3FFFFFFF 00000FFF 00 0000 0000 00 none none wfd_3d_video_formats: none wfd_coupled_sink: none wfd_connector_type: 05 wfd_uibc_capability: input_category_list=GENERIC, HIDC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=Keyboard/USB, Mouse/USB;port=none wfd_standby_resume_capability: none wfd_content_protection: none

---M4---> SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 CSeq: 3 Content-Type: text/parameters Content-Length: 387

wfd_video_formats: 00 00 02 04 00000080 00000000 00000000 00 0000 0000 00 none none wfd_audio_codecs: AAC 00000001 00 wfd_uibc_capability: input_category_list=GENERIC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=none;port=58506 wfd_uibc_setting: enable wfd_presentation_URL: rtsp://192.168.173.80/wfd1.0/streamid=0 none wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play

<-------- RTSP/1.0 200 OK CSeq: 3

uibcport:play

---M5---> SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 CSeq: 4 Content-Type: text/parameters Content-Length: 27

wfd_trigger_method: SETUP

<-------- RTSP/1.0 200 OK CSeq: 4

<---M6--- SETUP rtsp://192.168.173.80/wfd1.0/streamid=0 RTSP/1.0 CSeq: 5 Transport: RTP/AVP/UDP;unicast;client_port=1028

--------> RTSP/1.0 200 OK CSeq: 5 Session: 1967513926;timeout=60 Transport: RTP/AVP/UDP;unicast;client_port=1028-1029;server_port=19000-19001

['RTSP/1.0 200 OK\r\nCSeq: 5\r\nSession: 1967513926', 'timeout=60\r\nTransport: RTP/AVP/UDP', 'unicast', 'client_port=1028-1029', 'server_port=19000-19001\r\n\r\n'] ['server_port=19000-19001\r\n\r\n'] 19000 <---M7--- PLAY rtsp://192.168.173.80/wfd1.0/streamid=0 RTSP/1.0 CSeq: 6 Session: 1967513926;timeout=60

idrsockport:58946 audiodest:2 argv3:(null) sourceip:192.168.173.1 --------> RTSP/1.0 200 OK CSeq: 6 Session: 1967513926;timeout=60 Range: npt=now-

---- Negotiation successful ---- idr:12 idr:14 idr:16 start:-1, end:0 idr:16 idr:14 idr:12

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 Content-Length: 17 Content-Type: text/parameters CSeq: 103

wfd_idr_request

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 Content-Length: 17 Content-Type: text/parameters CSeq: 104

wfd_idr_request

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 Content-Length: 17 Content-Type: text/parameters CSeq: 105

wfd_idr_request

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 Content-Length: 17 Content-Type: text/parameters CSeq: 106

wfd_idr_request

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 Content-Length: 17 Content-Type: text/parameters CSeq: 107

wfd_idr_request

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 Content-Length: 17 Content-Type: text/parameters CSeq: 108

wfd_idr_request

RTSP/1.0 200 OK CSeq: 103 Session: 1967513926;timeout=60

RTSP/1.0 200 OK CSeq: 104 Session: 1967513926;timeout=60

RTSP/1.0 200 OK CSeq: 105 Session: 1967513926;timeout=60

RTSP/1.0 200 OK CSeq: 106 Session: 1967513926;timeout=60

RTSP/1.0 200 OK CSeq: 107 Session: 1967513926;timeout=60

RTSP/1.0 200 OK CSeq: 108 Session: 1967513926;timeout=60

['RTSP/1.0 200 OK\r\nCSeq: 103\r\nSession: 1967513926;timeout=60', 'RTSP/1.0 200 OK\r\nCSeq: 104\r\nSession: 1967513926;timeout=60', 'RTSP/1.0 200 OK\r\nCSeq: 105\r\nSession: 1967513926;timeout=60', 'RTSP/1.0 200 OK\r\nCSeq: 106\r\nSession: 1967513926;timeout=60', 'RTSP/1.0 200 OK\r\nCSeq: 107\r\nSession: 1967513926;timeout=60', 'RTSP/1.0 200 OK\r\nCSeq: 108\r\nSession: 1967513926;timeout=60', ''] [] [NULL @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] decode_slice_header error [h264 @ 0x16e10d0] no frame! [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] decode_slice_header error [h264 @ 0x16e10d0] no frame! [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] decode_slice_header error [h264 @ 0x16e10d0] no frame! [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] decode_slice_header error [h264 @ 0x16e10d0] no frame! [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] decode_slice_header error [h264 @ 0x16e10d0] no frame! [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] decode_slice_header error [h264 @ 0x16e10d0] no frame! [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] non-existing PPS 0 referenced [h264 @ 0x16e10d0] decode_slice_header error [h264 @ 0x16e10d0] no frame! Format: Input #0, rtp, from 'rtp://127.0.0.1:57823': Duration: N/A, start: 10103.149967, bitrate: N/A Program 1 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080, 30 tbr, 90k tbn Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 130 kb/s Rate 30 scale 1 time base 1 90000 Codec name h264 Codec name aac mdly:100 Setting audio render format OMX error error Setting video decoder format FPS num 30 den 1 Set frame rate to 1966080 Video decoder format set up ok Default framerate 1966080 no error in setting! Clock stopped Num channels for resmapling 2 OMX error error Config sent, emptying buffer 23 No portr settting seen yet No portr settting seen yet No portr settting seen yet No portr settting seen yet No portr settting seen yet No portr settting seen yet No portr settting seen yet keyframe No portr settting seen yet No portr settting seen yet No portr settting seen yet No portr settting seen yet No portr settting seen yet Got port Settings event Port settings changed OMX error error OMX error error Got port Settings event Decode tunnel set up ok OMX error error OMX error error Scheduler tunnel set up ok OMX error error OMX error error Clock tunnel set up ok Clock running OMX error error OMX error error OMX error error OMX error error OMX error error OMX error error OMX error error OMX error error OMX error error OMX error error OMX error error OMX error error OMX error error Got port Settings event

PLAYER 2:

---M1---> OPTIONS * RTSP/1.0 CSeq: 1 Server: AllShareCast/Galaxy/3.1/NIBC Require: org.wfa.wfd1.0

<-------- RTSP/1.0 200 OK CSeq: 1 Public: org.wfa.wfd1.0, SET_PARAMETER, GET_PARAMETER

<---M2--- OPTIONS * RTSP/1.0 CSeq: 1 Require: org.wfa.wfd1.0

--------> RTSP/1.0 200 OK CSeq: 1 Public: org.wfa.wfd1.0, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER

---M3---> GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 CSeq: 2 Content-Type: text/parameters Content-Length: 200

wfd_video_formats wfd_audio_codecs wfd_uibc_capability wfd_client_rtp_ports wfd_content_protection wfd_sec_screensharing wfd_sec_portrait_display wfd_sec_volume_support wfd_sec_volume_status

Nothing written! <-------- RTSP/1.0 200 OK CSeq: 2 Content-Type: text/parameters Content-Length: 461

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play wfd_audio_codecs: LPCM 00000002 00 wfd_video_formats: 00 00 02 10 0001FEFF 3FFFFFFF 00000FFF 00 0000 0000 00 none none wfd_3d_video_formats: none wfd_coupled_sink: none wfd_connector_type: 05 wfd_uibc_capability: input_category_list=GENERIC, HIDC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=Keyboard/USB, Mouse/USB;port=none wfd_standby_resume_capability: none wfd_content_protection: none

---M4---> SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 CSeq: 3 Content-Type: text/parameters Content-Length: 388

wfd_video_formats: 00 00 02 04 00000080 00000000 00000000 00 0000 0000 00 none none wfd_audio_codecs: LPCM 00000002 00 wfd_uibc_capability: input_category_list=GENERIC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=none;port=45782 wfd_uibc_setting: enable wfd_presentation_URL: rtsp://192.168.173.80/wfd1.0/streamid=0 none wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play

<-------- RTSP/1.0 200 OK CSeq: 3

uibcport:play

---M5---> SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 CSeq: 4 Content-Type: text/parameters Content-Length: 27

wfd_trigger_method: SETUP

<-------- RTSP/1.0 200 OK CSeq: 4

<---M6--- SETUP rtsp://192.168.173.80/wfd1.0/streamid=0 RTSP/1.0 CSeq: 5 Transport: RTP/AVP/UDP;unicast;client_port=1028

--------> RTSP/1.0 200 OK CSeq: 5 Session: 1303455736;timeout=60 Transport: RTP/AVP/UDP;unicast;client_port=1028-1029;server_port=19000-19001

['RTSP/1.0 200 OK\r\nCSeq: 5\r\nSession: 1303455736', 'timeout=60\r\nTransport: RTP/AVP/UDP', 'unicast', 'client_port=1028-1029', 'server_port=19000-19001\r\n\r\n'] ['server_port=19000-19001\r\n\r\n'] 19000 192.168.173.1 ./h264/h264.bin 53026 2 192.168.173.1 & <---M7--- PLAY rtsp://192.168.173.80/wfd1.0/streamid=0 RTSP/1.0 CSeq: 6 Session: 1303455736;timeout=60

idrport:53026 audiodest:2 sinkip:192.168.173.1 set audio backend :alsa alsa pcm init ... alsa config success rate = 48000 bps period time = 50000 us period size = 2400 frames buffer time = 200000 us buffer size = 9600 frames periods per buffer = 4 frames alsa init success --------> RTSP/1.0 200 OK CSeq: 6 Session: 1303455736;timeout=60 Range: npt=now-

---- Negotiation successful ---- --:184---- --:184---- --:184---- --:184---- --:164---- --:184---- --:164---- --:164---- --:164---- --:184---- --:184---- --:184---- --:164---- --:164---- --:184---- --:184---- --:164---- --:164---- --:184---- --:184---- --:164---- --:164---- --:164---- --:164---- --:164---- --:184---- --:164---- --:184---- --:164---- idr:12 start:14254, end:14253 --:164---- --:184---- send idr SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 Content-Length: 17 Content-Type: text/parameters CSeq: 103

wfd_idr_request

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0 CSeq: 5 Content-Type: text/parameters Content-Length: 30

wfd_trigger_method: TEARDOWN

nohup: appending output to 'nohup.out' PIN: 31415926 ---M1--->

<-------- RTSP/1.0 200 OK CSeq: 1 Public: org.wfa.wfd1.0, SET_PARAMETER, GET_PARAMETER

<---M2--- OPTIONS * RTSP/1.0 CSeq: 1 Require: org.wfa.wfd1.0

-------->

---M3--->

Nothing written! <-------- RTSP/1.0 200 OK CSeq: 2 Content-Type: text/parameters Content-Length: 461

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play wfd_audio_codecs: LPCM 00000002 00 wfd_video_formats: 00 00 02 10 0001FEFF 3FFFFFFF 00000FFF 00 0000 0000 00 none none wfd_3d_video_formats: none wfd_coupled_sink: none wfd_connector_type: 05 wfd_uibc_capability: input_category_list=GENERIC, HIDC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=Keyboard/USB, Mouse/USB;port=none wfd_standby_resume_capability: none wfd_content_protection: none

Traceback (most recent call last): File "/home/pi/lazycast/./d2.py", line 268, in sock.sendall(m3resp.encode()) BrokenPipeError: [Errno 32] Broken pipe PIN: 31415926 ---M1--->

<-------- RTSP/1.0 200 OK CSeq: 1 Public: org.wfa.wfd1.0, SET_PARAMETER, GET_PARAMETER

<---M2--- OPTIONS * RTSP/1.0 CSeq: 1 Require: org.wfa.wfd1.0

-------->

---M3--->

Nothing written! <-------- RTSP/1.0 200 OK CSeq: 2 Content-Type: text/parameters Content-Length: 461

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play wfd_audio_codecs: LPCM 00000002 00 wfd_video_formats: 00 00 02 10 0001FEFF 3FFFFFFF 00000FFF 00 0000 0000 00 none none wfd_3d_video_formats: none wfd_coupled_sink: none wfd_connector_type: 05 wfd_uibc_capability: input_category_list=GENERIC, HIDC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=Keyboard/USB, Mouse/USB;port=none wfd_standby_resume_capability: non

homeworkc commented 1 month ago

Are you using Raspberry Pi 5 or 4 (or earlier)?

purplepencil commented 1 month ago

sir, i am using raspberry pi 4 and i also used phone internet and wifi but got the same results