Decoding and encoding RTSP #860
Unanswered
GustavoStahl
asked this question in
1. Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
I'm using PyAV to read and write an RTSP link on disk (storing audio and video), but I haven't found a good way to do this since most of my implementations end up with audio and video pops. Bellow is my current test algorithm.
Expected behavior
Expected an mp4 output containing the whole video from the provided RTSP with the exact image and audio quality.
Actual behavior
If I disregard the part of my code that decodes the video packet as a NumPy array and encodes it again, then a video file is written on disk, but containing audio and video pops. Otherwise, an error is raised when the encoding tries to be applied on the
np::ndarray
.Traceback (Error raised when maintaining the frame decoding/encoding):
Investigation
np::ndarray
, I've tested isolating each output stream (audio and video), and in both cases the output is fine, but when they are subsequent the pops happen.np::ndarray
, I've tried checking the writer and frame dims, changing colorspaces, and pre-allocating a VideoFrame object to then load the array on it.Research
I have done the following:
Beta Was this translation helpful? Give feedback.
All reactions