[FFmpeg-devel] [PATCH 3/3] lavf/flvdec: use AVERROR_REDO instead of AVERROR(EAGAIN).

Nicolas George george at nsup.org
Fri Nov 27 14:48:09 CET 2015

Le septidi 7 frimaire, an CCXXIV, wm4 a écrit :
> I still do not see how a potential flag to make the API user to be able
> to use this is better than running the demuxer in a thread. I'm talking
> about practice, not theory. Such a flag would work _sometimes_, with
> _some_ demuxers in _some_ very specific situations, and which will only
> be low latency if the AVIO behind it is also low-latency.

Try this on slow hardware:

ffmpeg -lavfi testsrc=s=hd1080 -c:v libx264 -preset veryslow -f null -

and when the encoding has really started (time > 0), press q.

You can observe that (1) at frame ~66, it stops (on the hardware I tried,
for 23 seconds), and when you press q, it stops again (35 seconds for me).
No indication that it is progressing, except high CPU load. This is not good
user experience.

With a best-effort low-latency mode, the codec would return every ~0.5-2
seconds, that would allow the application to print progress, or at least
show that it is not in an endless loop.

That is not perfect, but it is still way better than nothing.

As for running in a thread, I already gave the reasons: poor portability,
trickiness, cost.

> On the contrary, I see this (proposed, not even realized) feature,
> which will be half-broken at the moment of its inception, become yet

Best-effort, not half-broken.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151127/9a28d0b6/attachment.sig>

More information about the ffmpeg-devel mailing list