RVMedia 6 and RTSP - Network problems

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
mitzi
Posts: 31
Joined: Thu Oct 10, 2019 12:14 pm

Re: RVMedia 6 and RTSP - Network problems

Post by mitzi »

I really don't think it's FFmpeg problem. Did you inspect suggested solution?
mitzi
Posts: 31
Joined: Thu Oct 10, 2019 12:14 pm

Re: RVMedia 6 and RTSP - Network problems

Post by mitzi »

Latest version 7.1.1 still suffers from this bug.
SkyX
Posts: 8
Joined: Sat Nov 02, 2019 5:29 am

Re: RVMedia 6 and RTSP - Network problems

Post by SkyX »

Hello! The problem has not yet been identified?

Today I was doing the final testing of my program and got a very similar problem.
After 3 times RVCamera aborting, FireDAC close remote database connection!
It is really big problem.

FFmpeg used with rtsp and http connections to IP cameras.
When I use web-cameras is no problem. When I use FireDAC local connections and connect cameras with rtsp/http is no problem too.
SkyX
Posts: 8
Joined: Sat Nov 02, 2019 5:29 am

Re: RVMedia 6 and RTSP - Network problems

Post by SkyX »

UPD:
I replaced

Code: Select all

avformat_close_input(pFormat_context);
with

Code: Select all

avformat_free_context(pFormat_context);
in MRVFFMPEGObject like @mitzi sayd few days ago.

In my project problem solved with http connection, but with rtsp connection after three times aborting video disappears but after 2-3 minutes waiting after the PlayVideoStream connection works fine again.
SkyX
Posts: 8
Joined: Sat Nov 02, 2019 5:29 am

Re: RVMedia 6 and RTSP - Network problems

Post by SkyX »

Here is source code of small application: https://drive.google.com/open?id=1vExqv ... pTeTSBQkWU

This shows an even more severe bug with disabling sockets after a single start of local file playback.
Somewhere inside the component sockets or something else are crashing.
Re-initialization (WSAstartup) in this simple case helps, but what to do with connecting to the database, for example?

Mp4 file is inside. Just put FFmpeg files, recompile and run. Then press ping button before and after playback.
SkyX
Posts: 8
Joined: Sat Nov 02, 2019 5:29 am

Re: RVMedia 6 and RTSP - Network problems

Post by SkyX »

UPD 3:

My experiments with old versions of RVMedia and old unknown version of FFMpeg files:

avcodec-56.dll
avdevice-56.dll
avfilter-5.dll
avformat-56.dll
avutil-54.dll
swresample-1.dll
swscale-3.dll

Results:

RVMedia 6.1 - close connections
RVMedia 5.X (maybe 5.3) - close connections
RVMedia 5.0.1 don't close connections!

With the same FFMpeg files different versions of RVMedia works differently in our case.

5.0.1 don't close other connections in program and works stable.
I try with local files, rtsp and http streams. I do 50+ abort and playvideostream operations.
But artefacts present some times with rtsp (fixed only in 7+ version of RVMedia).

There is 99% not FFMpeg problem! Any ideas?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RVMedia 6 and RTSP - Network problems

Post by Sergey Tkachenko »

I do not forget about this problem. However, there are several other problems in our queue, they need to be solved first. Sorry.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RVMedia 6 and RTSP - Network problems

Post by Sergey Tkachenko »

Solution:

Open MRVFFMPEGObject.pas
Remove the calls of RegisterFFMPEG and UnregisterFFMPEG from this unit.
SkyX
Posts: 8
Joined: Sat Nov 02, 2019 5:29 am

Re: RVMedia 6 and RTSP - Network problems

Post by SkyX »

Nice! Big thx, Sergey!
SkyX
Posts: 8
Joined: Sat Nov 02, 2019 5:29 am

Re: RVMedia 6 and RTSP - Network problems

Post by SkyX »

Sergey, Hi.

This post scarcely related to this topic.

I have a little trouble with 7.2 version:
After first calling PlayVideoStream nothing happens (for http, rtsp and local files).
After Abort and secondary calling PlayVideoStream all works fine.

You can download example from this post https://www.trichview.com/forums/viewto ... 190#p37190.

Now I'm forced to use 7.1.1 with removed calls RegisterFFMPEG/UnregisterFFMPEG. This solution works perfect.

Am I alone seeing this error or is it a problem in my hands?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RVMedia 6 and RTSP - Network problems

Post by Sergey Tkachenko »

I cannot reproduce this problem: video is played immediately when I press "RVCamera PlayVideoStream" button.
Version 7.2 has a known problem with TRVCamMultiView (a bug fix will be released soon), but this demo uses TRVCamView…

Can you test a compiled exe file: https://www.trichview.com/support/files ... rttest.zip ?
SkyX
Posts: 8
Joined: Sat Nov 02, 2019 5:29 am

Re: RVMedia 6 and RTSP - Network problems

Post by SkyX »

Compiled project10 plays video immediately.
Ok, probably it is my local problem. Thx.
SkyX
Posts: 8
Joined: Sat Nov 02, 2019 5:29 am

Re: RVMedia 6 and RTSP - Network problems

Post by SkyX »

7.2.1 nice build. All my problems solved.
mitzi
Posts: 31
Joined: Thu Oct 10, 2019 12:14 pm

Re: RVMedia 6 and RTSP - Network problems

Post by mitzi »

Unfortunatelly, new issue (7.2, 7.2.1) appeared.

When stopping camera (<link removed>), application freezes in neverending loop in function TRVMFFMPEG.Abort (called from TRVCamHTTPGetThread.Abort) at

while IsStart and not IsPlaying do
RVMWait(RV_AbortWaitTime);

because FState is rvffmsStarting and stays so. I assume FState should be rvffmsPlaying when camera is playing (And it is - visually checked).

Sometimes this happens after several successfull stops/starts, sometimes on first stop.

Where can I download version 7.1?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RVMedia 6 and RTSP - Network problems

Post by Sergey Tkachenko »

We will try to fix this problem ASAP.
Version 7.1 is not available for downloading, but I can send it to you. However, version 7.2 fixes several bugs, so I do not recommend to downgrade.
Post Reply