This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 927ffd0930fa3f7a948d4ed30c67bd518f9549ce Author: Andreas Rheinhardt <[email protected]> AuthorDate: Mon Mar 9 13:41:48 2026 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Tue Jun 23 19:15:58 2026 +0200 fftools/ffmpeg: Remove deprecated -vsync option Deprecated in commit 09c53a04c5892baee88872fbce3df17a00472faa on 2022-06-11. Thanks to Michael Niedermayer for pointing out that the documentation needs to be updated, too. Signed-off-by: Andreas Rheinhardt <[email protected]> --- doc/ffmpeg.texi | 20 +++++++------------- doc/filters.texi | 6 +++--- doc/muxers.texi | 4 ++-- fftools/ffmpeg.h | 5 +---- fftools/ffmpeg_mux_init.c | 6 +----- fftools/ffmpeg_opt.c | 41 ++++------------------------------------- 6 files changed, 18 insertions(+), 64 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 533131adfc..882503142e 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -2388,25 +2388,19 @@ If either the input or output is blocked leading to actual read speed falling be specified readrate, then this rate takes effect till the input catches up with the specified readrate. Must not be lower than the primary readrate. -@item -vsync @var{parameter} (@emph{global}) -@itemx -fps_mode[:@var{stream_specifier}] @var{parameter} (@emph{output,per-stream}) -Set video sync method / framerate mode. vsync is applied to all output video streams -but can be overridden for a stream by setting fps_mode. vsync is deprecated and will be -removed in the future. - -For compatibility reasons some of the values for vsync can be specified as numbers (shown -in parentheses in the following table). +@item -fps_mode[:@var{stream_specifier}] @var{parameter} (@emph{output,per-stream}) +Set video sync method / framerate mode. @table @option -@item passthrough (0) +@item passthrough Each frame is passed with its timestamp from the demuxer to the muxer. -@item cfr (1) +@item cfr Frames will be duplicated and dropped to achieve exactly the requested constant frame rate. -@item vfr (2) +@item vfr Frames are passed through with their timestamp or dropped so as to prevent 2 frames from having the same timestamp. -@item auto (-1) +@item auto Chooses between cfr and vfr depending on muxer capabilities. This is the default method. @end table @@ -2436,7 +2430,7 @@ Do not process input timestamps, but keep their values without trying to sanitize them. In particular, do not remove the initial start time offset value. -Note that, depending on the @option{vsync} option or on specific muxer +Note that, depending on the @option{fps_mode} option or on specific muxer processing (e.g. in case the format option @option{avoid_negative_ts} is enabled) the output timestamps may mismatch with the input timestamps even when this option is selected. diff --git a/doc/filters.texi b/doc/filters.texi index 6b0a331975..62b1e985b0 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -23777,9 +23777,9 @@ The value must be between @code{0} and @var{nb_frames - 1}. Default is @code{0}. @item Produce 8x8 PNG tiles of all keyframes (@option{-skip_frame nokey}) in a movie: @example -ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png +ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -fps_mode passthrough keyframes%03d.png @end example -The @option{-vsync 0} is necessary to prevent @command{ffmpeg} from +The @option{-fps_mode passthrough} is necessary to prevent @command{ffmpeg} from duplicating each output frame to accommodate the originally detected frame rate. @@ -32270,7 +32270,7 @@ select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] over Select useful frames from an ffconcat file which is using inpoints and outpoints but where the source files are not intra frame only. @example -ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf select=concatdec_select -af aselect=concatdec_select output.avi +ffmpeg -copyts -segment_time_metadata 1 -i input.ffconcat -fps_mode passthrough -vf select=concatdec_select -af aselect=concatdec_select output.avi @end example @end itemize diff --git a/doc/muxers.texi b/doc/muxers.texi index 5056a3e3d6..03f0bcd24d 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -2662,7 +2662,7 @@ containing the @code{:} special character must be escaped. Use @command{ffmpeg} for creating a sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., taking one image every second from the input video: @example -ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg' +ffmpeg -i in.avi -fps_mode cfr -r 1 -f image2 'img-%03d.jpeg' @end example Note that with @command{ffmpeg}, if the format is not specified with the @@ -2670,7 +2670,7 @@ Note that with @command{ffmpeg}, if the format is not specified with the format, the image2 muxer is automatically selected, so the previous command can be written as: @example -ffmpeg -i in.avi -vsync cfr -r 1 'img-%03d.jpeg' +ffmpeg -i in.avi -fps_mode cfr -r 1 'img-%03d.jpeg' @end example Note also that the pattern must not necessarily contain "%d" or diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 141a09264b..c44aaf6032 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -51,9 +51,6 @@ #include "libswresample/swresample.h" -// deprecated features -#define FFMPEG_OPT_VSYNC 1 - #define FFMPEG_ERROR_RATE_EXCEEDED FFERRTAG('E', 'R', 'E', 'D') enum VideoSyncMethod { @@ -786,7 +783,7 @@ int check_avoptions_used(const AVDictionary *opts, const AVDictionary *opts_used int assert_file_overwrite(const char *filename); int find_codec(void *logctx, const char *name, enum AVMediaType type, int encoder, const AVCodec **codec); -int parse_and_set_vsync(const char *arg, enum VideoSyncMethod *vsync_var, int file_idx, int st_idx, int is_global); +int parse_and_set_vsync(const char *arg, enum VideoSyncMethod *vsync_var, int file_idx, int st_idx); int filtergraph_is_simple(const FilterGraph *fg); int fg_create_simple(FilterGraph **pfg, diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 9d301e6611..79082f3018 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -735,14 +735,10 @@ static int new_stream_video(Muxer *mux, const OptionsContext *o, opt_match_per_stream_int(ost, &o->force_fps, oc, st, &ms->force_fps); -#if FFMPEG_OPT_VSYNC - *vsync_method = video_sync_method; -#else *vsync_method = VSYNC_AUTO; -#endif opt_match_per_stream_str(ost, &o->fps_mode, oc, st, &fps_mode); if (fps_mode) { - ret = parse_and_set_vsync(fps_mode, vsync_method, ost->file->index, ost->index, 0); + ret = parse_and_set_vsync(fps_mode, vsync_method, ost->file->index, ost->index); if (ret < 0) return ret; } diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 57d58a8791..2c362c64af 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -56,9 +56,6 @@ char *vstats_filename; float dts_delta_threshold = 10; float dts_error_threshold = 3600*30; -#if FFMPEG_OPT_VSYNC -enum VideoSyncMethod video_sync_method = VSYNC_AUTO; -#endif float frame_drop_threshold = 0; int do_benchmark = 0; int do_benchmark_all = 0; @@ -359,32 +356,17 @@ int view_specifier_parse(const char **pspec, ViewSpecifier *vs) return 0; } -int parse_and_set_vsync(const char *arg, enum VideoSyncMethod *vsync_var, int file_idx, int st_idx, int is_global) +int parse_and_set_vsync(const char *arg, enum VideoSyncMethod *vsync_var, int file_idx, int st_idx) { if (!av_strcasecmp(arg, "cfr")) *vsync_var = VSYNC_CFR; else if (!av_strcasecmp(arg, "vfr")) *vsync_var = VSYNC_VFR; else if (!av_strcasecmp(arg, "passthrough")) *vsync_var = VSYNC_PASSTHROUGH; - else if (!is_global && !av_strcasecmp(arg, "auto")) *vsync_var = VSYNC_AUTO; - else if (!is_global) { + else if (!av_strcasecmp(arg, "auto")) *vsync_var = VSYNC_AUTO; + else { av_log(NULL, AV_LOG_FATAL, "Invalid value %s specified for fps_mode of #%d:%d.\n", arg, file_idx, st_idx); return AVERROR(EINVAL); } -#if FFMPEG_OPT_VSYNC - if (is_global && *vsync_var == VSYNC_AUTO) { - int ret; - double num; - - ret = parse_number("vsync", arg, OPT_TYPE_INT, VSYNC_AUTO, VSYNC_VFR, &num); - if (ret < 0) - return ret; - - video_sync_method = num; - av_log(NULL, AV_LOG_WARNING, "Passing a number to -vsync is deprecated," - " use a string argument as described in the manual.\n"); - } -#endif - return 0; } @@ -1228,14 +1210,6 @@ static int opt_audio_filters(void *optctx, const char *opt, const char *arg) return parse_option(o, "filter:a", arg, options); } -#if FFMPEG_OPT_VSYNC -static int opt_vsync(void *optctx, const char *opt, const char *arg) -{ - av_log(NULL, AV_LOG_WARNING, "-vsync is deprecated. Use -fps_mode\n"); - return parse_and_set_vsync(arg, &video_sync_method, -1, -1, 1); -} -#endif - static int opt_timecode(void *optctx, const char *opt, const char *arg) { OptionsContext *o = optctx; @@ -1939,7 +1913,7 @@ const OptionDef options[] = { .u1.name_canon = "tag", }, { "fps_mode", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(fps_mode) }, - "set framerate mode for matching video streams; overrides vsync" }, + "set framerate mode for matching video streams" }, { "force_fps", OPT_TYPE_BOOL, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_OUTPUT, { .off = OFFSET(force_fps) }, "force the selected framerate, disable the best supported framerate selection" }, @@ -2124,12 +2098,5 @@ const OptionDef options[] = { { .func_arg = opt_filter_hw_device }, "set hardware device used when filtering", "device" }, - // deprecated options -#if FFMPEG_OPT_VSYNC - { "vsync", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT, - { .func_arg = opt_vsync }, - "set video sync method globally; deprecated, use -fps_mode", "" }, -#endif - { NULL, }, }; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
