mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.41k stars 2.91k forks source link

Question on --libplacebo-opts #13124

Closed stax76 closed 6 months ago

stax76 commented 10 months ago

There is a --libplacebo-opts option, it's documented with:

Included for debugging purposes only.

If it's true, it doesn't make sense building a libplacebo GUI in my libmpv frontend. Why is it only for debugging purposes only, because mpv has regular options that should be preferred?

ghost commented 10 months ago

--libplacebo-opts can override mpv options and can cause weird option conflicts if you don't know what you're doing. It's mostly useful for options that aren't explicitly mapped in mpv, but exist in libplacebo. Or if there's a rendering-related issue and you're trying to determine if the problem is caused by mpv, or by libplacebo. So realistically, only the former point is useful for most end-users, since there are some libplacebo options that you can only access by passing them through --libplacebo-opts.

dyphire commented 10 months ago

There are still related issues that have not been fixed yet: https://github.com/mpv-player/mpv/issues/12265

stax76 commented 10 months ago

There are about 100 libplacebo options, adding GUI support for all of them could possibly slow down the load time of the conf editor dialog, and it would increase memory usage (C# uses garbage collection), so I wonder which options can be ignored and which one are popular?

In the next mpv.net beta release, there is:

Full list of the options as found in the libplacebo manual:

Global preset preset=<default|fast|high_quality>

Scaling upscaler= downscaler= plane_upscaler=, plane_downscaler= frame_mixer= antiringing_strength=<0.0..1.0> Custom scalers

Debanding deband=<yes|no> deband_preset= deband_iterations=<0..16> deband_threshold=<0.0..1000.0> deband_radius=<0.0..1000.0> deband_grain=<0.0..1000.0> deband_grain_neutral_r, deband_grain_neutral_g, deband_grain_neutral_b

Sigmoidization sigmoid=<yes|no> sigmoid_preset= sigmoid_center=<0.0..1.0> sigmoid_slope=<1.0..20.0>

Color adjustment color_adjustment=<yes|no> color_adjustment_preset= brightness=<-1.0..1.0> contrast=<0.0..100.0> saturation=<0.0..100.0> hue= gamma=<0.0..100.0> temperature=<-1.143..5.286>

HDR peak detection peak_detect=<yes|no> peak_detection_preset=<default|high_quality> peak_smoothing_period=<0.0..1000.0> scene_threshold_low=<0.0..100.0>, scene_threshold_high=<0.0..100.0> peak_percentile=<0.0..100.0> black_cutoff=<0.0..100.0> allow_delayed_peak=<yes|no>

Color mapping color_map=<yes|no> color_map_preset=<default|high_quality> gamut_mapping= Gamut mapping constants lut3d_size_I=<0..1024>, lut3d_size_C=<0..1024>, lut3d_size_h=<0..1024> lut3d_tricubic=<yes|no> gamut_expansion=<yes|no> tone_mapping= Tone-mapping constants inverse_tone_mapping=<yes|no> tone_map_metadata=<any|none|hdr10|hdr10plus|cie_y> tone_lut_size=<0..4096> contrast_recovery=<0.0..2.0> contrast_smoothness=<1.0..32.0> Debug options

Dithering dither=<yes|no> dither_preset= dither_method= dither_lut_size=<1..8> dither_temporal=<yes|no>

Cone distortion cone=<yes|no> cone_preset= cones=<none|l|m|s|lm|ms|ls|lms> cone_strength=

Output blending blend=<yes|no> blend_preset= blend_src_rgb, blend_src_alpha, blend_dst_rgb, blend_dst_alpha

Deinterlacing deinterlace=<yes|no> deinterlace_preset= deinterlace_algo= deinterlace_skip_spatial=<yes|no>

Distortion distort=<yes|no> distort_preset= distort_scale_x, distort_scale_y distort_shear_x, distort_shear_y distort_offset_x, distort_offset_y distort_unscaled=<yes|no> distort_constrain=<yes|no> distort_bicubic=<yes|no> distort_addreess_mode=<clamp|repeat|mirror> distort_alpha_mode=<none|independent|premultiplied>

Miscellaneous renderer settings error_diffusion= lut_type= background_r=<0.0..1.0>, background_g=<0.0..1.0>, background_b=<0.0..1.0> background_transparency=<0.0..1.0> skip_target_clearing=<yes|no> corner_rounding=<0.0..1.0> blend_against_tiles=<yes|no> tile_color_hi_r, tile_color_hi_g, tile_color_hi_b, tile_color_lo_r, tile_color_lo_g, tile_color_l_b tile_size=<2..256>

Performance / quality trade-offs skip_anti_aliasing=<yes|no> preserve_mixing_cache=<yes|no>

Debugging, tuning and testing skip_caching_single_frame=<yes|no> disable_linear_scaling=<yes|no> disable_builtin_scalers=<yes|no> correct_subpixel_offsets=<yes|no> force_dither=<yes|no> disable_dither_gamma_correction=<yes|no> disable_fbos=<yes|no> force_low_bit_depth_fbos=<yes|no> dynamic_constants=<yes|no>

This is a screenshot that shows the improved navigation tree view and the newly developed drop down menu combo box control:

Screenshot (3)

ghost commented 10 months ago

so I wonder which options can be ignored and which one are popular?

Generally speaking, 99% of the popular ones are already mapped in mpv. Off the top of my head, some of the ones I've seen most commonly used are:

Outside of these, there are some niche options like cone/cone_preset, and some visually libplacebo settings like lut3d_tricubic. Can't really think of any others, outside of maybe peak_smoothing_period to play around with brightness shimmering (but I haven't really found any reason to tweak this tbh).

Completely baseless speculation here, but I wouldn't be surprised if there was 1:1 parity between mpv's renderer options and libplacebo's options once vo_gpu is eventually deprecated in the future. So it might be futile trying to cherrypick specific libplacebo-only options, especially when stuff like gamut mapping and tone mapping are always subject to changes and refactoring. But who knows really, I surely don't. Just my two cents on whether or not it's worth building a GUI for --libplacebo-opts specifically.