summaryrefslogtreecommitdiffstats
path: root/DOCS/man/vf.rst
Commit message (Collapse)AuthorAgeFilesLines
* DOCS: fix spelling of environment and corresponding/correspondsSebastian Ramacher3 days1-1/+1
|
* DOCS/vf: update vf_gpu optionsShreesh Adiga7 days1-3/+13
|
* vf_format: add hdr10plus sub-parameter to format video filterKacper Michajłow2024-03-091-0/+4
|
* csputils: add missing PL_COLOR_SYSTEM namesKacper Michajłow2024-03-091-4/+7
|
* m_option: drop support for -del for list optionsDudemanguy2023-10-301-5/+0
| | | | | | 5f74ed58286a1339412554932f31844ec1b64280 deprecated this many years ago. The utility is questionable at best given that -remove exists and is more natural to use. Free up some code and drop it.
* options: rename --fps to --container-fps-overrideDudemanguy2023-10-251-1/+1
| | | | | | This better reflects what it actually does. As a bonus, script writers won't be misled into thinking that fps displays the actual video or display fps.
* options: remove --vf-defaults and --af-defaultsDudemanguy2023-09-211-8/+0
| | | | | | | These were deprecated a long time ago and apparently didn't even work with lavfi filters. Go ahead and remove them and additionally clean up some code related to them. m_config_from_obj_desc_and_args becomes much simpler now and a couple of arguments can be completely removed.
* f_lavfi: don't reject dynamic lavfi ins/outsllyyr2023-08-281-0/+6
| | | | | | | | | | Ideally, users should be using lavfi-complex instead of lavfi-bridge for such a use case, however currently lavfi-complex doesn't support hwdec. So we can allow filters with dynamic inputs to work with lavfi-bridge, at the cost of them only being able to take in only one input. This should probably be reverted when/if lavfi-complex has hwdec, but for now this allows us to use libplacebo as a video filter with hwdec in mpv again.
* vf_vapoursynth: save display resolution as a variableDudemanguy2023-08-131-0/+6
| | | | | | | | | | | | | | mpv has a generic method for getting the display resolution, so we can save it in vf_vapoursynth without too much trouble. Unfortunately, the resolution won't actually be available in many cases (like my own) because the windowing backend doesn't actually know it yet. It looks like at least windows always returns the default monitor (maybe we should do something similar for x11 and wayland), so there's at least some value. Of course, this still has a bunch of pitfalls like not being able to cope with multi monitor setups at all but so does display_fps. As an aside, the vapoursynth API this uses apparently requires R26 (an ancient version anyway), so bump the build to compensate for this. Fixes #11510
* hwdec_vulkan: add Vulkan HW InteropPhilip Langdale2023-05-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vulkan Video Decoding has finally become a reality, as it's now showing up in shipping drivers, and the ffmpeg support has been merged. With that in mind, this change introduces HW interop support for ffmpeg Vulkan frames. The implementation is functionally complete - it can display frames produced by hardware decoding, and it can work with ffmpeg vulkan filters. There are still various caveats due to gaps and bugs in drivers, so YMMV, as always. Primary testing has been done on Intel, AMD, and nvidia hardware on Linux with basic Windows testing on nvidia. Notable caveats: * Due to driver bugs, video decoding on nvidia does not work right now, unless you use the Vulkan Beta driver. It can be worked around, but requires ffmpeg changes that are not considered acceptable to merge. * Even if those work-arounds are applied, Vulkan filters will not work on video that was decoded by Vulkan, due to additional bugs in the nvidia drivers. The filters do work correctly on content decoded some other way, and then uploaded to Vulkan (eg: Decode with nvdec, upload with --vf=format=vulkan) * Vulkan filters can only be used with drivers that support VK_EXT_descriptor_buffer which doesn't include Intel ANV as yet. There is an MR outstanding for this. * When dealing with 1080p content, there may be some visual distortion in the bottom lines of frames due to chroma scaling incorporating the extra hidden lines at the bottom of the frame (1080p content is actually stored as 1088 lines), depending on the hardware/driver combination and the scaling algorithm. This cannot be easily addressed as the mechanical fix for it violates the Vulkan spec, and probably requires a spec change to resolve properly. All of these caveats will be fixed in either drivers or ffmpeg, and so will not require mpv changes (unless something unexpected happens) If you want to run on nvidia with the non-beta drivers, you can this ffmpeg tree with the work-around patches: * https://github.com/philipl/FFmpeg/tree/vulkan-nvidia-workarounds
* DOCS/man/vf.rst : replace the outdated syntaxhooke0072022-09-271-1/+1
| | | | | `get_core()` had been deprecated for several years and totally removed since vapoursynth R55 API4.
* vf_format: support forwarding/stripping film grain metadataLynne2022-04-051-0/+4
|
* vf_format: add dolbyvision sub-optionNiklas Haas2022-01-091-0/+4
| | | | | | | | | | Useful to strip dolbyvision from the output, in cases where the user does not want it applied. Doing this as a video filter gives users the abiilty to easily toggle this stripping at runtime in a way that properly propagates to any (potentially stateful) VO. It also thematically fits the rest of the options in vf_format, which are similarly concerned with modifying the video image parameters.
* DOCS: fix spellinga13460542021-08-241-2/+2
|
* DOCS: convert 3rd party http links to httpsLaserEyess2021-08-171-2/+2
| | | | | | | | | | Discovered with: find . -type f \( -name '*.md' -o -name '*.rst' \) -exec grep -n 'http://' {} + All real, i.e. non-example, links found were moved to https. There are some dead links and websites with no https available which were not converted.
* docs: Fix an old style parameter referenceChris Varenhorst2021-01-201-1/+1
| | | | `--vf format:stereo-in=help` no longer works. It now must be `--vf=format:stereo-in=help`
* video: add alpha type metadatawm42020-04-241-0/+8
| | | | | | | | | This is mostly for testing. It adds passing through the metadata through the video chain. The metadata can be manipulated with vf_format. Support for zimg alpha conversion (if built with zimg after it gained alpha support) is implemented. Support premultiplied input in vo_gpu. Some things still seem to be buggy.
* vf_format: add gross mechanism for forcing scaler for testingwm42020-04-131-0/+4
| | | | | | | | | | | This sucks, but is helpful for testing. Obviously, it would be much nicer if there were a way to specify _all_ scaler options per filter (if the user wanted), instead of always using the global options. But this is "too hard" for now. For testing, it is extremely convenient to select the scaler backend, so add this option, but make clear that it could go away. We'd delete it once there is a better mechanism for this.
* vf_format: add w, h parameterswm42020-02-091-0/+4
| | | | Yes, this thing became vf_scale through the back door.
* options: deprecate -del for list optionswm42019-12-181-3/+3
| | | | | | I never liked that these used integer indexes. -remove should have existed from the start. This deprecation is yet another empty threat, though.
* options: add -remove action to list optionswm42019-12-181-5/+17
| | | | | | Actually I wanted this for key/value lists only, but add it to the others for consistency too. (For vf/af it barely makes even sense, but anyway.)
* options: increase consistency between list options and document themwm42019-12-181-0/+3
| | | | | | | | | | | | | | | | | | | | Whenever I deal with this, I have to look at the code to make sense of this. And beyond that, there are some strange inconsistencies. (I think this code is cursed. It always was, and maybe always will be.) Although the manpage claimed that using multiple items for -add etc. is deprecated, string list options didn't warn against it. So add the warning, and add something in the changelog (even though nobody will ever read this). The manpage mentioned --vf-append, but this didn't even exist. So add it, I guess. We encourage using -append for the other option types, so for consistency, it should work on filter options. (And I already tricked me into believing it existed when I mentioned it in the manpage.) Make the "operations" table separate for all option types, and mention the option type on every single of the top-level list options.
* vf_gpu: render subtitleswm42019-11-301-3/+3
| | | | | | | Pretty annoying affair. The vo_gpu code could of course not trigger rendering from filters yet, so it needed to be extended. Also, this uses some icky stuff made for vf_sub (and this was the reason I marked vf_sub as deprecated), so everything is terrible.
* vf_gpu: add video filter using vo_gpu's rendererwm42019-11-291-0/+36
| | | | | | | | | Probably pretty useless in this form (see: the wall of warnings), but someone wanted this. I think this should be useful to perform some automated tests, maybe. Fixes: #7194
* manpage: fix RST formatting errorin vf_format descriptionwm42019-10-241-1/+1
|
* manpage: slap "do not use" label on vf_vapoursynthwm42019-10-241-4/+10
| | | | Plus some other minor corrections.
* vf: improve vf_vapoursynth descriptionwm42019-10-231-18/+71
| | | | | | | In particular describe dataflow issues (see #7020). Insert complaint that I'm wasting time on this crap instead of things that benefit me.
* manpage: finish an unfinished sentencewm42019-10-211-5/+7
|
* filters: extend vf_format so that it can convert color parameterswm42019-10-211-4/+44
| | | | | | | | | | | | | | | | | | | | | | | | | Form some reason (and because of my fault), vf_format converts image formats, but nothing else. For example, setting the "colormatrix" sub-parameter would not convert it to the new value, but instead overwrite the metadata (basically "reinterpreting" the image data without changing it). Make the historical mistake worse, and go all the way and extend it such that it can perform a conversion. For compatibility reasons, this needs to be requested explicitly. (Maybe this would deserve a separate filter to begin with, but things are messed up anyway. Feel free to suggest an elegant and simple solution.) This demonstrates how zimg can properly perform some conversions which swscale cannot (see examples added to vf.rst). Stupidly this requires 2 code paths, one for conversion, and one for overriding the parameters. Due to the filter bullshit (what was I thinking), this requires quite some acrobatics that would not be necessary without these abstractions. On the other hand, it'd definitely be more of a mess without it. Oh whatever.
* video, demux: rip out unused spherical metadata codewm42019-10-171-11/+0
| | | | | | This was preparation into something that never happened. Spherical video is a shit idea anyway.
* video: add pure gamma TRC curves for 2.0, 2.4 and 2.6.Wessel Dankers2019-09-271-0/+3
|
* video: add vf_fingerprint and a skip-logo scriptwm42019-09-191-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | skip-logo.lua is just what I wanted to have. Explanations are on the top of that file. As usual, all documentation threatens to remove this stuff all the time, since this stuff is just for me, and unlike a normal user I can afford the luxuary of hacking the shit directly into the player. vf_fingerprint is needed to support this script. It needs to scale down video frames as part of its operation. For that, it uses zimg. zimg is much faster than libswscale and generates more correct output. (The filter includes a runtime fallback, but it doesn't even work because libswscale fucks up and can't do YUV->Gray with range adjustment.) Note on the algorithm: seems almost too simple, but was suggested to me. It seems to be pretty effective, although long time experience with false positives is missing. At first I wanted to use dHash [1][2], which is also pretty simple and effective, but might actually be worse than the implemented mechanism. dHash has the advantage that the fingerprint is smaller. But exact matching is too unreliable, and you'd still need to determine the number of different bits for fuzzier comparison. So there wasn't really a reason to use it. [1] https://pypi.org/project/dhash/ [2] http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html
* vf_vapourynth: remove Lua backendwm42019-09-191-25/+0
| | | | | | | | | | | | | | | I once created this because someone wanted to use vapoursynth without the Python dependency. No idea if anyone ever actually used it. It's sort of icky (it calls itself "lazy" to preempt complaints about how much it sucks), and complicates the build process. Kill it. It seems much more promising to have something like this: https://github.com/vapoursynth/vapoursynth/issues/386 This would either solve the build distribution problem by relaxing the Python dependency, and/or allow a Lua backend to be included without pain.
* DOCS: remove references to --video-stereo-modeNiklas Haas2019-09-141-3/+4
| | | | | | | This option was removed by a5610b2a but the documentation persisted. Also adds an OPT_REMOVED. Closes #6938.
* man: clarify vavpp requirementsNicolas F2019-05-051-2/+3
| | | | | | | | | | | | I assume (but cannot confirm) that VA-AP-API is in fact a typo, because most if not all search engine results related to it are from mpv's manual page. By changing this to VA-API and clarifying that this requires VA-API support on a system to use it, we can hopefully make it clear to unsuspecting Windows users that this is not the filter they're looking for. Concerns #6690.
* manpage: fix --vf exclamation mark descriptionpavelxdd2018-08-051-1/+1
| | | | | An exclamation mark disables the filter by default instead of enabling it.
* vf_vavpp: select best quality deinterlacing algorithm by defaultwm42018-02-131-1/+5
| | | | | | | | This switches the default away from "bob" to the best algorithm reported as supported by the driver. This is convenient for users, and there is no reason to use something worse by default. Untested.
* video: make --deinterlace and HW deinterlace filters always deinterlacewm42018-02-131-4/+4
| | | | | | | | | | | | | | | | Before this, we made deinterlacing dependent on the video codec metadata (AVFrame.interlaced_frame for libavcodec). So even if --deinterlace=yes was set, we skipped deinterlacing if the flag wasn't set. This is very unreliable and there are many streams with flags incorrectly set. The potential problem is that this might upset people who alwase enabled deinterlace and hoped it worked. But it's likely these people were screwed by this setting anyway. The new behavior is less tricky and easier to understand, and this preferable. Maybe one day we could introduce a --deinterlace=auto, which does the right thing, but of course this would be hard to implement (esecially with hwdec). Fixes #5219.
* manpage: clarify some --vf optionswm42018-01-311-15/+26
| | | | In particular, mention deprecated things.
* video: rewrite filtering glue codewm42018-01-301-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of the old vf.c code. Replace it with a generic filtering framework, which can potentially handle more than just --vf. At least reimplementing --af with this code is planned. This changes some --vf semantics (including runtime behavior and the "vf" command). The most important ones are listed in interface-changes. vf_convert.c is renamed to f_swscale.c. It is now an internal filter that can not be inserted by the user manually. f_lavfi.c is a refactor of player/lavfi.c. The latter will be removed once --lavfi-complex is reimplemented on top of f_lavfi.c. (which is conceptually easy, but a big mess due to the data flow changes). The existing filters are all changed heavily. The data flow of the new filter framework is different. Especially EOF handling changes - EOF is now a "frame" rather than a state, and must be passed through exactly once. Another major thing is that all filters must support dynamic format changes. The filter reconfig() function goes away. (This sounds complex, but since all filters need to handle EOF draining anyway, they can use the same code, and it removes the mess with reconfig() having to predict the output format, which completely breaks with libavfilter anyway.) In addition, there is no automatic format negotiation or conversion. libavfilter's primitive and insufficient API simply doesn't allow us to do this in a reasonable way. Instead, filters can use f_autoconvert as sub-filter, and tell it which formats they support. This filter will in turn add actual conversion filters, such as f_swscale, to perform necessary format changes. vf_vapoursynth.c uses the same basic principle of operation as before, but with worryingly different details in data flow. Still appears to work. The hardware deint filters (vf_vavpp.c, vf_d3d11vpp.c, vf_vdpaupp.c) are heavily changed. Fortunately, they all used refqueue.c, which is for sharing the data flow logic (especially for managing future/past surfaces and such). It turns out it can be used to factor out most of the data flow. Some of these filters accepted software input. Instead of having ad-hoc upload code in each filter, surface upload is now delegated to f_autoconvert, which can use f_hwupload to perform this. Exporting VO capabilities is still a big mess (mp_stream_info stuff). The D3D11 code drops the redundant image formats, and all code uses the hw_subfmt (sw_format in FFmpeg) instead. Although that too seems to be a big mess for now. f_async_queue is unused.
* manpage: update references to gpu VOdaschiller2018-01-101-5/+5
|
* vf_buffer: remove this filterwm42017-12-121-6/+0
| | | | | It has been deprecated for a while and is 100% useless. It was forgotten in the recent filter purge. Get rid of it.
* manpage: add some minor documenation fixesLeo Izen2017-12-041-2/+5
| | | | | | - replace the incorrect reference to --opengl-shader - document a caveat when using --image-display-duration - add some documentation on --vf=lavfi=
* vf: remove most GPL video filterswm42017-11-291-304/+0
| | | | | | | | | | | | | Almost all of them had their guts removed and replaced by libavfilter long ago, but remove them anyway. They're pointless and have been scheduled for deprecation. Still leave vf_format (because we need it in some form) and vf_sub (not sure). This will break some builtin functionality: lavfi yadif defaults are different, auto rotation and stereo3d downconversion are broken. These might be fixed later.
* vf_eq: remove this filterwm42017-08-221-26/+0
| | | | | | | | | Both the video equalizer command/option glue, which drives this filter, as well as the filter itself are slightly GPL contaminated. So it goes. After this commit, "--vf=eq" will actually use libavfilter's vf_eq (if FFmpeg was compiled in GPL mode), but it has different options and will not listen to the equalizer VOCTRLs.
* TOOLS/lua/autodeint: update to lavfi-bridgeRicardo Constantino2017-08-211-1/+0
| | | | | Also use lavfi setfield instead of removed field-dominance. Remove missing remainder of field-dominance in docs.
* video: add metadata handling for spherical videowm42017-08-211-0/+10
| | | | | | | | | | | | | | This adds handling of spherical video metadata: retrieving it from demux_lavf and demux_mkv, passing it through filters, and adjusting it with vf_format. This does not include support for rendering this type of video. We don't expect we need/want to support the other projection types like cube maps, so we don't include that for now. They can be added later as needed. Also raise the maximum sizes of stringified image params, since they can get really long.
* options: kill --field-dominancewm42017-07-211-1/+1
| | | | GPL-only author, no chance of relicensing.
* vo_opengl: implement sony s-log2 trcNiklas Haas2017-06-181-0/+1
| | | | | | | | Apparently this is virtually identical to Panasonic's V-Log, but using the constants from S-Log1 and an extra scaling coefficient to make the S-Log1 curve less limited. Whatever floats their NIH boat, I guess. Source: https://pro.sony.com/bbsccms/assets/files/micro/dmpc/training/S-Log2_Technical_PaperV1_0.pdf
* vo_opengl: implement sony s-log1 trcNiklas Haas2017-06-181-0/+1
| | | | | | | | Source: https://pro.sony.com/bbsccms/assets/files/mkt/cinema/solutions/slog_manual.pdf Not 100% confident in the implementation since the values from the spec seem to be very subtly off (~1%), but it should be close enough for practical purposes.
* vo_opengl: implement support for OOTFs and non-display referred contentNiklas Haas2017-06-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces (yet another..) mp_colorspace members, an enum `light` (for lack of a better name) which basically tells us whether we're dealing with scene-referred or display-referred light, but also a bit more metadata (in which way is the scene-referred light expected to be mapped to the display?). The addition of this parameter accomplishes two goals: 1. Allows us to actually support HLG more-or-less correctly[1] 2. Allows people playing back direct “camera” content (e.g. v-log or s-log2) to treat it as scene-referred instead of display-referred [1] Even better would be to use the display-referred OOTF instead of the idealized OOTF, but this would require either native HLG support in LittleCMS (unlikely) or more communication between lcms.c and video_shaders.c than I'm remotely comfortable with That being said, in principle we could switch our usage of the BT.1886 EOTF to the BT.709 OETF instead and treat BT.709 content as being scene-referred under application of the 709+1886 OOTF; which moves that particular conversion from the 3dlut to the shader code; but also allows a) users like UliZappe to turn it off and b) supporting the full HLG OOTF in the same framework. But I think I prefer things as they are right now.
* csputils: rename HDR curvesNiklas Haas2017-06-181-2/+2
| | | | | | | | | | st2084 and std-b67 are really weird names for PQ and HLG, which is what everybody else (including e.g. the ITU-R) calls them. Follow their example. I decided against naming them bt2020-pq and bt2020-hlg because it's not necessary in this case. The standard name is only used for the other colorspaces etc. because those literally have no other names.
* video: refactor HDR implementationNiklas Haas2017-06-181-7/+8
| | | | | | | | | | | | | | | List of changes: 1. Kill nom_peak, since it's a pointless non-field that stores nothing of value and is _always_ derived from ref_white anyway. 2. Kill ref_white/--target-brightness, because the only case it really existed for (PQ) actually doesn't need to be this general: According to ITU-R BT.2100, PQ *always* assumes a reference monitor with a white point of 100 cd/m². 3. Improve documentation and comments surrounding this stuff. 4. Clean up some of the code in general. Move stuff where it belongs.
*