summaryrefslogtreecommitdiffstats
path: root/DOCS
Commit message (Collapse)AuthorAgeFilesLines
* sws_utils: hack in zimg redirection supportwm42019-10-201-0/+15
| | | | | | | | | | | | | | | | Awful shit. I probably wouldn't accept this code from someone else, just so you know. The idea is that a sws_utils user can automatically use zimg without large code changes. Basically, laziness. Since zimg support is still very new, and I don't want that anything breaks just because zimg was enabled at build time, an option needs to be set to enable it. (I have especially especially obscure stuff in mind, which is all what libswscale is used in mpv.) This _still_ doesn't cause zimg to be used anywhere, because the sws_utils user has to opt-in by setting allow_zimg. This is because some users depend on certain libswscale features.
* video: add zimg wrapperwm42019-10-201-0/+8
| | | | | | | | | | | | | | | | This provides a very similar API to sws_utils.h, which can be used to convert and scale from one mp_image to another. This commit adds only the code, but does not use it anywhere. The code is quite preliminary and barely tested. It supports only a few pixel formats, and will return failure for many others. (Unlike libswscale, which tries to support anything that FFmpeg knows.) zimg itself accepts only planar formats. Supporting other formats requires manual packing/unpacking. (Compared to libswscale, the zimg API is generally lower level, but allows for more flexibility.) Only BGR0 output was actually tested. It appears to work.
* manpage: docoument stream-open-filename propertywm42019-10-201-0/+9
|
* manpage: fix a typowm42019-10-181-1/+1
|
* 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: do not disable display-sync on A/V desyncwm42019-10-171-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | On a audio/video desync by more than 0.5 seconds, display-sync mode was disabled, and not enabled again (until playback restart, e.g. a seek). The idea was that it this only happens when this playback mode is broken and can't perform well anyway (A/V desync is a clear indication that something is very wrong). Instead of behaving like a god damn POS, it should revert to the more robust audio-sync mode. Unfortunately, this could happen sporadically due to temporary system performance problems, such as toggling fullscreen. Users didn't like this, and asked for a function to disable it, or to recover in some other way. This mechanism is questionable anyway. If an ignorant user enables display-sync, and encounters problems with it (without being able to determine that display-sync is messing up), the player will still behave like a POS on every playback, and even after every seek. It might actually be helpful to fail more consistently. Also, I've found that it's sill relatively reliable anyway even without this mechanism. So just remove the fallback. Fixes: #7048
* Reintroduce vo_wayland as vo_wlshmMichael Forney2019-10-171-0/+6
| | | | | | | | vo_wayland was removed during the wayland rewrite done in 0.28. However, it is still useful for systems that do not have OpenGL. The new wayland_common code makes vo_wayland much simpler, and eliminates many of the issues the previous vo_wayland had.
* manpage: update --hwdec descriptionwm42019-10-171-17/+8
| | | | | vdpaurb, vaapi-glx, and ANGLE's NV12-restriction are gone, making things much simpler.
* vo_gpu/d3d11: switch adapter selection to case-insensitive startswithJan Ekström2019-10-151-0/+4
| | | | | | This lets users set values such as "intel" or "nvidia" as the adapter vendor is generally noted in the beginning of the description string.
* manpage: attempt to remove some more cache option confusionwm42019-10-141-6/+7
| | | | | | OK, so --cache-secs is useless, because the default is set to 10 hours. And that part about the "maximum" was obviously a lie (I wonder if it simply changed at some point).
* vo_gpu/d3d11: add support for configuring swap chain formatJan Ekström2019-10-132-0/+14
| | | | | | | Query information on the system output most linked to the swap chain, and either utilize a user-configured format, or either 8bit RGBA or 10bit RGB with 2bit alpha depending on the system output's bit depth.
* DOCS: explicitly mention that property observing has an initial eventwm42019-10-081-1/+5
| | | | | This is definitely intended from the start, and it's generally useful, but for some reason it wasn't actually documented.
* DOCS: some corrections around cache optionswm42019-10-082-3/+10
|
* demux_edl: better selection of part which defines the track layoutwm42019-10-061-0/+30
| | | | | | | | | | | | | | | Someone crazy is trying to mix images with videos in EDL files. Putting an image as first thing into the EDL disabled audio, because the first EDL entry was used to define the layout. Change this. Make it user-configurable, and use a "better" heuristic to select the default otherwise. In theory, EDL could be easily extended to specify track layout and mapping of parts to virtual EDL tracks manually and in great detail. But I don't think it's worth it - who would bother using it? Fixes: #6764
* audio: do not try gapless if video is still ongoingwm42019-10-061-0/+2
| | | | | | | | | | In this case, gapless will most likely not work. It will result in (very slight) desync, or (more commonly with small buffer sizes), in an underflow. I think it would be legitimate to disable gapless at end of playback completely if video is enabled at all. But this would need an exception for cover art mode, so I guess the current solution is OK as well.
* DOCS/compatibility.rst: add this filewm42019-10-053-1/+183
| | | | | | | | | | | Another thing nobody will read. I'm attempting to document the rules by which incompatible changes can be made. These rules have always been present in this project, but I don't think they were written down. Or maybe they were, but I forgot where. I think due to the time of the day it became increasingly incoherent (not necessarily near the end of the text). Hopefully no logical or freudian lapses in there.
* DOCS/interface-changes.rst: simplify playback abort change descriptionwm42019-10-051-11/+2
| | | | | | | | | | | Although it was not true at the time this was written, both the "program" and "cache-size" are gone now. Since the changelog is for the entire next release, it makes no sense to mention these removed properties. It also happens to make the description of this much simpler, because it's a non-issue now. It's probably not even worth mentioning anymore.
* options: rename --video-aspect to --video-aspect-overrideNiklas Haas2019-10-043-17/+14
| | | | | | | | | | | | The justification for this is the fact that the `video-aspect` property doesn't work well with `cycle_values` commands that include the value "-1". The "video-aspect" property has effectively no change in behavior, but we may want to make it read-only in the future. I think it's probably fine to leave as-is, though. Fixes #6068.
* manpage: clarify some details about async. commands and "subprocess"wm42019-10-042-4/+36
| | | | | | | | | There's potential confusion about how long a process started with the "subprocess" command is allowed to live. Add some more explanations regarding "subprocess" specifics (such as the playback_only field), and things that apply to asynchronous commands in general. Partially for #7025.
* DOCS/tech-overview.txt: caching has changedwm42019-10-021-3/+4
|
* DOCS: Document DVB changes in interface-changes.Oliver Freyermuth2019-10-021-0/+9
|
* DOCS: Add documentation for dvbin-prog and dvbin-channel-switch-offset.Oliver Freyermuth2019-10-021-0/+16
|
* DOCS/contribute.md: split into sections, random changeswm42019-10-011-17/+61
| | | | | | | | Still trying to get people to read it. Even though I wanted to make it less of a wall of text and more readable, it got bigger. Oops. While I'm at it, violate my own rules and mix these mostly cosmetic changes with some actual rule changes and clarifications.
* vo_gpu/d3d11: add adapter name validation and listing with "help"Jan Ekström2019-09-291-3/+2
| | | | Not the prettiest way to get it done, but seems to work.
* video/d3d11: add adapter selection by name into d3d11 optionsJan Ekström2019-09-292-0/+12
| | | | | This lets the user define an adapter name that can then be passed further into the internals.
* vo: make swapchain-depth option generic for all VOsAnton Kindestam2019-09-281-8/+7
| | | | In preparation for making vo_drm able to use swapchain-depth
* stream_cb: add cancel_fn callbackAman Gupta2019-09-271-0/+1
| | | | | | | | This allows stream_cb backends to implement blocking behavior inside read_fn, and still get notified when the user wants to cancel and stop playback. Signed-off-by: Aman Gupta <aman@tmm1.net>
* video: add pure gamma TRC curves for 2.0, 2.4 and 2.6.Wessel Dankers2019-09-272-0/+9
|
* DOCS: don't lie about the keybind commanddudemanguy2019-09-261-2/+1
| | | | | It turns out you can actually bind keybind to another keybind. Just be careful with all the quotes.
* DOCS/contribute.md: talk about non-standard and C11 language featureswm42019-09-261-3/+4
| | | | | | | | | | | The C11 situation is complicated. For example, MinGW doesn't seem to have a full C11 implementation, but we pretty much rely on C11 atomics. Regarding "#pragma once": they say it's not standard because of unsolved (admittedly valid) issues. Btu still, fuck writing include guards, I just can't be bothered with this crap. (Does anyone even read this document?)
* client API: be explicit about usage rules and deadlocks some morewm42019-09-261-0/+2
| | | | | | | I think a popular libmpv application did exactly this: enabling advanced control, and then receiving deadlocks. I didn't confirm it, though. In any case, the API docs should avoid tricking users into making this easy mistake.
* client API: fix potential deadlock problems by throwing more shit at itwm42019-09-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The render API (vo_libmpv) had potential deadlock problems with MPV_RENDER_PARAM_ADVANCED_CONTROL. This required vd-lavc-dr to be enabled (the default). I never observed these deadlocks in the wild (doesn't mean they didn't happen), although I could specifically provoke them with some code changes. The problem was mostly about DR (direct rendering, letting the video decoder write to OpenGL buffer memory). Allocating/freeing a DR image needs to be done on the OpenGL thread, even though _lots_ of threads are involved with handling images. Freeing a DR image is a special case that can happen any time. dr_helper.c does most of the evil magic of achieving this. Unfortunately, there was a (sort of) circular lock dependency: freeing an image while certain internal locks are held would trigger the user's context update callback, which in turn would call mpv_render_context_update(), which processed all pending free requests, and then acquire an internal lock - which the caller might not release until a further DR image could be freed. "Solve" this by making freeing DR images asynchronous. This is slightly risky, but actually not much. The DR images will be free'd eventually. The biggest disadvantage is probably that debugging might get trickier. Any solution to this problem will probably add images to free to some sort of queue, and then process it later. I considered making this more explicit (so there'd be a point where the caller forcibly waits for all queued items to be free'd), but discarded these ideas as this probably would only increase complexity. Another consequence is that freeing DR images on the GL thread is not synchronous anymore. Instead, it mpv_render_context_update() will do it with a delay. This seems roundabout, but doesn't actually change anything, and avoids additional code. This also fixes that the render API required the render API user to remain on the same thread, even though this wasn't documented. As such, it was a bug. OpenGL essentially forces you to do all GL usage on a single thread, but in theory the API user could for example move the GL context to another thread. The API bump is because I think you can't make enough noise about this. Since we don't backport fixes to old versions, I'm specifically stating that old versions are broken, and I'm supplying workarounds. Internally, dr_helper_create() does not use pthread_self() anymore, thus the vo.c change. I think it's better to make binding to the current thread as explicit as possible. Of course it's not sure that this fixes all deadlocks (probably not).
* cocoa-cb: add support for 10bit opengl renderingder richter2019-09-261-0/+7
| | | | | | | this will request a 16bit half-float framebuffer instead if a 8bit integer framebuffer. Fixes #3613
* sub: make font provider user-selectablewm42019-09-251-2/+20
| | | | | | | | | | | | | | | | | | | | libass had an API to configure this since 2013. mpv always used ASS_FONTPROVIDER_AUTODETECT, because usually there's little reason to use anything else. The intention of the now added option is to allow users to disable use of system fonts. I didn't consider it worth the trouble to add the coretext and directwrite enum items from ASS_DefaultFontProvider. The "auto" choice will have the same effect if they're available. Also, the part of the code which defines the option does not necessarily have libass available (it's still optional!), so defining all enum items as choices is icky. I still added fontconfig, since that may be nice to emulate a nostalgic 2010 feeling of mpv freezing on fontconfig. The option for OSD is even less useful. (But you get it for free, and why pass up a chance to add yet another useless option?) This is not quite what was requested in #6947, but as close as it gets.
* vo_drm: 30bpp supportAnton Kindestam2019-09-221-5/+4
|
* manpage: update requirements for vdpau hwdec useNicolas F2019-09-221-1/+2
| | | | | | | | | | We default to EGL instead of GLX now, which means vdpau only works if we explicitly specify that we want a GLX context, as vdpau lacks interop for EGL. Update the hwdec documentation to reflect this. Concerns #6980.
* command: add expand-path to expand mpv pathsNicolas F2019-09-221-0/+12
| | | | | | | The question came up on how a client would figure out where screenshot-directory saved its screenshots if it contained mpv-specific expansions. This command should remedy the situation by providing a way for the client to ask mpv to do an expansion.
* command: add sub-start & sub-end propertiesStefano Pigozzi2019-09-221-0/+11
| | | | | These properties contain the current subtitle's start and end times. Can be useful to cut sample audio through the scripting interface.
* input: add keybind commandDudemanguy9112019-09-211-0/+7
|
* player: expose pixel aspect ratio, bitrate and rotation value on trackswnoun2019-09-212-0/+14
|
* DOCS/contribute.md: expand on recommended C99 usagewm42019-09-211-1/+1
|
* osd: allow sub-text to work even if sub-visibility is disableddudemanguy2019-09-211-3/+3
|
* demux_cue: auto-detect CUE sheet charsetwnoun2019-09-212-0/+4
|
* command: add video-add/video-remove/video-reload commandsPaul B Mahol2019-09-211-0/+9
|
* DOCS/contribute.md: license clarificationswm42019-09-211-0/+4
| | | | | | | | | Basically, both the license of the file and the preferred license of the project (LGPLv2.1+) counts. I'm doing that so that files with more liberal licenses don't get infected by LGPL, but allow copy & pasting to LGPL source files without jumping through lawyer bullshit hoops. Mention this in Copyright too.
* ao_pulse: add --pulse-allow-suspendedTérence Clastres2019-09-211-0/+4
| | | | | | | | | | This flag makes mpv continue using the PulseAudio driver even if the sink is suspended. This can be useful if JACK is running with PulseAudio in bridge mode and the sink-input assigned to mpv is the one JACK controls, thus being suspended. By forcing mpv to still use PulseAudio in this case, the user can now adjust the sink to an unsuspended one.
* player: update status line cache displaywm42019-09-201-5/+3
| | | | | | | | | | | Replace the "+" with "/". The "+" was supposed to imply that the cache is the sum of the time (demuxer cache) and the size in bytes (stream cache). We could not provide something nicer, because we had no idea how many seconds of media was buffered in the stream cache. Now the stream cache is done, and both the duration and byte size show the amount buffered in the demuxer cache. Hopefully "/" is better to imply this properly. Update the manpage explanations too.
* manpage: input.rst: fix a typowm42019-09-191-1/+1
|
* 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
* options: deprecate --stream-recordwm42019-09-193-20/+36
| | | | It's inadequate for most uses. There are better mechanisms.
* command, demux: add AB-loop keyframe cache align commandwm42019-09-191-0/+9
| | | | | | | | | | | | | | | Helper for the ab-loop-dump-cache command, see manpage additions. This is kind of shit. Not only is this a very "special" feature, but it also vomits more messy code into the big and already bloated demux.c, and the implementation is sort of duplicated with the dump-cache code. (Except it's different.) In addition, the results sort of depend what a video player would do with the dump-cache output, or what the user wants (for example, a user might be more interested in the range of output audio, instead of the video). But hey, I don't actually need to justify it. I'm only justifying it for fun.
* manpage: mention that there's a Lua API for async commandswm42019-09-191-0/+2
| | | | | | But don't tell the reader which those APIs are. Hope the user will just search for "async" in the Lua section (lua.rst). But of course, nobody will ever care about anything related to this.
* demux, command: add a third stream recording mechanismwm42019-09-192-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That's right, and it's probably not the end of it. I'll just claim that I have no idea how to create a proper user interface for this, so I'm creating multiple partially-orthogonal, of which some may work better in each of its special use cases. Until now, there was --record-file. You get relatively good control about what is muxed, and it can use the cache. But it sucks that it's bound to playback. If you pause while it's set, muxing stops. If you seek while it's set, the output will be sort-of trashed, and that's by design. Then --stream-record was added. This is a bit better (especially for live streams), but you can't really control well when muxing stops or ends. In particular, it can't use the cache (it just dumps whatever the underlying demuxer returns). Today, the idea is that the user should just be able to select a time range to dump to a file, and it should not affected by the user seeking around in the cache. In addition, the stream may still be running, so there's some need to continue dumping, even if it's redundant to --stream-record. One notable thing is that it uses the async command shit. Not sure whether this is a good idea. Maybe not, but whatever. Also, a user can always use the "async" prefix to pretend it doesn't. Much of this was barely tested (especially the reinterleaving crap), let's just hope it mostly works. I'm sure you can tolerate the one or other crash?
* demux: allow backward cache to use unused forward cachewm42019-09-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the following could happen: if you set a 1GB forward cache, and a 1GB backward cache, and you opened a 2GB file, it would prune away the data cached at the start as playback progressed past the 50% mark. With this commit, nothing gets pruned, because the total memory usage will still be 2GB, which equals the total allowed memory usage of 1GB + 1GB. There are no explicit buffers (every packet is malloc'ed and put into a linked list), so it all comes down to buffer size computations. Both reader and prune code use these sizes to decide whether a new packet should be read / an old packet discarded. So just add the remaining free "space" from the forward buffer to the available backward buffer. Still respect if the back buffer is set to 0 (e.g. unseekable cache where it doesn't make sense to keep old packets). We need to make sure that the forward buffer can always append, as long as the forward buffer doesn't exceed the set size, even if the back buffer "borrows" free space from it. For this reason, always keep 1 byte free, which is enough to allow it to read a new packet. Also, it's now necessary to call pruning when adding a packet, to get back "borrowed" space that may need to be free'd up after a packet has been added. I refrained from doing the same for forward caching (making forward cache use unused backward cache). This would work, but has a disadvantage. Assume playback starts paused. Demuxing will stop once the total allowed low total cache size is reached. When unpausing, the forward buffer will slowly move to the back buffer. That alone will not change the total buffer size, so demuxing remains stopped. Playback would need to pass over data of the size of the back buffer until demuxing resume; consider this unacceptable. Live playback would break (or rather, would not resume in unintuitive ways), even normal streaming may break if the server invalidates the URL due to inactivity. As an alternative implementation, you could prune the back buffer immediately, so the forward buffer can grow, but then the back buffer would never grow. Also makes no sense. As far as the user interface is concerned, the idea is that the limits on their own aren't really meaningful, the purpose is merely to vaguely restrict the cache memory usage. There could be just a single option to set the total allowed memory usage, but the separate backward cache controls the default ratio of backward/forward cache sizes. From that perspective, it doesn't matter if the backward cache uses more of the total buffer than assigned, if the forward buffer is complete.