I have a 2560x1440 camera wired over ethernet, that I cannot get low enough latency to use properly. We're talking ~10 seconds delay with a Quadro P2000, but with my Ryzen 3900X I can get the same quality but < 1 second latency. ffmpeg version 3.4.8-0ubuntu0.2. I'm using a software called Shinobi, and this is the ffmpeg command that gets fired:
/usr/bin/ffmpeg
-progress pipe:5
-use_wallclock_as_timestamps 1
-analyzeduration 1000000
-probesize 1000000
-fflags +igndts
-rtsp_transport tcp
-hwaccel cuvid
-c:v hevc_cuvid
-loglevel warning
-i rtsp://cam:camcam@192.168.1.111:554/live
-strict
-2
-an
-c:v hevc_nvenc
-crf 1
-movflags +frag_keyframe+empty_moov+default_base_moof
-metadata title=Shinobi H.265 Stream
-reset_timestamps 1
-f hevc pipe:1
I set the preset to lossless and crf to 1 myself. I don't think hls_time and hls_list_size has anything to do with latency, but I also set those.
I tried a bunch of different presets and crf values, such as the llhq and llhp, which definitely helped, but the latency is still about 3-4 seconds. Again, too much.
I basically want as low latency as possible, with the highest quality stream as possible (don't we all?). By using Shinobi's MJPEG preset, I can get < 1 second latency with the same quality.
What options can I try to change up?
EDIT: The codecs of my cameras are Codec: H264 - MPEG-4 AVC (part 10) (h264) and Codec: MPEG-H Part2/HEVC (H.265) (hevc)