diff options
-rw-r--r-- | DOCS/interface-changes.rst | 1 | ||||
-rw-r--r-- | DOCS/man/options.rst | 5 | ||||
-rw-r--r-- | video/image_writer.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 981a3254a9..d09e7c7a94 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -31,6 +31,7 @@ Interface changes - add `--secondary-sub-delay`, decouple secondary subtitles from `--sub-delay` - add the `--osd-bar-border-size` option + - `--screenshot-avif-pixfmt` no longer defaults to yuv420p --- mpv 0.37.0 --- - `--save-position-on-quit` and its associated commands now store state files in %LOCALAPPDATA% instead of %APPDATA% directory by default on Windows. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index cc49d18860..5dd674c184 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4559,9 +4559,8 @@ Screenshot Default: ``libaom-av1`` ``--screenshot-avif-pixfmt=<format>`` - Specify the pixel format to the libavcodec encoder. - - Default: ``yuv420p`` + Specify the pixel format for the libavcodec encoder. Defaults to empty, + which lets mpv pick one close to the source format. ``--screenshot-avif-opts=key1=value1,key2=value2,...`` Specifies libavcodec options for selected encoder. For more information, diff --git a/video/image_writer.c b/video/image_writer.c index 288d809be4..76e6e01af7 100644 --- a/video/image_writer.c +++ b/video/image_writer.c @@ -59,7 +59,6 @@ const struct image_writer_opts image_writer_opts_defaults = { .jxl_distance = 1.0, .jxl_effort = 4, .avif_encoder = "libaom-av1", - .avif_pixfmt = "yuv420p", .avif_opts = (char*[]){ "usage", "allintra", "crf", "32", @@ -717,7 +716,8 @@ bool write_image(struct mp_image *image, const struct image_writer_opts *opts, #if HAVE_AVIF_MUXER if (opts->format == AV_CODEC_ID_AV1) { write = write_avif; - destfmt = mp_imgfmt_from_name(bstr0(opts->avif_pixfmt)); + if (opts->avif_pixfmt && opts->avif_pixfmt[0]) + destfmt = mp_imgfmt_from_name(bstr0(opts->avif_pixfmt)); } #endif if (opts->format == AV_CODEC_ID_WEBP && !opts->webp_lossless) { |