RVMedia 6 and RTSP - Network problems
Re: RVMedia 6 and RTSP - Network problems
any progress? I tried latest ffmpeg from today and issue persists.
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVMedia 6 and RTSP - Network problems
Sorry, we were busy preparing TRichView update.
I'll test your sample tomorrow.
(Ilya already tested it and he was not able to reproduce. Tomorrow I'll try myself)
I'll test your sample tomorrow.
(Ilya already tested it and he was not able to reproduce. Tomorrow I'll try myself)
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVMedia 6 and RTSP - Network problems
I made a test project.
Here it is, including exe file and ffmpeg:
https://www.trichview.com/support/files ... chTest.zip
Buttons switch between two video URLs you provided.
I pressed about 50 times. I tried switching between the cameras and restarting the same camera again and again. I found no problems.
I tested in updated version (which will be released as 7.1 soon), but I do not think there is a difference
Here it is, including exe file and ffmpeg:
https://www.trichview.com/support/files ... chTest.zip
Buttons switch between two video URLs you provided.
I pressed about 50 times. I tried switching between the cameras and restarting the same camera again and again. I found no problems.
I tested in updated version (which will be released as 7.1 soon), but I do not think there is a difference
Re: RVMedia 6 and RTSP - Network problems
Does your project use FFmpeg libraries? Is FFmpeg enabled and FFmpeg libraries beside the exe? Without FFmpeg it works. Problem is with FFmpeg.
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVMedia 6 and RTSP - Network problems
Yes, this project uses FFmpeg 4.2.1.
Re: RVMedia 6 and RTSP - Network problems
Well, look at enhanced example.
https://www.mitec.cz/CamSwitch.zip
I added Indy TCPServer and TCPClient. Client connects to the server at startup and after some camera switches client is disconnected with error 10054 - Connection reset by peer.
It is caused by FFmpeg. It destroys any network application which uses RVCamera and FFmpeg. It is really big problem. It seems FFmpeg closes Winsock for all existing connections in app.
https://www.mitec.cz/CamSwitch.zip
I added Indy TCPServer and TCPClient. Client connects to the server at startup and after some camera switches client is disconnected with error 10054 - Connection reset by peer.
It is caused by FFmpeg. It destroys any network application which uses RVCamera and FFmpeg. It is really big problem. It seems FFmpeg closes Winsock for all existing connections in app.
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVMedia 6 and RTSP - Network problems
Unfortunately, I do not know how to fix it with FFmpeg.
I can only suggest using GStreamer 0.1. FFmpeg can be turned off by assigning RVCamera1.FFMpegProperty.UseFFMpeg = False.
There is only one difficulty, RVMedia requires correct specification of DeviceType and VideoFormat for GStreamer.
For 'http://150.214.222.100/mjpg/video.mjpg' it is rvdtHTTP, rvvfMJPEG (it can also be played by RVMedia natively, without FFmpeg and GStreamer).
For 'rtmp://semerkandglb.mediatriple.net:1935/semerkandliveedge/semerkand2', I am not sure, currently it does not work stable for me.
Also, I recommend to close IdTCPServer and IdTCPClient in FormClose, otherwise application may hang.
I can only suggest using GStreamer 0.1. FFmpeg can be turned off by assigning RVCamera1.FFMpegProperty.UseFFMpeg = False.
There is only one difficulty, RVMedia requires correct specification of DeviceType and VideoFormat for GStreamer.
For 'http://150.214.222.100/mjpg/video.mjpg' it is rvdtHTTP, rvvfMJPEG (it can also be played by RVMedia natively, without FFmpeg and GStreamer).
For 'rtmp://semerkandglb.mediatriple.net:1935/semerkandliveedge/semerkand2', I am not sure, currently it does not work stable for me.
Also, I recommend to close IdTCPServer and IdTCPClient in FormClose, otherwise application may hang.
Re: RVMedia 6 and RTSP - Network problems
I'm not able to make GStreamer working with any RTSP stream so it is unusable.
Can you put this issue to FFmpeg bug tracker?
Replaying RTSP is most wanted feature and if it is destroys other application connections then it is serious problem.
Can you focus on this issue, please?
EDIT: I have just tested FFVCL (http://www.delphiffmpeg.com) - components that use FFmpeg libraries for playing rtsp and also http camera streams) and when I modified their Player demo with TCPServer and client, connection is not broken regardless of number of URL changes and replayes. So it seems problem is not inside FFmpeg but your components.
EDIT2: I tried to debug where problem can be and if I replace
with
in MRVFFMPEGObject.CloseVideoFile, problem disappears.
Can you check it?
Can you put this issue to FFmpeg bug tracker?
Replaying RTSP is most wanted feature and if it is destroys other application connections then it is serious problem.
Can you focus on this issue, please?
EDIT: I have just tested FFVCL (http://www.delphiffmpeg.com) - components that use FFmpeg libraries for playing rtsp and also http camera streams) and when I modified their Player demo with TCPServer and client, connection is not broken regardless of number of URL changes and replayes. So it seems problem is not inside FFmpeg but your components.
EDIT2: I tried to debug where problem can be and if I replace
Code: Select all
avformat_close_input(pFormat_context);
Code: Select all
avformat_free_context(pFormat_context);
Can you check it?
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVMedia 6 and RTSP - Network problems
I hate to say, but I have no idea how to fix it, since the problem seemingly inside FFmpeg
Re: RVMedia 6 and RTSP - Network problems
Did you check suggested solution?
Re: RVMedia 6 and RTSP - Network problems
It seems you didn't read my post, so once more:
I have just tested FFVCL (http://www.delphiffmpeg.com) - components that use FFmpeg libraries for playing rtsp and also http camera streams) and when I modified their Player demo with TCPServer and client, connection is not broken regardless of number of URL changes and replayes. So it seems problem is not inside FFmpeg but your components.
Then I tried to debug where problem can be and if I replace
with
in MRVFFMPEGObject.CloseVideoFile, problem disappears.
Can you check it?
I have just tested FFVCL (http://www.delphiffmpeg.com) - components that use FFmpeg libraries for playing rtsp and also http camera streams) and when I modified their Player demo with TCPServer and client, connection is not broken regardless of number of URL changes and replayes. So it seems problem is not inside FFmpeg but your components.
Then I tried to debug where problem can be and if I replace
Code: Select all
avformat_close_input(pFormat_context);
Code: Select all
avformat_free_context(pFormat_context);
Can you check it?
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVMedia 6 and RTSP - Network problems
It's possible to make this change in RVMedia code too, but I am not sure that it is a correct change.
Re: RVMedia 6 and RTSP - Network problems
That's why I want you to check it Who else can decide if it is correct or not
Re: RVMedia 6 and RTSP - Network problems
Any progress?
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVMedia 6 and RTSP - Network problems
Sorry, we were busy solving problems in other threads of this forum.
But here, I do not know what I can do. I do not know FFmpeg internals in details, I can rely only to its documentations.
But here, I do not know what I can do. I do not know FFmpeg internals in details, I can rely only to its documentations.