[FFmpeg-devel] [PATCH 23/24] ffmpeg: simplify the use of OutputStream.frame_number

Michael Niedermayer michael at niedermayer.cc
Tue Dec 14 23:13:43 EET 2021


On Mon, Dec 13, 2021 at 04:20:41PM +0100, Anton Khirnov wrote:
> It features in limiting the number of output frames (-frames option) and
> currently can be incremented from two places:
> - for video encoding (not streamcopy), in do_video_out() after each
>   successful avcodec_send_frame() call
> - for all other cases, in of_submit_packet()
> 
> Not only is this inconsistent and confusing, but also the special
> treatment for video encoding is redundant, since
> AVCodecContext.frame_count stores the exact same value (number of
> successful avcodec_send_frame()) calls.
> 
> Replace the use of OutputStream.frame_count in do_video_out() with
> AVCodecContext.frame_count. Modify OutputStream.frame_count in the same
> way for all streams.
> ---
>  fftools/ffmpeg.c     |  9 ++++-----
>  fftools/ffmpeg_mux.c | 19 +++++++------------
>  2 files changed, 11 insertions(+), 17 deletions(-)

This results in differences
one is:
./ffmpeg -i ~/tickets/4072/CoP\ 1\ 1\ 3\ -M.avi -vframes 2 -bitexact -vcodec huffyuv /tmp/4072-fic-old.avi

-rw-r----- 1 michael michael 3572792 Dez 14 22:09 /tmp/4072-fic-new.avi
-rw-r----- 1 michael michael 1908172 Dez 14 22:10 /tmp/4072-fic-old.avi

I see other differences caused by patches today i still need to investigate
what causes what

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20211214/64c07c17/attachment.sig>


More information about the ffmpeg-devel mailing list