Commit Graph

1628 Commits

Author SHA1 Message Date
wm4 e2eaedcb0a vo_opengl: disable extended downscaling by default
To simplify implementation, the same filter kernel was used for both
directions, even when the scaling factors were different. It turns
out that people actually did this, and that the resulting rendering
errors were rather visible. Disable this feature by default, as
fixing it would require structural changes, and it's a useless anyway.
2012-11-11 18:02:07 +01:00
wm4 34649dbd1d manpage: vo_opengl: document that srgb subopt changes gamma 2012-11-11 17:56:42 +01:00
Stefano Pigozzi c78243c03e cocoa_common: honor the `--geometry` option 2012-11-10 22:37:19 +01:00
wm4 84829a4ea1 Merge branch 'osd_changes' into master
Conflicts:
	DOCS/man/en/options.rst
2012-11-01 02:12:47 +01:00
wm4 c5eeac6654 manpage: --codecpath was removed 2012-11-01 02:12:16 +01:00
wm4 63a56048b2 options: remove --hr-mp3-seek
This didn't do anything anymore. Even before the internal audio demuxer
was removed, demux_lavf was used by default for mp3.

Use --hr-seek instead.
2012-10-30 19:50:23 +01:00
wm4 7985d4fd34 options: remove --adapter
This probably didn't do anything. Maybe OpenGL VOs on win32 actually
could make use of it, but even then it probably didn't work.
2012-10-30 19:50:23 +01:00
wm4 f211733123 manpage: -benchmark was renamed to -untimed 2012-10-30 19:50:22 +01:00
wm4 e719d3610d options: rename -ni to -avi-ni
The -ni option does something with the AVI demuxer only.

Also fix misleading error messages when the packet queue overflows (it
suggests using -ni, which in the typical case of playing NI AVI files
will not work, as demux_lavf is used by default).
2012-10-30 19:50:22 +01:00
wm4 042901940f options, avi: remove -loadidx/-saveidx
This was probably useless even many years ago.
2012-10-30 19:50:21 +01:00
wm4 10295b080d manpage: cleanup
Removing text about things that have been removed from the code long
ago, other fixes.
2012-10-24 21:56:35 +02:00
wm4 3d98e8c674 options: remove --ffactor switch
This controlled the generation of the palette for DVD subs if no palette
was found. The option name and description is confusing, and it was
probably barely useful. Remove the option, and hardcode the behavior to
the option's default value.
2012-10-24 21:56:35 +02:00
wm4 a8824f12dd options: remove --subfont-autoscale (changes default font scale)
The code for this option attempted to emulate the old as-documented
behavior. It wasn't very good at it, and now that the old OSD code has
been removed, it's entirely pointless.

This removes the factor 1.7 with which --subfont-text-scale was
multiplied.
2012-10-24 21:56:35 +02:00
wm4 2afd7ebb4e options: remove subtitle related options that did nothing
Most of these cased working when the OSD was switched to libass, or
didn't do anything even before that.

Also don't recursively include subreader.h in sub.h.
2012-10-24 21:56:35 +02:00
wm4 773668b6e8 VF: rename vf_ass to vf_sub
This reflects the fact that this filter now renders all types of
subtitles, not just ASS subtitles.

Always compile this filter, not just on CONFIG_ASS.

Note that --no-ass still disables auto-inserting this filter. It's the
only way to disable auto-insertion, so keep it even though it's not
really ASS specific anymore. --no-ass also disables using libass for
rendering text subs directly.
2012-10-24 21:56:34 +02:00
wm4 796e5638ac manpage: optional input command args can't just be omitted
Fix the "grammar" of such commands to be hopefully less confusing. Also,
add the "-" for such arguments, which skips optional arguments without
changing their default value.

Also change some mentions of "mplayer" to "mpv".
2012-10-24 21:56:34 +02:00
wm4 48ce4ab7f9 screenshot: change "screenshot" input command
"screenshot" now maps to "screenshot subtitles" by default, instead of
"screenshot video". Swap the argument order: the more useful argument
should come first. Remove the compatibility aliases for numeric choices
(e.g. "screenshot 1 0" won't work anymore).
2012-10-24 21:56:34 +02:00
wm4 11ed093182 screenshot: allow taking screenshots with subtitles
This adds a new screenshot mode "subtitles", which basically takes the
video frame as decoded, and renders subtitles into it.

This may fail for some pixel formats, because libswscale sucks. If this
becomes ever a real problem, the code could be changed to convert the
image to RGBA first (or whatever the image writer wants), and then
render the subtitles into it. This would avoid the additional image
copy needed with vo_xv too. But for now, it seems better to go with the
current method in the common case: vo_opengl creates an image copy
anyway, and drawing bitmaps to yv12 is better, as no color space
conversion is involved in draw_bmp.c's up/downsampling conversion.
2012-10-24 21:56:34 +02:00
wm4 4d11f32162 VO, sub: refactor
Remove VFCTRL_DRAW_OSD, VFCAP_EOSD_FILTER, VFCAP_EOSD_RGBA, VFCAP_EOSD,
VOCTRL_DRAW_EOSD, VOCTRL_GET_EOSD_RES, VOCTRL_QUERY_EOSD_FORMAT.

Remove draw_osd_with_eosd(), which rendered the OSD by calling
VOCTRL_DRAW_EOSD. Change VOs to call osd_draw() directly, which takes
a callback as argument. (This basically works like the old OSD API,
except multiple OSD bitmap formats are supported and caching is
possible.)

Remove all mentions of "eosd". It's simply "osd" now.

Make OSD size per-OSD-object, as they can be different when using
vf_sub. Include display_par/video_par in resolution change detection.

Fix the issue with margin borders in vo_corevideo.
2012-10-24 21:56:34 +02:00
wm4 fd5c4a1984 Remove things related to old OSD
To ease changing all the VOs to the new OSD rendering, fallbacks,
conversions, support code etc. was left all over the code. Now that
all VOs have been changed, all that code is inactive. Remove it.

Strip down spudec.c. We don't need the old grayscale and scaling stuff
anymore. (Not removing spudec itself yet - I'm not confident that the
libavcodec DVD sub decoder is sufficient, and it would also require
some hacks to get DVD palette and resolution information from libdvdread
to libavcodec.)

The option --spuaa, --spualign, --spugauss were used with the old sub
scaling code, and don't do anything anymore.
2012-10-24 21:56:33 +02:00
wm4 4e89851aa1 Merge branch 'master' into osd_changes
Conflicts:
	Makefile
	command.c
	libvo/gl_common.c
	libvo/vo_corevideo.m
	libvo/vo_opengl.c
	libvo/vo_opengl_old.c
	libvo/vo_opengl_shaders.glsl
	sub/ass_mp.c
	sub/osd_libass.c
	sub/sd_ass.c
2012-10-16 07:30:30 +02:00
wm4 8f8f6e6d9d sub: remove logic for disabling hinting on scaled EOSD
This was an extremely obscure setting, as it was used only with vo_gl
if its scaled-osd suboption was used. If you really want this, you can
set the desired ass-hinting value directly, and there will be literally
no loss in functionality.

Note that this didn't actually test whether the EOSD was scaled.
Basically, it only checked whether vo_gl had the scaled-osd suboption
set.
2012-10-16 07:26:31 +02:00
wm4 cf61928eec vo_gl, options: remove doublebuffering option (--double)
Useless. It complicated the code and caused flicker, and was useless
otherwise. The manpage describes this option as "should not normally
be used".

One possibly useful effect from the point of view of the user was that
vsync was disabled. You can do this with the --vsync option, or by
changing X/driver settings directly.
2012-10-16 07:26:31 +02:00
wm4 6557f206ef manpage: improvements to vo_opengl documentation
Mention the FBO format chaos.

Some other things were not entirely correct anymore.

Also update the "builtin" documentation in vo_opengl.c.
2012-10-15 00:28:59 +02:00
wm4 187cbd7aa7 input: add input test mode
In input test mode, key bindings won't be executed, but are shown on the
OSD.  The OSD includes various information, such as the name of the key,
the command itself, whether it's builtin, and the config file location
it was defined.

The input test mode can be enabled with "--input=test". No effort is
spent trying to react to key bindings that normally exit the player;
they are treated just like any other binding.
2012-10-14 22:28:51 +02:00
wm4 a19f197cb1 core: show quvi page title in window title, clean up libquvi handling
Clean up handling of libquvi (which resolves URLs of streaming sites
into URLs to the actual media playable by mpv). Move the code out of
open.c to quvi.c, and invoke it explicitly from mplayer.c, instead of
trying to resolve every filename passed to open_stream().

This allows easily passing metadata from the quvi context to the
frontend. Expose QUVIPROP_PAGETITLE as "media-title" property, and use
that instead of "filename" for the mplayer window title. (For YouTube,
this is the video title.) It's cleaner too.

Handle a potential reliability issue: check quvi_getprop return values.

Since open.c contains barely anything but the open_stream() stub, move
that to stream.c and delete open.c.
2012-10-14 22:26:41 +02:00
wm4 85d185441a Merge branch 'input_changes' into master
Conflicts:
	DOCS/man/en/vo.rst
	etc/input.conf
	input/input.c
	m_property.c
2012-10-12 11:53:53 +02:00
wm4 65fc530f0c Rename to "mpv"
This changes the name of this project to mpv. Most user-visible mentions
of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the
default config file location are changed as well.

The new default config file location is: ~/.mpv/

Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI,
which has been removed from mplayer2 ages ago.

We don't have a logo, and the MS Windows resource files sort-of require
one, so leave etc/mplayer.ico/.xpm as-is.

Remove the debian and rpm packaging scripts. These contained outdated
dependencies and likely were more harmful than useful. (Patches which
add working and well-tested packaging are welcome.)
2012-10-12 10:14:32 +02:00
wm4 3d712eb56d manpage: remove old manpage 2012-10-12 10:14:23 +02:00
wm4 e1b15dee4c commands: use "up" and "down" as 2nd argument for cycle command
Allow the values "up" and "down" as step argument for the cycle input
command. Previously, this argument was a float, which specified an
arbitrary step value and direction (similar to the add command).
Instead of "1" and "-1", "up" and "down" is to be used.

Float values are still accepted. That capability might be removed in the
future, as there's probably hardly any actual use for arbitrary step
values.
2012-10-12 10:13:43 +02:00
wm4 32fe890cc1 commands: add print_text input command to print text on the terminal
In theory, this could take over the role of the get_property slave
command, and is more general.
2012-10-12 10:13:43 +02:00
wm4 c9df2c8bd8 sub: add --ass-style-override option to disable style overrides
There are a number of options which modify ASS subtitle rendering. Most
of these do things that can interfere with the styling done by subtitle
scripts, resulting in incorrect rendering. Add the --ass-style-override
option to make it easy to disable all overrides. This helps trouble-
shooting, and makes it more practical to use the override features. (You
can simply toggle the ass-style-override property at runtime, should
one of the style override options break subtitle rendering at a certain
point.)

This mainly affects whether most --ass-* options are applied, as well
as --sub-pos. Some things, like explicit style overrides loaded with
--ass-force-style, can't be changed at runtime using the
ass-style-override property.
2012-10-12 10:13:42 +02:00
wm4 fd56c168ae options: add --status-msg
Replaces the status line with a custom string.

This is probably useful for hacking old slave mode applications into
working again. Even if not, this might be generally useful.
2012-10-12 10:13:42 +02:00
wm4 65074ec1f0 manpage: document input.conf related things
This directly corresponds to DOCS/OUTDATED-tech/slave.txt.

Changes from the recent commits are included too.
2012-10-12 10:10:33 +02:00
wm4 dec53f760e commands: add more property-option bridge uses, rename some options
Make more properties use the property-to-option bridge to reduce code
size and to enforce consistency. Some options are renamed to the same
as the properties (the property names are better in all cases).

Do some other minor cleanups. One bigger issue was memory management of
strings: M_PROPERTY_TO_STRING assumed the strings were statically
allocated, and no dynamic allocations could be returned. Fix this in
case the need for such properties arises in the future. Get rid of
m_property_string_ro(), because it's not always clear that the "action"
parameter is M_PROPERTY_SET and the string argument will be used.
2012-10-12 10:10:31 +02:00
wm4 1a5a7a4929 options: accept "yes" and "no" only for flags
This removes the alternative values like "off", "0", "false" etc., and
also the non-English versions of these.

This is done for general consistency. It's better to have a single way
of doing things when multiple ways don't add singificant value.

Also update some choices for consistency.
2012-10-12 10:10:31 +02:00
wm4 10437c35df commands: rename "osdlevel" option and property, make it a choice
Rename both the option and property to "osd-level", which fits a bit
better with the general naming scheme. Make it a choice instead of an
integer range. I failed to come up with good names for the various
levels, so leave them as-is.

Remove the useless property handler for the "loop" property too.
2012-10-12 10:10:30 +02:00
wm4 6f1486b397 commands: replace --hardframedrop, change framedropping property
Replace --hardframedrop with --framedrop=hard. Rename the framedrop
property from "framedropping" to "framedrop" for the sake of making
command line options have the same name as their corresponding
property. Change the property to accept choice values instead of
numeric values.

Remove unused/forgotten auto_quality variable.
2012-10-12 10:10:30 +02:00
wm4 703e02a6ee vo_opengl: change default FBO format
GL_RGB16 doesn't seem to work universally (e.g. Intel). Use GL_RGB by
default, and use GL_RGB16 for "opengl-hq" only.

This may require users of Intel GPUs to manually experiment with the
fbo-format suboption when using "opengl-hq", as GL_RGB16 doesn't seem to
work there in some cases (black screen).
2012-10-03 03:17:53 +02:00
wm4 5d60ac11b5 vo_opengl: use PBOs by default with opengl-hq
It's not really known whether PBO use causes problems of any kind (most
likely not). They should slightly increase performance. Use them by
default with "opengl-hq".

Even though PBOs don't have anything to do with rendering quality,
"opengl-hq" provides a test bed for features that should be enabled by
default, but aren't out of fear for regressions.
2012-10-03 03:17:53 +02:00
wm4 47d15a5b6b vo_opengl: use low quality default settings, add opengl-hq alias
Change the default settings for vo_opengl to highest performance and
compatibility, but lowest quality. Use bilinear as default scaler.

Add "opengl-hq" as alias for high quality settings. This alias uses
exactly the same settings as vo_opengl did before this commit.
2012-10-03 03:17:53 +02:00
wm4 3611d1bf9b VO: actually rename VOs gl -> opengl-old, gl3 -> opengl
This renames vo_gl3 to vo_opengl, and makes it the default. The old
vo_gl is still available under "opengl-old".

We keep "gl3" as alias to "opengl" for short-term compatibility.

For OSX/Cocoa, the autoprobe order changes (prefer the "opengl" over
"opengl-old").

Remove "gl_nosw". This was a compatibility alias for "opengl-old", and
there's no point in keeping it.
2012-10-03 03:17:39 +02:00
wm4 a0b43a11e4 vo_gl3: make it work on OpenGL 2.1
Now vo_gl3 should work with standard OpenGL 2.1, as long as the
GL_ARB_texture_rg extension is available. Optional features, which
require features that are always in OpenGL 3.0, but are available
as extensions only in OpenGL 2.1, are automatically disabled.

The force-gl2 suboption, which was an unreliable hack to run vo_gl3
in an OpenGL 2.1 context, is removed.

Significant changes are done to the extension loader to make it easier
to identify optional OpenGL features.

Context creation is a bit changed to simplify the code and to handle
the fallback better if OpenGL 3 context creation fails, and creating
an OpenGL legacy context is attempted.

Based on the initial work by Rudolf Polzer <divverent@xonotic.org>,
which included making the shader GLSL 1.20 compatible, and more.
2012-10-03 03:17:38 +02:00
wm4 e5afc1f405 Remove useless video filters
Most of these have very limited actual use, or are even entirely
useless. They only serve to bloat the codebase and to make life harder.
Drowning users in tons of barely useful filters isn't exactly helpful
either. Some of these filters were redundant or marked as obsolete.

The dlopen and lua (to be added soon) video filters provide ways to add
custom filters.

Detailed listing for each filter with reasons (with contributions from
divVerent and lachs0r):

1bpp:
    Replaced by "scale".
2xsai:
    Pixel art scaling algorithm, useless with lossy video.
blackframe:
    Not very useful. Apparently one use is combining it with scripts,
    that pass the
bmovl:
    Weirdly complex and insane (using FIFO commands), questionable use.
cropdetect:
    Only sort-of useful when used with scripts, and then it will be
    very fragile.
    It's probably better to use the dlopen rectangle filter, or to
    implement the common use-case in a better way.
decimate:
    Not needed/useful with modern video codecs, is an
    encoding-only filter.
denoise3d:
    "hqdn3d" is better.
detc:
    Some of the worse deteleciners.
dint:
    Useless, actually crashes. (On an assert in vf.c that is disabled
    by default in mplayer-svn.)
dvbscale:
    Not even practical, and the same effect can be achieved through
    other means.
eq:
    Worse/older version of eq2.
field:
    Limited use, available as dlopen filter.
fil:
    Quoting the manpage:
        This filter is very similar to the il filter but much faster,
        the main disadvantage is that it does not always work.
        Especially if combined with other filters it may produce
        randomly messed up images, so be happy if it works but do not
        complain if it does not for your combination of filters.
filmdint:
    Kind of redundant with pullup, and slightly worse.
fixpts:
    Never useful. (Most if not all filters have been fixed for PTS.)
framestep:
    Questionable use. For things like creating thumbnails, ffmpeg or
    --sstep should be used.
geq:
    Limited use, will be redundant with the "lua" filter.
halfpack:
    Useless, probably redundant with "scale".
harddup:
    Useless.
hue:
    Most VOs support this.
il:
    Useless.
ivtc:
    Another of the worse deteleciners.
kerndeint:
    A bad deinterlacer.
lavc:
    For DVB output devices. We removed that support.
lavcdeint:
    A bad deinterlacer, was already deprecated.
    Still available as --vf=pp=fd.
mcdeint:
    A broken deinterlacer that uses lavc internals.
ow:
    Very slow, barely any quality benefit over "hqdn3d".
palette:
    Done by "scale".
perspective:
    Files with incorrect perspective are extremely rare. About the
    only real-world use for this is keystone correction, which is
    usually done in hardware by the projector or by graphics
    drivers/compositors.
pp7:
    Another useless postprocessing filter with bad and complicated code.
    Use libpostprocess with "pp" instead.
qp:
    Useless.
remove-logo:
    Redundant with delogo, which is better and more practical.
rgbtest:
    Useless.
sab, smartblur, boxblur:
    Blur filters, redundant to "unsharp".
softskip:
    Does nothing.
spp, fspp, uspp:
    Useless postprocessing filters. "spp" needs ffmpeg internals.
    "fspp" is the optimized version of the "spp" filter (???), while
    "uspp" is the slow version (????).
    Use libpostprocess with "pp" instead.
telecine:
    Evil and useless. Available as dlopen filter for testing
    purposes.
test:
    Useless.
tfields:
    Useless, probably.
tile:
    Questionable use. Available as dlopen filter.
tinterlace:
    Evil and useless.
yuvcsp:
    Probably useless.
yvu9:
    Redundant with "scale".

Also remove the following left-over files: vd_null.c, vqf.h
2012-10-03 01:28:40 +02:00
Rudolf Polzer 683966241c encode: remove dependency on current ffmpeg
Apparently, libav doesn't have the change for the new way to create a
libavformat context merged yet. So, we can't use that...

Rather, this commit fixes format specific avoptions another way.

On the downside, invalid format options are now detected very late, and
any attempt to set an option value to +something or -something will
append to the previously set option value (this logic can no longer be
specific to options of bitflag type, as finding out the option type is
what we simply cannot do with this interface).
2012-10-01 11:04:48 +02:00
Rudolf Polzer 327a5d0ecf encode: add options --ovfirst and --oafirst
This allows to define which stream is to be used as first output stream.
This is useful because dvdauthor refuses VOB files where the audio
stream is the first stream.
2012-09-29 15:04:40 +02:00
wm4 7fe56f1602 options: accept "yes" and "no" only for flags
This removes the alternative values like "off", "0", "false" etc., and
also the non-English versions of these.

This is done for general consistency. It's better to have a single way
of doing things when multiple ways don't add singificant value.

Also update some choices for consistency.
2012-09-23 14:58:21 +02:00
wm4 425ac31a3b softvol, ao_pulse: prefer ao_pulse volume control by default
--softvol is enabled by default. For most audio outputs, this is a good
thing, as they have either their own (bad) soft volume implementation,
or control the system mixer. With ao_pulse, the situation is a bit
different: it supports per-application volume (i.e. volume control is
not really global). More importantly, ao_pulse uses a rather large audio
buffer, and changing the volume with mplayer's volume filter has a large
delay. With the native ao_pulse volume control, it's instant, because
PulseAudio's audio filtering happens at a later stage in its processing
pipeline (inaccessible for mplayer).

This means native volume control should really be allowed for ao_pulse,
while it's the reverse for other audio outputs. Make --softvol a choice
option, and add a new "auto" choice. This is default and will use PA's
volume control with ao_pulse, and mplayer's volume filter otherwise
(i.e. the old softvol behavior).
2012-09-23 14:57:01 +02:00
Rudolf Polzer f5b8b6ac12 encode: video encoding now supported using mencoder-like options 2012-09-18 21:08:20 +02:00
wm4 b94cdc4baf options: change --vid, --aid, --sid options
The --vid, --aid, --sid options now accept the values 'off' and 'auto',
instead of having the user deal with the numeric values -2 and -1. The
numeric values are not allowed anymore.

Remove the --audio option. It was probably meant as compensation option
for --no-audio. There are no such options for sub/video, and it was not
documented, so just remove it. The replacement is "--aid=auto".

Also do some updates to the manpage.
2012-09-18 21:07:30 +02:00