IP Cam with RTSP, can not get video working

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
IpCamFan
Posts: 15
Joined: Wed Nov 19, 2014 2:43 pm

IP Cam with RTSP, can not get video working

Post by IpCamFan »

Hello, please I need support.
I am using RVMedia 5.0.2 under Delphi Tokyo 10.2.2
I have a IP camera in the local network, which streams mjpeg in RTSP.
The IP address and necesary link in the LAN network is known.
Example:
rtsp://admin:[email protected]/00/

For testing, I can enter this address in any simple common player
like VCL media player, and it immediately streams and shows the video.

However, in RVMedia I can not get it to work. Seams I am doing something wrong.
I tried a lot, but can not find the correct setting to get it work.

Of course the latest available FFmpeg dlls, I placed into the exe folder.
And the RVCamera1.IsSupportedFFMPEG returns true.
(I just removed them from the Zip, because the file was too large for this forum then).
Regarding the online help, with ffmpeg it should work
with RTSP and mjpeg.
The Cam is configured to stream mjpeg.
But I also tried everything, using .h264, but does not work too.

I setup a very simple project, only Cam and Viewer.
In the pictures, you see all my settings. But does not work.
What do I need to setup, to get it work?
Please help, thank you.
Attachments
DelphiSetup.png
DelphiSetup.png (152.9 KiB) Viewed 63787 times
VclPlayerTestSameUrl.png
VclPlayerTestSameUrl.png (205.1 KiB) Viewed 63787 times
SourcesMiniIpRTSP_Tokyo1022.7z
(50.81 KiB) Downloaded 2771 times
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: IP Cam with RTSP, can not get video working

Post by Sergey Tkachenko »

RVMedia 5.0.2 does not support the latest version of FFMpeg. Try RVMedia 5.3 beta
IpCamFan
Posts: 15
Joined: Wed Nov 19, 2014 2:43 pm

Re: IP Cam with RTSP, can not get video working

Post by IpCamFan »

Hello, thanks, I will try.
Besides, which maximum version number of FFMpeg does it support then?
IpCamFan
Posts: 15
Joined: Wed Nov 19, 2014 2:43 pm

Re: IP Cam with RTSP, can not get video working

Post by IpCamFan »

I also tried now 5.0.2, with ffmpeg as of 05/2015 for example.
IsSupportedFFMPEG says True. But also with this nothing comes.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: IP Cam with RTSP, can not get video working

Post by Sergey Tkachenko »

When changes in FFmpeg DLL make it incompatible, version number in DLL file name is increased.

RVMedia 5.3 supports the following maximal version numbers:
avcodec-58.dll
avformat-58.dll
avutil-56.dll
swresample-3.dll
swscale-5.dll
They should correspond to FFmpeg 4 (although, when I checked for the last time, FFmpeg 4.0 was not released yet; but they were already incompatible with FFmpeg 3)
RVMedia 5.3 also supports FFmpeg versions 2 and 3 (and all intermediate releases, because they are compatible with version 2, 3 or 4).
RVMedia 5.3 should also support FFmpeg version 1 for decoding, but it was not tested.
In RVMedia 5.3, we made important changes in FFmpeg API translation, including checking FFmpeg compatibility. This version does not attempt to load FFmpeg libraries having greater number than supported (and listed above).

As for FFmpeg 5.0.x, it supports FFmpeg version 1 (not properly tested), 2 and 3, but was primarily tested with FFmpeg 2. And it attempts to load all versions of FFmpeg, even if it is too new.
IpCamFan
Posts: 15
Joined: Wed Nov 19, 2014 2:43 pm

Re: IP Cam with RTSP, can not get video working

Post by IpCamFan »

Hello thank you,
but, I meant which is the ffmpeg version for the 5.0.2 which I bought?
(the 5.3 complains, that it found an old serial number, and does not install, so I can not do beta testing).
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: IP Cam with RTSP, can not get video working

Post by Sergey Tkachenko »

If you can make this camera available from internet (for example, using some free dynamic DNS service) and send a link to us, we can check what's wrong with it.

By the way, it VLC shows a stream, it is not necessary that this stream can be displayed using FFmpeg.
I guess, it first tries to open it with FFmpeg, and if it fails, it tries some other method. When it happens, if you open Tools | Media information dialog, you will see a double number of video and audio codecs. This situation rarely happens, but I saw it.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: IP Cam with RTSP, can not get video working

Post by Sergey Tkachenko »

Yes, RVMedia 5.3 beta is a paid update for customers who ordered prior to 2016 (1/2 of the full price, if I remember correctly)
You can test RVMedia 5.0.2 with FFmpeg from http://www.trichview.com/forums/viewtop ... =17&t=6880
See also my previous reply.
IpCamFan
Posts: 15
Joined: Wed Nov 19, 2014 2:43 pm

Re: IP Cam with RTSP, can not get video working

Post by IpCamFan »

Hello,
I tested with RVMedia 5.0.2 with the ffmpeg which you suggest
(http://www.trichview.com/forums/viewtop ... =17&t=6880).
It is the same result, it does not work.
Which is the wrong setting in my program?
IpCamFan
Posts: 15
Joined: Wed Nov 19, 2014 2:43 pm

Re: IP Cam with RTSP, can not get video working

Post by IpCamFan »

I will make the Cam available for you, tomorrow morning. I will write you a private message then, with the access data.
I can then give you the TeamViewer login data to my working pc.
There also Delphi exists, and you can perfectly try all.
I will write tomorrow, thank you!
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: IP Cam with RTSP, can not get video working

Post by Sergey Tkachenko »

Summary for readers of this forum:
This camera produced video that cannot be displayed by FFmpeg.
It could be displayed with GStreamer, but we have to make some corrections in our code to enable MJPEG via RTSP support.
In the next update, we plan to implement native MJPEG via RTSP support, without FFmpeg or GStreamer.
denismol
Posts: 3
Joined: Tue Jul 03, 2018 11:29 am

Re: IP Cam with RTSP, can not get video working

Post by denismol »

Sergey Tkachenko wrote: Wed Feb 28, 2018 12:43 pm In the next update, we plan to implement native MJPEG via RTSP support, without FFmpeg or GStreamer.
When you plan release this update?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: IP Cam with RTSP, can not get video working

Post by Sergey Tkachenko »

In this week. Everything is ready, the last (Lazarus-specific) bug needs to be fixed.
ivanRar
Posts: 3
Joined: Fri Aug 16, 2019 3:01 pm

IP Cam with RTSP can not get video working

Post by ivanRar »

When the TRVCamRecorder is connected to a TRVCamera with DeviceTpe=rvdtDesktop the TRVCamRecorder does not set its VideoWidth and VideoWidth automatically.

I figured out a workaround when using DesktopMode=vrdmWindow by using GetWindowRect to get the size of the window I am capturing, but how can I get the size of the monitors or desktop when I use DestopMode=rvdmFull?

Is there a way to get the video size from TRVCamera?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: IP Cam with RTSP, can not get video working

Post by Sergey Tkachenko »

Do you have VideoAutoSize = True?
TRVCamRecorder knows nothing about video source. It works only with supplied frames.
If a new frame size is different from VideoWidth x VideoHeight:
- if VideoAutoSize = True, the frame size is assigned to VideoWidth and VideoHeight, video recording is restarted with the new parameters;
- if VideoAutoSize = False, the frame is scaled to VideoWidth and VideoHeight.
Please note that VideoWidth and VideoHeight are updated not immediately when you start recording, but on receiving the first video frame.
Post Reply