Hi Wim,
Something is strange, using only the video (no /a), and specifying /x and /y, I have a big delay !
Previous build had a short delay (a few ms) while now, the delay is near 2s ! (time betwwen the real movement until it is shown in the video)
(with ot without /x /y parm, the result is the same)
Any idea about this ?
Is it going into the video size list for each mjpeg ?
Regards
Rémy
Hi Rémy,
The previous build and this one work the same. The delay occurs when ffplay decides to buffer the video stream before showing it.
When using "webcam /m/s | ffplay -i -" then there is that big delay (shows vq= 742KB which I guess is the buffer size used) .
When using "webcam /m/s | ffplay -framerate 50 -i -" there appears to be almost no delay.
When using "webcam /f5/m/s | ffplay -framerate 50 -i -" there is is almost no delay too.
And no, the video size list is only scanned once or twice at the start of the program.
Regards,
Wim
Thanks Wim.
I did new tests and sometimes, I have no latency with framerate 25 but yes, mostly I have it (ffplay is the one adding latency as you wrote)
I found that some parameters makes the video well at start but them, the delay appears and stay constant.
My be I didn't run enough time to see it before and yes, using basic parameters, latency is the same.
Strange having to use a framerate higher than the real one to prevent the delay... (this may introduce more processing)
I added a few more parameters in my ffplay command for lowest latency.
ffplay -f mjpeg -threads auto -framerate 50 -i \PIPE\Webcam\Video
Setting framerate to 30 show vq (video queuing left at 0) while framerate 25 make it increase (not all the time) slowly up to 567K (in my case). As soon vq increases, latency appears and increases as long vq increases. From my tests, adding 5 fps to the real framerate prevents high latency
" delay (seconds) = vq_number * 8 * 1024 / video_stream_bits_per_second "
Then, to not have the "invalid data found" message due specific Logitech process, I added the -v quiet flag
ffplay -f mjpeg -threads auto -framerate 30 -v quiet -i \PIPE\Webcam\Video
Best regards
Rémy