[FFmpeg-user] Reduce latency in ffmpeg snapshot

Pedro Torres pedro.torres at inw-tech.com
Wed Dec 2 18:29:41 CET 2015


I have a latency problem with FFMPEG.
I have a streaming server running and I occasionally need to take multiple snapshots over a period of time (in the example below, 5s), and then examine the snapshots taken. Time is critical.
With this command I take 25 frames per second over 5 seconds, meaning I will have 125 snapshots in my folder.
ffmpeg.exe -ss 0.05 -re -i "server" -ss o -vf fps=25 -to 5 -y "destination folder"

The -vf fps is forcing the 25 frames per second even if the server can't provide them.
The problem is that -ss 0.05 is not doing its job. It is supposed to delay the initial snapshot for 50 milliseconds but FFMPEG takes around 200ms to "start" the service on itself :/. This means the first snapshot is taken after around 200ms after I called the service. (200ms is way too big of a latency for my purpose... I can survive with 100ms)
How can I force FFMPEG to start taking snapshots earlier? Or is there a way to get snapshots, let's say, from the buffer (e.g. start taking snapshots 150ms in the past)?
PS: Changing the -ss from 0.05 to 0.00 is not doing anything, I can only see the -ss doing something if the value is bigger than 0.2/0.25.

Thanks in advance.

Regards/Cumprimentos,


Pedro Torres

|

Consultant


pedro.torres at inw-tech.com<http://innowave-technologies.com/qrcodeinfo/signature/preview.php>


M:

963476958

|

P:

+351 213 174 421

|

F:

+351 218 023 958


[Description: assinaturaInnoWave]<http://www.innowave-technologies.com/>


[http://www.innowave-technologies.com/images/signature/image002.jpg]


[Description: innowave]<http://www.innowave-technologies.com/>

[Description: linkedin]<http://www.linkedin.com/company/innowave-technologies?trk=ppro_cprof>

[Description: facebook]<http://www.facebook.com/InnoWaveTechnologies?ref=ts>

[Description: twiter]<https://twitter.com/inwt>

[Description: twiter]<https://twitter.com/inwt>





-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 49250 bytes
Desc: image001.jpg
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20151202/b99211f8/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 31083 bytes
Desc: image002.jpg
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20151202/b99211f8/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 3489 bytes
Desc: image003.jpg
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20151202/b99211f8/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 2071 bytes
Desc: image004.jpg
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20151202/b99211f8/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 2018 bytes
Desc: image005.jpg
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20151202/b99211f8/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 2073 bytes
Desc: image006.jpg
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20151202/b99211f8/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 824 bytes
Desc: image007.jpg
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20151202/b99211f8/attachment-0006.jpg>


More information about the ffmpeg-user mailing list