Commit Graph

74 Commits

Author SHA1 Message Date
wm4 b7bedbbc36 options: remove some more stuff
The "classic" sub-option stuff is not really needed anymore. The only
remaining use can be emulated in a simpler way. But note that this
breaks the --screenshot option (instead of the "flat" options like
--screenshot-...). This was undocumented and discouraged, so it
shouldn't affect anyone.
2014-06-13 02:18:26 +02:00
wm4 a64e099efc options: remove some unneeded stuff
No options pointing to global variables are in use anymore, so that part
can be removed.
2014-06-13 02:16:47 +02:00
wm4 09a61ba03a options: remove use of an inverted option value
Now MPOpts.sub_fix_timing corresponds to the commandline switch
directly, instead of storing the inverted value.
2014-06-13 02:06:03 +02:00
wm4 98a31d5937 options: turn --idx, --forceidx into --index
Also clarify the semantics.

It seems --idx didn't do anything. Possibly it used to change how the
now removed legacy demuxers like demux_avi used to behave. Or maybe
it was accidental.

--forceidx basically becomes --index=force. It's possible that new
index modes will be added in the future, so I'm keeping it
extensible, instead of e.g. creating --force-index.
2014-06-13 02:05:37 +02:00
wm4 8ad8dedca8 win32: implement --priority differently
Does anyone actually use this?

For now, update it, because it's the only case left where an option
points to a global variable (and not a struct offset).
2014-06-12 00:55:14 +02:00
xylosper 0b7facf05d options: fix for compilation when encoding disabled
HAVE_* flags are always defined so ifdef will never work.
They should be checked with their values.
2014-06-12 00:29:22 +02:00
wm4 8f60de98be encode: make option struct local
Similar to previous commits.
2014-06-11 02:05:07 +02:00
wm4 be5725ebc4 input: make option struct local
Similar to previous commits.

This also renames --doubleclick-time to --input-doubleclick-time, and
--key-fifo-size to --input-key-fifo-size. We could keep the old names,
but these options are very obscure, and renaming them seems better for
consistency.
2014-06-11 01:54:03 +02:00
wm4 654930aa47 demux_lavf: make option struct local
Similar to previous commits.
2014-06-11 01:46:20 +02:00
wm4 7f7aa03eda ad_lavc: make option struct local
Similar to previous commit.
2014-06-11 01:39:51 +02:00
wm4 14983eb37d vd_lavc: make option struct local
Removes specifics from options.h and options.c, and puts everything into
vd_lavc.c.
2014-06-11 01:36:11 +02:00
wm4 f9f89b9049 demux_raw: remove global option variables 2014-06-11 00:39:13 +02:00
wm4 099cdbf019 demux_mf: remove global option variables 2014-06-11 00:39:13 +02:00
wm4 fd5207f56d options: remove global variables for swscale options; rename them
Additionally to removing the global variables, this makes the options
more uniform. --ssf-... becomes --sws-..., and --sws becomes --sws-
scaler. For --sws-scaler, use choices instead of magic integer values.
2014-06-11 00:39:13 +02:00
wm4 35e6d1abe0 stream_dvd, stream_dvdnav, stream_bluray: remove global option variables 2014-06-11 00:39:06 +02:00
wm4 959b718957 stream_dvb: remove global option variables 2014-06-11 00:35:03 +02:00
wm4 77a7aa2c41 stream_cdda: remove global option variables 2014-06-11 00:34:46 +02:00
wm4 73ac34b220 stream_pvr: remove global option variables 2014-06-11 00:34:42 +02:00
wm4 383cf20785 tv: remove global option variables
Pretty much nothing changes, but using -tv-scan with suboptions doesn't
work anymore (instead of "-tv-scan x" it's "-tv scan-x" now). Flat
options ("-tv-scan-x") stay compatible.
2014-06-11 00:34:42 +02:00
wm4 3e2f16a89e audio: add a "weak" gapless mode, and make it default
Basically, this allows gapless playback with similar files (including
the ordered chapter case), while still being robust in general.

The implementation is quite simplistic on purpose, in order to avoid
all the weird corner cases that can occur when creating the filter
chain. The consequence is that it might do not-gapless playback in
more cases when needed, but if that bothers you, you still can use
the normal gapless mode.

Just using "--gapless-audio" or "--gapless-audio=yes" selects the old
mode.
2014-06-09 01:20:53 +02:00
wm4 924d4db0de options: change --sub-file behavior
--sub-file is actually a string list, so you can add multipel external
subtitle files. But to be able to set a list, the option value was split
on ",". This made it impossible to add filenames.

One possible solution would be adding escaping. That's probably a good
idea (and some other options already do this), but it's also complicated
both to implement and for the user.

The simpler solution is making --sub-file appending, and make it take
only a single entry.

I'm not quite sure about this yet. It breaks the invariant that if a
value is printed and parsed, you get the same value back. So for now,
just go with the simple solution.

Fixes #840.
2014-06-08 00:03:45 +02:00
wm4 b4c1699aaf sub: remove old style override option
Didn't work too well.
2014-06-05 01:10:48 +02:00
wm4 015399f696 sub: add --ass-style-override=force option
(The old "force" choice of that option is renamed to "force-default".)

This allows overriding native ASS script subtitle styles with the style
provided by the --sub-text-* options (like --sub-text-font etc.). This
is disabled by default, and needs to be explicitly enabled with the
--ass-style-override=force option and input property.

This uses in fact exactly the same options (--sub-text-*) and semantics
as the ones used to configure unstyled text subtitles.

It's recommended to combine this with this in the mpv config file:

ass-force-style="ScaledBorderAndShadow=1"   # work around dumb libass behavior

Also, adding a key binding to toggle this behavior should be added,
because overriding can easily break:

L cycle ass-style-override

This would cycle override behavior on Shift+L and allows quickly
disabling/enabling style overrides.

Note: ASS should be considered a vector format rather than a subtitle
format. There is no easy or reliable way to determine whether the style
of a given subtitle event can be changed without destroying visuals or
not. This patch relies on a simple heuristic, which often works and
often breaks.
2014-06-05 01:10:37 +02:00
Alessandro Ghedini f2a00f3de3 player: write file name to the watch later config file
This simply writes the file name as a comment to the top of the watch later
config file.

It can be useful to the user for determining whether a watch later config file
can be manually removed (e.g. in case the corresponding media file has been
deleted) or not.
2014-06-01 19:55:45 +02:00
wm4 6125ba613f video: add --video-rotate option for controlling auto-rotation 2014-05-24 16:17:52 +02:00
wm4 e3c20bf350 stream: kill start_pos, remove --sb option
stream.start_pos was needed for optical media only, and (apparently) not
for very good reasons. Just get rid of it.

For stream_dvd, we don't need to do anything. Byte seeking was already
removed from it earlier.

For stream_cdda and stream_vcd, emulate the start_pos by offsetting the
stream pos as seen by the rest of mpv.

The bits in discnav.c and loadfile.c were for dealing with the code
seeking back to the start in demux.c. Handle this differently by
assuming the demuxer is always initialized with the stream at start
position, and instead seek back if initializing the demuxer fails.

Remove the --sb option, which worked by modifying stream.start_pos. If
someone really wants this option, it could be added back by creating a
"slice" stream (actually ffmpeg already has such a thing).
2014-05-24 16:17:50 +02:00
wm4 2f65f0e254 input: allow disabling window dragging with --no-window-dragging
Requested in github issue #608.
2014-05-20 02:40:28 +02:00
wm4 4664f8b3b7 cache: redo options and default settings
Some options change from percentages to number of kilobytes; there are
no cache options using percentages anymore.

Raise the default values. The cache is now 25000 kilobytes, although if
your connection is slow enough, the maximum is probably never reached.
(Although all the memory will still be used as seekback-cache.)

Remove the separate --audio-file-cache option, and use the cache default
settings for it.
2014-05-20 02:40:22 +02:00
wm4 ebd5bbd241 x11: replace--[x11-]fstype option with --x11-netwm
Simplifies the code a lot. You can still use --x11-netwm=no to disable
NetWM for whatever reasons.
2014-05-16 00:47:13 +02:00
wm4 2279f718de player: reorganize how lua scripts are loaded
Make loading of scripts independent of Lua. Move some of the loading
code from lua.c to scripting.c, and make it easier to add new scripting
backends.
2014-05-13 02:39:37 +02:00
wm4 c57660fbf7 options: add --hr-seek-framedrop option
This allows disabling of decoder framedrop during hr-seek.

It's basically another useless option, but it will help exploring
whether this framedropping really makes seeking faster, or whether
disabling it helps with precise seeking (especially frame backstepping).
2014-05-07 22:05:30 +02:00
wm4 94441ed139 options: merge ---sub-auto-match with --sub-auto
There's no reason why these should be separate.
2014-05-04 10:31:24 +02:00
Martin Herkt 48bd03dd91 options: remove deprecated --identify
Also remove MSGL_SMODE and friends.

Note: The indent in options.rst was added to work around a bug in
ReportLab that causes the PDF manual build to fail.
2014-05-04 02:46:11 +02:00
Martin Herkt 81c076b2f8 options: remove obsolete --fsmode-dontuse 2014-05-04 02:46:11 +02:00
Martin Herkt 9d9bba8f13 options: rename device-specific options
--dvdangle → --dvd-angle
--tvscan   → --tv-scan
2014-05-04 02:46:11 +02:00
Martin Herkt 11eaa52529 options: rename msg-related options
--msgcolor    → --msg-color
--msglevel    → --msg-level
--msgmodule   → --msg-module
--msgtime     → --msg-time (also document this one)
--playing-msg → --term-playing-msg
--status-msg  → --term-status-msg
2014-05-04 02:46:11 +02:00
Martin Herkt b54c963258 options: rename video-related options/properties
Renamed options:
--aspect    → --video-aspect
--fstype    → --x11-fstype
--native-fs → --fs-missioncontrol
--name      → --x11-name

Renamed properties:
aspect → video-aspect
2014-05-04 02:46:11 +02:00
Martin Herkt 2b7bc2dfc9 options: rename audio-related options/properties
Renamed options:
--audiofile       → --audio-file
--audiofile-cache → --audio-file-cache
--channels        → --audio-channels
--format          → --audio-format
--srate           → --audio-samplerate

Renamed properties:
samplerate → audio-samplerate
channels   → audio-channels
2014-05-04 02:46:11 +02:00
Martin Herkt 8d7d6caeaf options: rename subtitle-related options
--ass           → --sub-ass
--autosub       → --sub-auto
--autosub-match → --sub-auto-match
--sub           → --sub-file
--subcp         → --sub-codepage
--subfps        → --sub-fps
2014-05-04 02:46:11 +02:00
Martin Herkt 32c63fc119 options: rename input-related options
--ar              → --input-appleremote
--consolecontrols → --input-terminal
--media-keys      → --input-media-keys
--joystick        → --input-joystick
--lirc            → --input-lirc
--lircconf        → --input-lirc-conf
--mouse-movements → --input-cursor
--right-alt-gr    → --input-right-alt-gr
2014-05-04 02:46:05 +02:00
wm4 b85983a4a6 encode: don't apply default config options
Often, user configs set options that are not suitable for encoding.
Usually, playback and encoding are pretty different things, so it makes
sense to keep them strictly separate. There are several possible
solutions. The approach taken by this commit is to basically ignore the
default config settings, and switch to an [encoding] config profile
section instead. This also makes it impossible to have --o in a config
file, because --o enables encode mode.

See github issue #727 for discussion.
2014-04-19 22:05:17 +02:00
wm4 1b398e99f7 player: add a --loop-file option
Unlike --loop, loops a file instead of the playlist.
2014-04-17 23:55:42 +02:00
wm4 9dba2a52db player: add a --dump-stats option
This collects statistics and other things. The option dumps raw data
into a file. A script to visualize this data is included too.

Litter some of the player code with calls that generate these
statistics.

In general, this will be helpful to debug timing dependent issues, such
as A/V sync problems. Normally, one could argue that this is the task of
a real profiler, but then we'd have a hard time to include extra
information like audio/video PTS differences. We could also just
hardcode all statistics collection and processing in the player code,
but then we'd end up with something like mplayer's status line, which
was cluttered and required a centralized approach (i.e. getting the data
to the status line; so it was all in mplayer.c). Some players can
visualize such statistics on OSD, but that sounds even more complicated.
So the approach added with this commit sounds sensible.

The stats-conv.py script is rather primitive at the moment and its
output is semi-ugly. It uses matplotlib, so it could probably be
extended to do a lot, so it's not a dead-end.
2014-04-17 21:47:00 +02:00
Rudolf Polzer a7c6c4656d New option --no-ometadata to opt out of including metadata when encoding.
This re-allows the previous behaviour of being able to reencode with
metadata removed, which is useful when encoding "inconsistently" tagged
data for a device/player that shows file names when tags are not
present.
2014-04-14 20:33:35 +02:00
wm4 132f395aac Remove radio://
It was disabled by default, works only for analogue radio, and I bet
nobody uses it.
2014-04-13 18:51:43 +02:00
wm4 98f5d4c30c vd_lavc: by default, do not show corrupt frames
This flips the default value. Use --vd-lavc-show-all=yes to revert.
2014-04-08 23:05:15 +02:00
wm4 249789c256 audio: make --channels option always force the output layout
Use the --channels value directly on the AO, instead of doing it only in
the --channels=stereo (default) case and if the decoder output is not
stereo.
2014-03-10 02:09:18 +01:00
wm4 bcceeec737 sd_ass: add a very simple and evil way to override ASS subtitle styles
--ass-style-override=force now attempts to override the 'Default' style.
May or may not work. In some situations it will work, but also mess up
seemingly unrelated things like signs typeset with ASS.
2014-03-01 02:18:03 +01:00
wm4 97409ec4e6 msg: add --msgtime option to add timestamps to each output message
Will be helpful to track down strange wait times and such issues, as
well when you have develop something timing related. (Then you may print
timestamps in your debug output, and the --msgtime timestamps will help
giving context.)
2014-02-28 22:45:34 +01:00
wm4 1e2d409fb4 lua: add option to disable auto-loading of lua scripts 2014-02-28 22:25:48 +01:00