Skip to content

PyAV decoding issues #1812

@Artem-N

Description

@Artem-N

Hi! I am developing a project on Jetson Orin NX, I need to use the AV library for capturing RTSP video for the project(This is how i can stream RTSP without delays). When I try to run the code -
container = av.open(self.rtsp_url, options={"rtsp_transport": "tcp", "fflags": "nobuffer", "max_delay": "0"})
try:
for frame in container.decode(video=0):
if not self.running:
break
img = frame.to_ndarray(format="bgr24")
with self.lock:
if len(self.frame_queue) >= 3: # Drop old frames if queue full
self.frame_queue.popleft()
self.frame_queue.append(img)
finally:
container.close()
in the end i show frame by - cv.imshow('Video', frame) -

  • it does not display the video on the screen. I am working on the board itself, not through the SSH, I have a monitor and ffmpeg dev installed, but when I run the code it does not show me the video.
    Everything is fine with the RTSP stream, I checked it more than once, cv.imshow works when I read the RTSP stream through opencv.
    When I output debug info about process packets - it receives and processes packets, the problem is probably in the display on my video monitor.
    Need help. Thasnk`s/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions