Skip to content

RTSP stream crashes on TCP connect #598

@bkbartk

Description

@bkbartk

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

What is the expected behavior?

v 1.0.34
I know TCP is not supported, but as soon as the client forces this anyway no other clients can connect until reboot.
tried to fix myself without any luck.
So if TCP is not supported at least it should not make the system unworkable.

What is the actual behavior?

That after 1 client uses tcp others are still able to connect.

Steps to reproduce.

use rtsp in a project

    espp::RtspServer::Config rtsp_cfg;
    rtsp_cfg.port = 8554;

    espp::RtspServer server{rtsp_cfg};
    vTaskDelay(1000 / portTICK_PERIOD_MS); // 1 second
    server.start();

and a simple for loop

 while (true)
    {
        camera_fb_t *fb = esp_camera_fb_get();
        if (!fb)
            continue;
       // --- RTSP send ---
        std::span<const uint8_t> jpeg_span(fb->buf, fb->len);
        server.send_frame(espp::JpegFrame(jpeg_span));
      esp_camera_fb_return(fb);
   }

connect with home assistant like this

type: custom:webrtc-camera
streams:
  - url: rtsp://192.168.170.31:8554/stream

Build or installation Logs.


More Information.

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions