-
Notifications
You must be signed in to change notification settings - Fork 692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rtsp client is not working properly (AUD-5874) #1319
Comments
I have just fixed the issue, you can verify use attach lib and replace into esp-adf-libs folder. |
Can i use the rtsp client protocol in esp32-p4 module |
The new library solves the problem of SETUP carrying session. But there are still 2 problems, which makes esp-rtsp still unable to connect to a rtsp server. I think this is caused by the url suffix in SETUP The url sent by esp-rtsp is: For live555, it does not recognize the suffix "trackID=0", and the url it expects to receive is Considering that live555 is a widely used rtsp server, I hope esp-rtsp be compatible with its behavior.
Question 2: All log:
|
@ManikandanVaradharaj Of cource supported for P4. For esp_media_protocol is all software realization, it does not dependent on special platform. Currently it only dependent on media_lib_sal in esp-adf-libs, you can copy these two folder into your project components folder, and used it without ADF also. Just happy to use! |
@alpha-alan I will download live555 and have a try, Thanks for your info, it is easy to fix, once finished I will notify to you. I try mediamtx, It works ok. |
@TempoTian but in adf list of table it shows rtc and rtsp will not support for esp32-p4.can u give clear idea for me that how can i do the rtsp client in esp32-p4 with lvgl ui support.because esp32-p4 there is no option to check whether network is working or not through WiFi. |
@ManikandanVaradharaj You need esp_wifi_remote https://github.com/espressif/esp-wifi-remote to use wifi on P4. The LWIP and socket related things still run on P4, so there is no need to do any change with the lib. Official document updated in delay. We have release P4 support for esp_media_protocols for long time. |
@TempoTian okay after the wifi connection.. For rtsp protocol in esp32-p4 which are the libraries needed.that i'll implement with lvgl ui support |
@ManikandanVaradharaj follow this url https://components.espressif.com/components/lvgl/lvgl, you can use command |
@TempoTian I noticed a log from mediamtx pointing out the reason: At the same time, I also noticed that the SETUP of esp-rtsp contains a mode=record, but mediamtx does not recognize it.
Hopefully this issue can be resolved along with the two issues I mentioned earlier, thank you. esp-rtsp all log
mediamtx all log
|
@TempoTian ,Could you please let me know when I might receive the new library with all the issues resolved? |
@alpha-alan I am undertesting now. It won't take long time. It speeds me some time to setup the server for lib555 done. now it is ready to test. |
@TempoTian for rtsp which of the source and header file we can implement in the project that will support for esp32-p4 |
@TempoTian |
You can try follow lib, I test if send and receive supported codec, both as puller and pusher OK. |
I'm trying the rtsp protocol inside the video player app like enter the ip address and start the live stream for this i set upto the enter ip address..after ip address it should work through rtsp code for that which libraries would be useful. |
@ManikandanVaradharaj You can use RTSP server, it will setup a local RTSP server then you can enter server URL and use common player to play it. |
Any specific libraries needed for that rather than..esp_media_protocol & media_lib_sal.could i paste in my components that's enough. |
NO extra lib needed, just these 2 should OK. |
In the lib,it has only esp_rtsp.h in esp_media_protocol, file which is not working with adaptability in the project. |
@ManikandanVaradharaj libpath is as following, the provide lib is used for debug issue, not release yet: |
For esp32p4..this protocol implementation is not defining.. I'm gets
confused of adding the protocol implementation properly.
…On Fri, 22 Nov 2024, 11:50 am TempoTian, ***@***.***> wrote:
@ManikandanVaradharaj <https://github.com/ManikandanVaradharaj> libpath
is as following, the provide lib is used for debug issue, not release yet:
https://github.com/espressif/esp-adf-libs/tree/master/esp_media_protocols
https://github.com/espressif/esp-adf-libs/tree/master/media_lib_sal
—
Reply to this email directly, view it on GitHub
<#1319 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BKDAQ5FMRW7N6EGTPXZR6AD2B3EKDAVCNFSM6AAAAABSBTZ44SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJSHE2TIMJZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
P4 Lib is under: https://github.com/espressif/esp-adf-libs/tree/master/esp_media_protocols/lib/esp32p4, ADF already support P4, you can try to use any rtsp example to do test firstly |
For the rtsp example try we need to set the lvgl ui setup separately for rtsp right. |
@alpha-alan Attach new lib here. please modify APP as following also: 上层要配合做下面的一些改变: 2:notify中改变av stream的codec设定 3:av_stream添加API av_audio_dec_change_codec
*/ int av_audio_dec_change_codec(av_stream_handle_t av_stream, av_stream_acodec_t acodec) 4:enhance av_stream 退出的时候让等待写的操作及时返回
|
@TempoTian could you please say how could i test example rtsp in esp32_p4 module |
@alpha-alan Please use following lib to test again. Add handle server timeout processing to avoid sever send FIN during RTP receiving. |
@ManikandanVaradharaj You can use https://github.com/espressif/esp-adf/tree/master/examples/protocols/esp-rtsp to do test. I think you can start another thread to ask your questions to avoid issue mixing together cause some confusing. |
For RTSP AAC support, use following lib and follow the readme to do test. |
@ManikandanVaradharaj Can you try with baseline below 640x480 resolution and fetch a log for me? I test baseline decode all right using the test code. |
esp> start 2 rtsp://192.168.0.132:554/live OPTIONS rtsp://192.168.0.132:554/live RTSP/1.0 I (48805) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (48825) ESP_RTSP_CLIENT: TX: DESCRIBE rtsp://192.168.0.132:554/live RTSP/1.0 I (48945) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK v=0 Get video codec 96 SETUP rtsp://192.168.0.132:554/streamid=0 RTSP/1.0 I (49035) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (49055) ESP_RTSP_CLIENT: RTSP Server vrport 55608 SETUP rtsp://192.168.0.132:554/streamid=1 RTSP/1.0 I (49085) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (49095) ESP_RTSP_CLIENT: RTSP Server arport 55608 PLAY rtsp://192.168.0.132:554 RTSP/1.0 I (49155) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK Open with no ADTS header...1 8000.............. 00 00 00 01 21 e0 14 00 14 e4 af 94 57 fe b1 51 00 00 00 01 21 e0 18 00 18 e4 af 94 57 fe b1 51 58 9d f0 98 5e 12 34 30 cf 7b 1f dd 36 9b 81 f0 1e 84 d9 b8 7a cf 6a ef cd 25 8b 80 d7 b5 dc 5d W (51395) ESP_RTP: drop 307 00 00 00 01 21 e0 02 00 02 e4 af 94 57 dc a6 8c 00 00 00 01 21 e0 06 00 06 e4 af 94 57 fe 87 40 00 00 00 01 21 e0 0c 00 0c e4 af 94 57 fe 87 40 W (51435) ESP_RTP: drop 348 00 00 00 01 21 e0 0e 00 0e e4 af 94 57 ed 59 63 05 39 f9 52 1a 26 e6 0f 59 71 c3 a6 8a 16 15 c0 |
@TempoTian @ManikandanVaradharaj What was the issue of decoding in high profile format, In both jpeg and h264 u have upto 720p and 1080p right,then what is the use of MIPI 4k display without decoding the high-profile resolution. If h264 decode is not support means we can go through jpeg decode right? |
@Sindhuja-15 Yes, use JPEG codec we can support 1920x1080 30fps hardware decode and encode. For H264 we only support 1920x1080 encoder, not support decode. If you want to push data to server use high resolution both codec are OK, if want to decode high resolution better to choice JPEG. |
@TempoTian could we get the test code using jpeg dec in rtsp client |
@TempoTian Then okay, for that can we have a test code with jpeg dec in rtsp client for the p4 display,For video dec we can use jpeg and audio dec we should use again h264. |
@TempoTian Could u tell how to use this command to do transcode and stream video in display |
@TempoTian After I changed my sever part into jpeg encoder with width=1280,height=720,fps=30.resolution=HD. esp> start 2 rtsp://192.168.0.132:554/live OPTIONS rtsp://192.168.0.132:554/live RTSP/1.0 I (28605) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK esp> I (28615) ESP_RTSP_CLIENT: TX: DESCRIBE rtsp://192.168.0.132:554/live RTSP/1.0 I (28635) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK v=0 Get video codec 26 |
@ManikandanVaradharaj Can you show, which server do you use, and how do you push your stream to server and convert the codec into JPEG? |
@TempoTian esp> start 2 tsp://192.168.0.136:554/live OPTIONS tsp://192.168.0.136:554/live RTSP/1.0 I (42443) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK esp> I (42453) ESP_RTSP_CLIENT: TX: DESCRIBE tsp://192.168.0.136:554/live RTSP/1.0 I (42473) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK v=0 Get video codec 26 SETUP rtsp://192.168.0.136:554/streamid=0 RTSP/1.0 I (42563) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (42573) ESP_RTSP_CLIENT: RTSP Server vrport 55608 SETUP rtsp://192.168.0.136:554/streamid=1 RTSP/1.0 I (42603) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (42623) ESP_RTSP_CLIENT: RTSP Server arport 55608 PLAY rtsp://192.168.0.136:554 RTSP/1.0 I (42653) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK Open with no ADTS header...1 8000.............. assert failed: jpeg_decoder_process jpeg_decode.c:237 (ret == ESP_OK) TP : 0x480de470 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130 MHARTID : 0x00000001 --- Backtrace: |
@TempoTian How could i solve these errors... |
@ManikandanVaradharaj you can print out the video data you received (first and last 16bytes) to check whether the received image is whole or not. So which server are you using now and how to you push the stream to your server? I can align the test env with you and fix the possible issues if needed. |
@TempoTian I'm using camera rtsp server in different module,in esp32p4 we using as rtsp client with the ip address from rtsp server I'm trying to receive data and display |
@TempoTian I (25) boot: ESP-IDF v5.3.1-638-ga0f798cfc4-dirty 2nd stage bootloader I (1794) gpio: GPIO[18]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (1864) transport: Add ESP-Hosted channel IF[2]: S[0] Tx[0x4000e454] Rx[0x4001cafe] I (1874) main_task: Started on CPU0 I (3234) transport: Base transport is set-up I (3234) transport: Slave chip Id[12] I (3274) rpc_wrap: Received Slave ESP Init Type 'help' to get the list of commands. I (8904) esp_netif_handlers: sta ip: 192.168.0.118, mask: 255.255.255.0, gw: 192.168.0.1 OPTIONS rtsp://192.168.0.136:554/live RTSP/1.0 esp> I (30034) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (30044) ESP_RTSP_CLIENT: TX: DESCRIBE rtsp://192.168.0.136:554/live RTSP/1.0 I (30114) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK v=0 Get video codec 26 SETUP rtsp://192.168.0.136:554/streamid=0 RTSP/1.0 I (30194) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (30204) ESP_RTSP_CLIENT: RTSP Server vrport 55608 SETUP rtsp://192.168.0.136:554/streamid=1 RTSP/1.0 I (30274) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (30284) ESP_RTSP_CLIENT: RTSP Server arport 55608 PLAY rtsp://192.168.0.136:554 RTSP/1.0 I (30314) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK Open with no ADTS header...1 8000.............. TP : 0x480de470 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130 MHARTID : 0x00000001 --- Backtrace: panic_abort (details=details@entry=0x480de23c "assert failed: jpeg_decoder_process jpeg_decode.c:237 (ret == ESP_OK)") at /home/smartbuild/esp/esp-idf/components/esp_system/panic.c:463 |
@ManikandanVaradharaj Which camera do you use, the received data is not match with spec, many camera output RTSP in private format, and need to know how does it orgnize data. |
@TempoTian XCF PA-FP0171-A-01,This is the camera module name i used(JXF37) |
@TempoTian After i changed my rtsp server type H264 640*480 In display monitor I'm getting invalid panel handle. OPTIONS rtsp://192.168.0.136:554/live RTSP/1.0 I (32545) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK esp> I (32555) ESP_RTSP_CLIENT: TX: DESCRIBE rtsp://192.168.0.136:554/live RTSP/1.0 I (32595) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK v=0 Get video codec 96 SETUP rtsp://192.168.0.136:554/streamid=0 RTSP/1.0 I (32715) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (32725) ESP_RTSP_CLIENT: RTSP Server vrport 55608 SETUP rtsp://192.168.0.136:554/streamid=1 RTSP/1.0 I (32785) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK I (32795) ESP_RTSP_CLIENT: RTSP Server arport 55608 PLAY rtsp://192.168.0.136:554 RTSP/1.0 I (32825) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK Open with no ADTS header...1 8000.............. |
@TempoTian I checked other p4 display examples..in esp-dev-kits,It worked fine with UI |
@ManikandanVaradharaj From the log can see that video is received and decoded all right, only diplay have issue. |
@TempoTian Did you tired streaming video in display from your side.. video
came in display?
…On Thu, 12 Dec 2024, 7:44 am TempoTian, ***@***.***> wrote:
@ManikandanVaradharaj <https://github.com/ManikandanVaradharaj> From the
log can see that video is received and decoded all right, only diplay have
issue.
You can add some log in following function to check issues, in my
workspace lcd panel can create success.
image.png (view on web)
<https://github.com/user-attachments/assets/41dbb5a0-2813-4ae1-8e40-43474472c7e6>
—
Reply to this email directly, view it on GitHub
<#1319 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BKDAQ5AX5ZUYK56BUEB5NYL2FDWSDAVCNFSM6AAAAABSBTZ44SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZXGYYDCNRZHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@TempoTian using ffmpeg how you pushing video to display
…On Thu, 12 Dec 2024, 8:45 am TempoTian, ***@***.***> wrote:
I have no camera, so I use ffmpeg to push to server. it plays ok on P4.
image.png (view on web)
<https://github.com/user-attachments/assets/90f0cae5-c58c-495d-8d92-e4069ef942da>
Log as:
s00 00 00 01 41 9a c0 fe b0 41 08 c1 0e f7 f7 82
00 00 00 01 41 9a e0 ff 84 06 82 2c bf ed 71 4e
00 00 00 01 41 9b 00 fe 4f eb 0b 42 9c 16 ef 77
00 00 00 01 41 9b 20 bf 84 20 87 77 7e f1 75 73
esp> st00 00 00 01 41 9b 40 bf 86 84 af 6d 63 83 a7 50
00 00 00 01 41 9b 61 f2 2e 23 04 37 bc b7 99 82
esp> sto00 00 00 01 41 9b 80 be b8 7b 51 c0 00 9c 71 f1
00 00 00 01 41 9b a0 bf 8e 82 4a aa fb c4 9c 10
00 00 00 01 41 9b c1 ff a8 c1 4f 20 90 43 55 c6
00 00 00 01 41 9b e1 fb c1 04 7d 7d bf 1b f3 d6
esp> stop00 00 00 01 41 9a 00 be b8 e8 61 47 18 d0 00 ae
00 00 00 01 41 9a 21 ff 30 29 bb bd df ad 5c f7
00 00 00 01 41 9a 40 bf 8c 4a fb f3 89 f6 21 5f
00 00 00 01 41 9a 60 bf a2 02 3d 6a f9 7e a5 a8
00 00 00 01 41 9a 80 be b1 dd 5f c8 c1 2d 55 6a
00 00 00 01 41 9a a1 ff 32 c1 af 6d 5f e7 5b fa
00 00 00 01 41 9a c1 fe 16 ab fe 09 6b 5c dd eb
00 00 00 01 41 9a e3 eb e6 ac 5f f0 47 5d 58 f4
esp> stop
I (336099) RTSP_SERVICE: audio render task exit
I (336099) ESP_RTSP_CLIENT: TX:
TEARDOWN rtsp://162.168.10.252:8554/test RTSP/1.0
CSeq: 7
User-Agent: ESP32-RTSP-client 1.1.0
Session: 76b49456d1394df7b2062fe4f5363602
I (336119) RTSP_SERVICE: video render task exited
—
Reply to this email directly, view it on GitHub
<#1319 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BKDAQ5BDBP22CJRVA6WDOCL2FD5VRAVCNFSM6AAAAABSBTZ44SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZXG4YTKNZRGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@TempoTian I didn't added set-target into p4 before,after i added set-target now I'm getting error while building Partition table
|
After i changed the partition table in nvs | data | nvs | 0x12000 | 0x6000 |
@TempoTian After I changed the option In log RTSP/1.0 200 OK Open with no ADTS header...1 8000.............. W (75549) ESP_RTP: drop 277 W (76669) ESP_RTP: drop 313 W (78209) ESP_RTP: drop 361 W (81579) ESP_RTP: drop 470 W (82509) ESP_RTP: drop 500 W (83519) ESP_RTP: drop 532 W (85149) ESP_RTP: drop 578 W (88549) ESP_RTP: drop 693 W (91519) ESP_RTP: drop 788 W (92739) ESP_RTP: drop 827 W (95609) ESP_RTP: drop 919 W (99609) ESP_RTP: drop 1047 I (109019) ESP_RTSP_CLIENT: TX: OPTIONS rtsp://192.168.0.136:554 RTSP/1.0 I (109029) ESP_RTSP_CLIENT: RX: RTSP/1.0 200 OK TEARDOWN rtsp://192.168.0.136:554 RTSP/1.0 E (358039) TRANS_TCP: tcp_poll_write select error 0, errno = Success, fd = 54 assert failed: spinlock_acquire spinlock.h:142 (lock->count == 0) TP : 0x4ff39970 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130 MHARTID : 0x00000000 --- Backtrace: panic_abort (details=details@entry=0x4ff3976c "assert failed: spinlock_acquire spinlock.h:142 (lock->count == 0)") at /home/smartbuild/esp/esp-idf/components/esp_system/panic.c:463 |
You need enable SPIRAM firstly. you can use my provided sdkconfig and check the LCD handle not create issue, if this fixed then I think the video should appear. |
@TempoTian Can i get some changed partition table and needed configuration of sdk to fix this issue. |
@TempoTian Generated /home/smartbuild/Arduino/rtsp_p4/build/rtsp_test.bin
|
@TempoTian Could you help me to achieve this display task,almost decoding parts are over little bit end things to display the video. |
Environment
Problem Description
I use esp-rtsp in the example folder as the RTSP client and live555 as the server. One thing I discovered is that the SETUP sent by esp-rtsp to the server contains a session field, but the session is not found on the server side, so a “session not found” error is reported.
According to my understanding, generally in RTSP requests, the session field should not be included in SETUP requests. Why is there a session field here? How can I solve this "session not found" problem
Code to Reproduce This Issue
esp-adf\examples\protocols\esp-rtsp
The text was updated successfully, but these errors were encountered: