[FFmpeg-devel] [PATCH] avcodec/libsvtav1: send the EOS signal without a one frame delay to allow for the library to operate in a low-delay mode

James Almer jamrial at gmail.com
Wed Feb 28 00:36:37 EET 2024


On 2/27/2024 7:22 PM, Cosmin Stejerean via ffmpeg-devel wrote:
> 
> 
>> On Feb 27, 2024, at 1:49 PM, James Almer <jamrial at gmail.com> wrote:
>>
>>>> SVT-AV1 1.8.0 has this value set to 1.8.0, same as in the current git head commit. Is this in preparation for an upcoming release?
>>> Yes, this is in preparation for release 2.0 which is targeted for next week. https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/2155 is tracking the status, and this API change is one of the outstanding items.
>>
>> Without this patch, the command "ffmpeg -lavfi testsrc,format=yuv420p -vframes 101 -c:v libsvtav1 -loglevel debug -f null -" gives this:
>>
>>> Output stream #0:0 (video): 101 frames encoded; 101 packets muxed (17890 bytes);
>>> Total: 101 packets (17890 bytes) muxed
>>> frame=  101 fps=0.0 q=31.0 Lsize=N/A time=00:00:04.00 bitrate=N/A
>>
>> Whereas with it applied, i get:
>>
>>> Output stream #0:0 (video): 101 frames encoded; 100 packets muxed (17885 bytes);
>>> Total: 100 packets (17885 bytes) muxed
>>> frame=  100 fps=0.0 q=35.0 Lsize=N/A time=00:00:03.96 bitrate=N/A
>>
>> If i pass it a single frame, i get no output at all. So the last frame is being lost.
> 
> This change depends on the API change on the SVT-AV1 side, which is in in https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2189
> 
> This will get merged in shortly as part of the 2.0 release. If I build this patch against the low-delay-api-change branch (from PR 2189) then I get
> 
>> Output stream #0:0 (video): 101 frames encoded; 101 packets muxed (17970 bytes);
>> Total: 101 packets (17970 bytes) muxed

Yes, i can confirm it works after applying !2189.

Will apply then. Thanks.


More information about the ffmpeg-devel mailing list