Latency and ffmpeg

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
chzer
Posts: 5
Joined: Tue Jun 16, 2020 6:13 pm

Latency and ffmpeg

Post by chzer »

Hi,
I downloaded a trial version of RVMedia.

1) I connected to IP camera but the image refrech every 2 seconds, i tried to set Latency to 0 with same result
With the soft provided with camera refrech image every 1 second.

2) I tried to use ffmpeg with old DLLs (2015) but it's not work, i can't find a new DLL in https://ffmpeg.org/download.html, thre is only 3 exe
ffmpeg.exe, ffplay.exe and ffprobe.exe.

3) What is the best MPEG or H.264 (ffmpeg) ?

Thank's.
Chouk
ws534
Posts: 8
Joined: Tue Aug 24, 2021 10:20 am

Re: Latency and ffmpeg

Post by ws534 »

about Latency, i have 2 sec delay in video when use ffmpeg + tcp
to reduce delay i switch tcp to udp and reduce FIFO buffer
after what delay in video about 0.2 sec
chzer
Posts: 5
Joined: Tue Jun 16, 2020 6:13 pm

Re: Latency and ffmpeg

Post by chzer »

Hi,
Thank's for reply, how can i use udp in Media Test ?
In URL udp://Ip adress: ?? (port ? password??
What i must change in RVCamera1 properties ?
Is there any example to use udp ??
Thank's
Chouk
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Latency and ffmpeg

Post by Sergey Tkachenko »

1) If the video stream has MJpeg format via HTTP, RVMedia can play it using 3 different ways:
- by itself
- using FFmpeg (if FFmpeg is available and RVCamera.FFmpegProperty.UseFFmpeg = True)
- using GStreamer (if GStreamer is available and RVCamera.GStreamerProperty.UseGStreamer = True and FFmpeg is not used).

If the video has H.264 format, or protocol is RTSP, RVMedia can play it using FFmpeg or GStreamer.

GStreamer is not used if RVCamera.DeviceType = rvdtIPCamera.

Note that GStreamer / FFmpeg libraries must have the same bitness (32 or 64 bits) as your project.
Newer versions of FFmpeg compiled for Windows can be downloaded only in 64bit version (at least I do not know how to find 32bit versions).

2) H.264 is much better than MJpeg,
MJpeg is just a stream that contains frames as Jpeg images, i.e. each frame is compressed separately.
H.264 uses special video compression methods.

3) If your video stream uses RTSP protocol, you can assign RVCamera.FFmpegProperty.RTSPTransport := [rvpeUDP] and change value of RVCamera.FFmpegProperty.UdpFifoBufferSize.
chzer
Posts: 5
Joined: Tue Jun 16, 2020 6:13 pm

Re: Latency and ffmpeg

Post by chzer »

Thank you for your reply,
I can get video with your compiled exe as you can see in this screenshoot


My problem is latency 2s, as i mentioned i reduced latency to 0 but no result.

How can i use udp in Media Test ?

I downloaded recent DLL (04/09/2021) for FFmpeg but it's not work (i am in 32 bits).

Thank's

Chouk
Attachments
Image1.png
Image1.png (73.93 KiB) Viewed 16229 times
ws534
Posts: 8
Joined: Tue Aug 24, 2021 10:20 am

Re: Latency and ffmpeg

Post by ws534 »

hi
try to change this
Attachments
2.png
2.png (212.62 KiB) Viewed 16202 times
chzer
Posts: 5
Joined: Tue Jun 16, 2020 6:13 pm

Re: Latency and ffmpeg

Post by chzer »

Thank you for your reply
I tried to use UDP with udp://192.168.0.10:port ??
I can't found the UDP port, how can ik get it ?
Thank's
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Latency and ffmpeg

Post by Sergey Tkachenko »

The protocol may still be RTSP (I assume you use 'rtsp:' URL?)
But internally, RTSP protocol may be based on UDP or HTTP.
To use RTSP on UDP, assign RVCamera.FFmpegProperty.RTSPTransport := [rvpeUDP]
Post Reply