summaryrefslogtreecommitdiffstats
path: root/options/options.c
Commit message (Collapse)AuthorAgeFilesLines
* options: handle choice -> flag fallback automaticallywm42015-02-271-13/+13
| | | | | | | | | | | | | | | In the past it happened quite often that flag options (yes/no) were changed to choice options (yes/no/some more). The problem with this was that while flag options don't need a parameter, this wasn't the case with choice options. A hack was introduced to compensate for this: setting M_OPT_OPTIONAL_PARAM on the option, and an empty string ("") was added as choice, so that the choice could be used like a flag. So, for example, "--mute" would set the choice "". Fix this by 1. not requiring a parameter if there's a "yes" choice, and 2. redirect an empty parameter to "yes". The effect is that a choice option with the choices ["yes", "no"] is pretty much equivalent to a flag option.
* demux: bump default demuxer queue sizeswm42015-02-271-2/+2
| | | | | | | | | | Now that we have fast stream switching, we can bump these sizes, as the queues cause no delay in switching anymore. Of course, the fast stream switching works for mkv and mp4 only. Other formats will incur a quite terrible delay especially in network mode, which this commit changes to 10 seconds. Let's see if someone complains...
* ytdl: add "--ytdl-params" optionThiago Kenji Okada2015-02-251-0/+2
| | | | | | | | | | | This option allows the user to pass non-supported options directly to youtube-dl, such as "--proxy URL", "--username USERNAME" and '--password PASSWORD". There is no sanity checking so it's possible to break things (i.e. if you pass "--version" mpv exits with random JSON error). Signed-off-by: wm4 <wm4@nowhere>
* sub: mess with styling defaults, change --ass-use-margins behaviorwm42015-02-161-3/+8
| | | | | | | | | | | | | | | | | | | Now --ass-use-margins doesn't apply to normal subtitles anymore. This is probably the inverse from the mpv behavior users expected so far, and thus a breaking change, so rename the option, that the user at least has a chance to lookup the option and decide whether the new behavior is wanted or not. The basic idea here is: - plain text subtitles should have a certain useful defalt behavior, like actually using margins - ASS subtitles should never be broken by default - ASS subtitles should look and behave like plaintext subtitles if the --ass-style-override=force option is used This also subtly changes --sub-scale-with-window and adds the --ass- scale-with-window option. Since this one isn't so important, don't bother with compatibility.
* options: mark some more options as runtime-settablewm42015-02-161-4/+4
| | | | | Most of these are in the category of options which can be changed without issues, but which will not take effect immediately.
* osd: make it possible to have different subtitle vs. OSD defaultswm42015-02-161-1/+1
| | | | | | | | Until now, they used exactly the same defaults for the styling options. The defaults were shared, so it was impossible to have different defaults. Change this. This requires duplicating the full default struct, even for settings that are the same. The list of options is still shared, though.
* player: add a --loop=force modewm42015-02-121-4/+5
| | | | | | | Requested. See manpage additions. This also makes the magical loop_times constants slightly saner, but shouldn't change the semantics of any existing --loop option values.
* options: add --network-timeoutwm42015-02-061-0/+2
| | | | | | Not quite sure if this actually works as intended. Fixes #1566.
* options: change --msg-level optionwm42015-02-061-1/+1
| | | | | | | | | | | | | | Make it accept "," as separator, instead of only ":". Do this by using the key-value-list parser. Before this, the option was stored as a string, with the option parser verifying that the option value as correct. Now it's stored pre-parsed, although the log levels still require separate verification and parsing-on-use to some degree (which is why the msg-level option type doesn't go away). Because the internal type changes, the client API "native" type also changes. This could be prevented with some more effort, but I don't think it's worth it - if MPV_FORMAT_STRING is used, it still works the same, just with a different separator on read accesses.
* player: do not autoload audio with audio files, enable autoloadingwm42015-02-051-1/+1
| | | | | | | | | | | | | | Autoload external audio files only if there's at least a video track (which is not coverart pseudo-video). Enable external audio file autoloading by default. Now that we actively avoid doing stupid things like loading an external audio file for an audio-only file, this should be fine. Additionally, don't autoload subtitles if a subtitle is played. Although you currently can't play subtitles without audio or video, it's disturbing and stupid that the player might load subtitle files with different extension and then fail.
* player: remove --fixed-vowm42015-02-031-3/+1
| | | | | | | In ancient times, this was needed because it was not default, and many VOs had problems with it. But it was always default in mpv, and all VOs are required to deal with it. Also, running --fixed-vo=no is not useful and just creates weird corner cases. Get rid of it.
* options: allow more options to be changed at runtimewm42015-02-031-9/+9
| | | | | | | | | This allows setting these options directly (without going through properties, or with going through the "options/" property). The documented restrictions apply to all of these: changes do not get immediately applied, unlike with corresponding properties. This is in reaction to #1548.
* player: add external audio file auto-loadingwm42015-02-021-0/+3
| | | | | | Apparently some people want this. Not enabled by default. Fixes #967.
* options: list correct default value for --screenshot-templatewm42015-01-261-0/+1
| | | | | | Make the default value part of the option metadata, instead of doing this in the screenshot code. Makes more sense with --list-options and the command.c option metadata properties.
* msg: add --log-file optionwm42015-01-261-0/+1
| | | | | | | | | This allows getting the log at all with --no-terminal and without having to retrieve log messages manually with the client API. The log level is hardcoded to -v. A higher log level would lead to too much log output (huge file sizes and latency issues due to waiting on the disk), and isn't too useful in general anyway. For debugging, the terminal can be used instead.
* options: make --hls-bitrate=max the defaultwm42015-01-261-0/+1
| | | | | | | The previous default ("no") seemed to be equivalent to "min" in practice (though it might depend on the website, which is even worse). Better just select the best stream by default.
* win32: remove check for SetPriorityClass()wm42015-01-201-2/+2
| | | | | | | | | | This function is always available, which is reflected by the fact that the configure check doesn't actually bother to check for its existence. Instead, MinGW and Cygwin imply it. The check was probably "needed" when the priority code was still in a separate source file. Remove the check, and use _WIN32 for testing for the win32 API (in a bunch of other places too).
* x11: add --on-all-workspaces option and propertywm42015-01-161-0/+1
| | | | Fixes #1469.
* player: add --autofit-smaller optionwm42015-01-161-0/+1
| | | | | | | | Fixes #1472. (Maybe these options should have been named --autofit-max and --autofit-min, but since --autofit-larger already exists, use --autofit-smaller for symmetry.)
* sub: add option to not scale subtitles with windowwm42015-01-051-0/+2
| | | | | | | | | | | | | --sub-scale-by-window=no attempts to keep subs always at the same pixel size. The implementation is a bit all over the place, because it compensates already done scaling by an inverse scale factor, but it will probably do its job. Fixes #1424. (The semantics and name of --sub-scale-with-window are kept, and this adds a new option - the name is confusingly similar, but it's actually analogue to --osd-scale-by-window.)
* player: capitalize --display-tags itemswm42014-12-311-2/+2
| | | | | | | | Tags keys are case-insensitive. Before commit 8048374a, the casing of whatever FFmpeg returned was used (it was quite random). But since the change, the values in --display-tags decides. Consider this an accidental feature, and make the output nicer by capitalizing the tag names.
* player: filter tags, add --display-tags optionwm42014-12-291-0/+8
| | | | | | | | This attempts to increase user-friendliness by excluding useless tags. It should be especially helpful with mp4 files, because the FFmpeg mp4 demuxer adds tons of completely useless information to the metadata. Fixes #1403.
* audio: make native channel count the default instead of stereo downmixwm42014-12-151-1/+1
| | | | | | | | | | | | | | This should work well with most audio APIs, except ALSA. A long-winded explanation is provided how to make ALSA multichannel output work. All other AOs should have no such problems. Of course it's possible that previously unknown issues arise, because I assume that enabling multichannel audio is actually relatively rare. This also disables codec downmix by default, which could change the audio output due to different mixing in the codec and libavresample. Fixes #1313.
* options: deprecate 'lua' based options/dirs for 'script'Avi Halachmi (:avih)2014-12-151-2/+4
| | | | | | | | | | | | - --lua and --lua-opts change to --script and --script-opts - 'lua' default script dirs change to 'scripts' - DOCS updated - 'lua-settings' dir was _not_ modified The old lua-based names/dirs still work, but display a warning. Signed-off-by: wm4 <wm4@nowhere>
* options: add option for ignoring patch in resume mechanismwm42014-12-131-0/+1
| | | | | | Whatever. Fixes #1281.
* player: add a --keep-open=always modewm42014-12-121-1/+4
| | | | | | | | The --keep-open behavior was recently changed to act only on the last file due to user requests (see commit 735a9c39). But the old behavior was useful too, so bring it back as an additional mode. Fixes #1332 (or rather, should help with it).
* options: make --no-... options work for OPT_REPLACED toowm42014-12-111-2/+3
| | | | | | | | Do this by automatically adding the option, if the aliased option name also has a "no-..." variant. Could be easier by manually adding "no-..." variants to the option list, but this seems better because you can't just forget it.
* options: add slightly more sophistcated mechanism for option deprecationwm42014-12-111-0/+73
|
* player: set a specific window title in idle modewm42014-12-101-1/+1
| | | | Instead of "(unavailable)".
* options: enable --ytdl by defaultwm42014-12-091-1/+1
| | | | Let's see who complains...
* options: --wid can be set at any timewm42014-12-091-1/+1
| | | | | | | | | | | | | After being bitten by this, I decided that this mostly unnecessary requirement sucks. Allowing this makes it easier to use libmpv, because it can be set after mpv_initialize(). The latest reasonable time an API user can set this variable is before actually loading a file. The previous 2 commits make sure nothing bad can happen if the option is changed at runtime even if a VO is active. The Cocoa backend should be fine and doesn't need a change.
* options: add a 'once' idle modeStefano Pigozzi2014-12-071-1/+6
| | | | | This allows to make mpv wait for file open events at start but close after it is done playing the first playlist.
* cocoa: allow to black out other display when going fsStefano Pigozzi2014-12-011-0/+1
| | | fixes #1302
* player: add option not to use OSD/fontconfigwm42014-11-251-0/+2
| | | | | | | Makeshift-solution for working around certain fontconfig issues. With --use-text-osd=no, libass and fontconfig won't be initialized, and fontconfig won't block everything with scanning for fonts.
* options: add --ytdl-format option for youtube-dl formatJaime Marquínez Ferrándiz2014-11-201-0/+2
| | | | | | | | | It's passed with the '--format' option to youtube-dl. If it isn't set, we don't pass '--format best' so that youtube-dl can use the options from its configuration file. Signed-off-by: wm4 <wm4@nowhere>
* player: integrate ytdl_hook.luawm42014-11-191-0/+2
|
* demux_mkv: add an option for compatibility with Haaliwm42014-11-181-0/+1
| | | | This was requested on IRC.
* command: initialize a-b loop options correctlywm42014-11-181-0/+1
| | | | | It was initialized as 0/0, which basically cleared the chapter marks by default.
* command: implement A-B loopswm42014-11-181-0/+3
| | | | | | | | | | | | | Probably needs to be polished a bit more. Also, might require a key binding that can set/clear the loop points in a more intuitive way. For now, something like this can be put into input.conf to use it: ctrl+y set ab-loop-a ${time-pos} # set A ctrl+x set ab-loop-b ${time-pos} # set B ctrl+c set ab-loop-a no # clear (mostly) Fixes #1241.
* demux_mkv: adjust subtitle preroll again (2)wm42014-11-151-0/+3
| | | | | | | | | | | | | | Make the changes started in commit c827ae5f more eloborate, and provide an option to control the amount of data read before the seek-target. To achieve this, rewrite the loop that finds the lowest still acceptable target cluster. It is now searched by time instead of file position. The behavior (both with and without preroll option) may be different from before this change, although it shouldn't be worse. The change demux_mkv_read_cues() fixes a bug: when seeking after playing normally, the code would erroneously assume that durations are set. This doesn't happen if the first operation after loading was a seek instead of playback.
* audio: add --audio-client-name optionwm42014-11-071-0/+2
| | | | | | The main need I see for this is with libmpv - it would be confusing if some application showed up as "mpv" on whateverthehell PulseAudio uses it for (generally it does show up on various PA GUI tools).
* player: add --chapters-file optionwm42014-11-021-0/+2
| | | | | | | | Note that you can't pass .cue or .edl files to it, at least not yet. Requested in context of allowing to specify custom chapters. For that to work well, we probably need to add some sort of chapter metadata pseudo-demuxer.
* player: add an option to abort playback on partial init failureswm42014-10-281-0/+2
| | | | | | This is probably what libmpv users want; and it also improves error reporting (or we'd have to add a way to communicate such mid-playback failures as events).
* Drop libquvi supportwm42014-10-251-4/+0
| | | | | | | | | | | No development activity (or even any sign of life) for almost a year. A replacement based on youtube-dl will probably be provided before the next mpv release. Ask on the IRC channel if you want to test. Simplify the Lua check too: libquvi linking against a different Lua version than mpv was a frequent issue, but with libquvi gone, no direct dependency uses Lua, and such a clash is rather unlikely.
* video: initial dxva2 supportwm42014-10-251-1/+2
| | | | | Shamelessly stolen from ffmpeg. It probably doesn't work - you can debug it yourself.
* player: add stream selection by ffmpeg indexwm42014-10-211-0/+6
| | | | | | | | | Apparently using the stream index is the best way to refer to the same streams across multiple FFmpeg-using programs, even if the stream index itself is rarely meaningful in any way. For Matroska, there are some possible problems, depending how FFmpeg actually adds streams. Normally they seem to match though.
* input: implement --input-file on unix using the IPC supportAlessandro Ghedini2014-10-171-0/+1
|
* input: implement JSON-based IPC protocolAlessandro Ghedini2014-10-171-0/+2
|
* sub: adjustments to --ass-style-override optionwm42014-10-171-1/+1
| | | | | | | | | | Now requires newest libass git. Since this feature wasn't part of a libass release yet, I'm not bothering making the mpv code compatible with as how it was previously implemented (it will just be disabled with any older libass). CC: @mpv-player/stable (because mpv-build uses libass git, and this breaks the feature)
* audio: add device selection & listing with --audio-devicewm42014-10-091-0/+2
| | | | | | | Not sure how good of an idea this is. This commit doesn't add support for this to any AO yet; the AO implementations will follow later.
* cocoa: remove --fs-missioncontrolStefano Pigozzi2014-10-051-4/+0
| | | | | | | This is the first of a series of commits that will change the Cocoa way in a way that is easily embeddable inside parent views. To reach that point common code must avoid referencing the parent NSWindow since that could be the host application's window.
* options: add --no-keepaspect-windowwm42014-10-041-0/+2
| | | | Seems silly, but was requested.
* x11: stupid workaround for XMonadwm42014-10-041-2/+2
| | | | | | | | --x11-netwm=yes now forces NetWM fullscreen, while --x11-netwm=auto (detect whether NetWM fullsctreen support is available) is the old behavior and still the default. See #888.
* audio: enable pitch correction by default when playing fastwm42014-10-021-0/+3
| | | | | | | Apparently this is what users want. When playing with normal speed, nothing is done. When playing slower than normal, resampling is used instead, because scaletempo (which does the pitch correction) adds too many artifacts.
* audio: remove --audiodropwm42014-09-301-2/+0
| | | | | | | | | | | | | | | This would play some silence in case video was slower than audio. If framedropping is already enabled, there's no other way to keep A/V sync, short of changing audio playback speed (which would give worse results). The --audiodrop option inserted silence if there was more than 500ms desync. This worked somewhat, but I think it was a silly idea after all. Whether the playback experience is really bad or slightly worse doesn't really matter. There also was a subtle bug with PTS handling, that apparently caused A/V desync anyway at ridiculous playback speeds. Just remove this feature; nobody is going to use it anyway.
* player: allow passing number of loops to --loop-filewm42014-09-221-1/+3
| | | | | | | | | | E.g. --loop-file=2 will play the file 3 times (one time normally, and 2 repeats). Minor syntax issue: "--loop-file 5" won't work, you have to use "--loop-file=5". This is because "--loop-file" still has to work for compatibility, so the "old" syntax with a space between option name and value can't work.
* options: remove --volstepwm42014-09-211-2/+0
| | | | | | | It's just confusing; users are encouraged to edit input.conf instead (changing the argument to the "add" command). Update input.conf to keep the old behavior.
* player: allow overriding OSD message for all OSD levelswm42014-09-181-0/+3
| | | | | | | | | | | | | | | | | | Until now, you could override only level 3 with --osd-status-msg. Extend this, add add --osd-msg1 to --osd-msg3 (one for each OSD level). OSD level 0 always means disable OSD, so that isn't included. --osd-msg3 corresponds to --osd-status-msg, but they're not exactly the same. To allow more customization, --osd-msgN do not include the OSD symbol. The symbol can be manually added with "${osd-sym-cc}". We keep the "old" option for some short-term compatibility. --osd-msg1 should be particularly useful; for example you could do: --osd-msg1='${?pause==yes:${osd-sym-cc}}' to display a "paused" symbol when paused, and nothing during normal playback. (Although admittedly, the syntax is quite a bit of work.)
* options: change --volstep to 2wm42014-09-161-1/+1
| | | | | | | | | | With default settings, this allows you to hit the 100% mark (with default --softvol-max in the middle) even if you've reached min or max volume before. This is because 50 is not divisible by 3 (old default) but by 2 (new default). Not really sure why there still can be issues with higher --softvol-max and --volstep=1, but this is where I stop carin