From: Danil Iashchenko <danyaschenko@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Danil Iashchenko <danyaschenko@gmail.com> Subject: [FFmpeg-devel] [PATCH] doc/filters: Add thumbnail_cuda documentation; Update thumbnail_cuda filter description. Date: Fri, 21 Mar 2025 10:13:25 +0000 Message-ID: <20250321101325.22720-1-danyaschenko@gmail.com> (raw) Hi! Added documentation for the thumbnail_cuda filter and updated its description to align with the format of other CUDA-based filters. The new description clarifies its behaviour and avoids confusion with the {thumbnail} filter. Thank you for review! Regards, Danil Iashchenko --- doc/filters.texi | 28 ++++++++++++++++++++++++++++ libavfilter/vf_thumbnail_cuda.c | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 37b8674756..52f67fbd0c 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -26917,6 +26917,34 @@ scale_cuda=passthrough=0 @end example @end itemize +@subsection thumbnail_cuda + +Select the most representative frame in a given sequence of consecutive frames using CUDA. + +The filter accepts the following options: + +@table @option +@item n +Set the frames batch size to analyze; in a set of @var{n} frames, the filter +will pick one of them, and then handle the next batch of @var{n} frames until +the end. Default is @code{100}. +@end table + +Since the filter keeps track of the whole frames sequence, a bigger @var{n} +value will result in a higher memory usage, so a high value is not recommended. + +@subsubsection Example + +@itemize + +@item +Thumbnails are extracted from every @var{n}=150-frame batch, selecting one per batch. Chosen frames are then scaled with @ref{scale_cuda}. +@example +./ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i ./input.mp4 -vf "thumbnail_cuda=150,scale_cuda=1920:1080,hwdownload,format=nv12" ./output/out%03d.png +@end example + +@end itemize + @subsection yadif_cuda Deinterlace the input video using the @ref{yadif} algorithm, but implemented diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c index ee09f7fa3e..121274de11 100644 --- a/libavfilter/vf_thumbnail_cuda.c +++ b/libavfilter/vf_thumbnail_cuda.c @@ -438,7 +438,7 @@ static const AVFilterPad thumbnail_cuda_outputs[] = { const FFFilter ff_vf_thumbnail_cuda = { .p.name = "thumbnail_cuda", - .p.description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), + .p.description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames using CUDA."), .p.priv_class = &thumbnail_cuda_class, .priv_size = sizeof(ThumbnailCudaContext), .init = init, -- 2.39.5 (Apple Git-154) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
reply other threads:[~2025-03-21 10:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20250321101325.22720-1-danyaschenko@gmail.com \ --to=danyaschenko@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git