Page 1 of 1

Multiple video RTP session

Posted: Mon Mar 10, 2025 12:09 pm
by Tim
Hi, I'm trying to get live and recorded video from a Hanwha NVR via RTSP and I'm testing with the IPCamera demo program. Live video is displayed successfully but recorded video doesn't display, even though the status label says "playing". I had similar behaviour from VLC player so I went back to Hanwha, who responded that recorded playback uses multiple video RTP sessions which VLC player doesn't support.

Is this likely the cause of the issue with RVMedia? I have looked at packets between the component and the NVR through Wireshark and I can see it successfully negotiating the session. If so is there anything I can do with RVMedia to fix this?

Kind regards,

Tim

Re: Multiple video RTP session

Posted: Mon Mar 10, 2025 6:33 pm
by Sergey Tkachenko
Sorry, I am not familiar with RTP in details and do not know how FFmpeg processes it internally.
I can suggest one thing to try. Process TRVCamera.OnGetVideoStreamIndex event.
Is it called?
How many video streams are detected?
Probably, if there are several streams, TRVCamera chose a wrong video stream, try to choose another one.
(Please note that this event is called in a thread context, so you cannot update UI in this event)

Re: Multiple video RTP session

Posted: Tue Mar 11, 2025 10:06 am
by Tim
Thanks, that helped a lot. In the OnGetVideoStreamIndex event the stream count was 3 and the stream index was 0, changing the index to 2 got it to work.

Do you know if there's a way to query the streams to find out which one is video? For now I'm just going to assume that the last stream is the one I'm interested in but it would be nice to make sure.

Re: Multiple video RTP session

Posted: Tue Mar 11, 2025 10:24 am
by Sergey Tkachenko
As I understand, all of them are video, but some of them are empty.
Currently, TRVCamera always chooses the video stream with the lowest index. Normally, it's ok, because usually there is only one video stream per a file/session.
I can try the following: instead of choosing a video stream with the lowest index, choosing video stream when the first video frame is received (a video owning this frame).