Skip to content

Sometimes there is a 1-second delay when using 'av.open' open rtsp stream ? #1257

@Dian-Yi

Description

@Dian-Yi

Overview

Open multiple rtsp steams using av.open in thread, some cameras maybe 1s delay in sometimes, if rtsp streams number exceeds 30,This phenomenon will become very obvious.

Expected behavior

How to reduce the delay when opening rtsp stream?

Actual behavior

{{ A clear and concise description of what actually happened. }}

Investigation

This is my code open camera:

def pyavRecord_open(camera_stream):
    options = {
                "rtsp_transport": "tcp",
                "analyzeduration": "1000",
                # "max_delay": "1000",
                # "chunk_duration": "1000",
                # "audio_preload": "1000",
                "stimeout": "500000",
                # "fflags": "flush_packets",
                # "max_interleave_delta": "1000",
                "use_wallclock_as_timestamps": "1",
            }
    input_ = av.open(camera_stream, 'r', format='rtsp', options=options, metadata_errors='ignore', )

Research

I have done the following:

Additional context

{{ Add any other context about the problem here. }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions