Commit Graph

10509 Commits

Author SHA1 Message Date
wm4 3a9e661e92 video: deprecate almost all video filters
The plan is to nuke the custom filter chain completely. It's not clear
what will happen to the still needed builtin filters (mostly hardware
deinterlacing and vf_vapoursynth). Most likely we'll replace them with
different filter chain concept (whose main purpose will be providing
builtin things and bridging to libavfilter).

The undocumented "warn" options are there to disable deprecation
warnings when the player inserts filter automatically.

The same will be done to audio filters, at a later point.
2017-04-02 18:00:16 +02:00
wm4 dc7d71fc8e manpage, client API: add some clarifications when commands use OSD
The APIs that run commands in a more API-like manner disable OSD and
string expansion by default.
2017-04-01 21:47:19 +02:00
wm4 7bc193e955 manpage: finish cut off sentence 2017-04-01 21:37:03 +02:00
wm4 9bcb9fcf26 player: make screenshot commands honor the async flag
And also change input.conf to make all screenshots async. (Except the
every-frame mode, which always uses synchronous mode and ignores the
flag.) By default, the "screenshot" command is still asynchronous,
because scripts etc. might depend on this behavior.

This is only partially async. The code for determining the filename is
still always run synchronously. Only encoding the screenshot and writing
it to disk is asynchronous. We explicitly document the exact behavior as
undefined, so it can be changed any time.

Some of this is a bit messy, because I wanted to avoid duplicating the
message display code between sync and async mode. In async mode, this is
called from a worker thread, which is not safe because showing a message
accesses the thread-unsafe OSD code. So the core has to be locked during
this, which implies accessing the core and all that. So the code has
weird locking calls, and we need to do core destruction in a more
"controlled" manner (thus the outstanding_async field).

(What I'd really want would be the OSD simply showing log messages
instead.)

This is pretty untested, so expect bugs.

Fixes #4250.
2017-04-01 20:47:23 +02:00
wm4 a071d5fcfe input: add "async" flag
Obviously, this has no effect on commands which do not support this
explicitly. A later commit will enable this for screenshots.

Also add some wording on mpv_command_async(), which has nothing to do
with this. Having a more elegant, unified behavior would be nice. But
the API function was not created for this - it's merely for running
commands _synchronously_ on the core, but without blocking the client
API caller (if the API user consistently uses only async functions).
2017-04-01 20:36:39 +02:00
Ricardo Constantino d2fcca7ad0
external_files: enable autoloading with URLs
Closes #3264
2017-04-01 15:42:42 +01:00
Ricardo Constantino 07ee7fb2c3
osc: escape ASS and strip newlines on title 2017-03-27 18:00:56 +01:00
Ricardo Constantino dc00ad537f
osc: make title configurable and use property expansion on it 2017-03-27 18:00:56 +01:00
Ricardo Constantino ebf61267f4
Revert "osc: make the title toggleable between media-title and filename"
This reverts commit 6573b73462.
2017-03-27 18:00:54 +01:00
Akemi 063ca8f0fe osx: fix key input in certain circumstances
for a reason i can just assume some key events can vanish from the
event chain and mpv seems unresponsive.

after quite some testing i could confirm that the events are present at
the first entry point of the event chain, the sendEvent method of the
Application, and that they vanish at a point afterwards. now we use
that entry point to grab keyDown and keyUp events. we also stop
propagating those key events to prevent the no key input' error sound.
if we ever need the key events somewhere down the event chain we need
to start propagating them again. though this is not necessary currently.
2017-03-26 20:38:26 +02:00
Avi Halachmi (:avih) afbd657bb8 command: add expand-text command to property-expand a string 2017-03-26 19:58:51 +02:00
Ricardo Constantino 6573b73462
osc: make the title toggleable between media-title and filename
Close #4221
2017-03-26 14:41:03 +01:00
wm4 a94013f585 command: change and simplify filter toggle syntax
"@name:!" becomes simply "@name". This is actually slightly more complex
to parse, but makes for a much simpler syntax and will be less weird to
the user. Suggested by haasn.

The old syntax is now rejected with an error.

Also add some more explicit error checks, instead of e.g. allowing empty
filter names and erroring only when it's not found.
2017-03-26 13:13:34 +02:00
James Ross-Gowan 439e2b43c3 vo_opengl: angle: add --angle-flip to set the present model
DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL might be buggy on some hardware.
Additionaly DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL might be supported on some
Windows 7 systems with the platform update, but it might have poor
performance. In these cases, the user might want to disable the use of
DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL swap chains with --angle-flip=no.
2017-03-26 21:50:01 +11:00
wm4 b0086d6243 m_option: consistent af/vf filter entry "enabled" flag default value
It should default to true, but setting the filter list via mpv_node
(relevant for client API and Lua scripting) left it to false.

Also "document" the flag.
2017-03-25 18:13:04 +01:00
wm4 7d424b4ce4 command: add better runtime filter toggling method
Basically, see the example in input.rst.

This is better than the "old" vf-toggle method, because it doesn't
require the user to duplicate the filter string in mpv.conf and
input.conf.

Some aspects of this changes are untested, so enjoy your alpha testing.
2017-03-25 17:07:40 +01:00
wm4 29f9e44723 manpage: minor addition for --video-sync
Nobody needs to read all the text below it, really.
2017-03-25 17:06:04 +01:00
Dan Oscarsson 5b75142a1d sub: add SDH subtitle filter
Add subtitle filter to remove additions for deaf or hard-of-hearing
(SDH). This is for English, but may in part work for others too.
This is an ASS filter and the intention is that it can always be
enabled as it by default do not remove parts that may be normal text.
Harder filtering can be enabled with an additional option.

Signed-off-by: wm4 <wm4@nowhere>
2017-03-25 15:04:05 +01:00
Matthias Hunstock 3e93c09cff command: add demux-start-time property
Add a demux_start_time property, update docs.
2017-03-25 14:44:11 +01:00
igv 16e8ecb031 vo_opengl: replace uniform variable image_size with input_size
input_size can be the size of a cropped image

Signed-off-by: wm4 <wm4@nowhere>
2017-03-25 13:40:04 +01:00
igv 6b8dadd7c1 vo_opengl: add tex_offset uniform variable to user shaders 2017-03-25 13:39:21 +01:00
igv 2aae5ce0ba vo_opengl: make size of a cropped source image available to user shaders 2017-03-25 13:39:15 +01:00
Jan Janssen 222899fbbe af_drc: remove
Remove low quality drc filter. Anyone whishing to have dynamic range
compression should use the much more powerful acompressor ffmpeg filter:

    mpv --af=lavfi=[acompressor] INPUT

Or with parameters:

    mpv --af=lavfi=[acompressor=threshold=-25dB:ratio=3:makeup=8dB] INPUT

Refer to https://ffmpeg.org/ffmpeg-filters.html#acompressor for a full
list of supported parameters.

Signed-off-by: wm4 <wm4@nowhere>
2017-03-25 12:57:10 +01:00
wm4 d663a0e90d manpage: add empty line between protocol header/description
Appears to give better formatting. (I'll never understand rst...)
2017-03-25 12:51:50 +01:00
Frederick Eaton 7e1d279d73 manpage: explain more about outstanding dvdnav bugs 2017-03-25 12:50:04 +01:00
wm4 b9e4fb952d command: add a property to signal whether networking is used
Requested. The property semantics are a bit muddy due to lack of effort.
Anticipated use is different display of cache status, so it should not
matter anyway.
2017-03-24 15:31:01 +01:00
wm4 80b89cef61 manpage: fix a typo 2017-03-20 05:34:56 +01:00
wm4 7e4a73c8e4 vo_opengl: add a --opengl-es=force2 option
Useful for testing. Unfortunately, the nVidia EGL driver ignores this,
and returns a GLES 3.2 context anyway (which it is allowed to do). Might
still be useable with ANGLE, which will really give you a GLES 2 context
if you ask for it.
2017-03-20 04:57:51 +01:00
wm4 c3248369ac vo_opengl: add experimental vdpauglx backend
As the manpage says, this has no value other than adding bugs.

It uses code based on context_x11.c, and basically does very stripped
down context creation (no alpha support etc.). It uses vdpau for
display, and maps vdpau output surfaces as FBOs to render into them.

This might be good to experiment with asynchronous presentation. For
now, it presents synchronously, with a 4 frame delay (which should whack
off A/V sync). The forced 4 frame delay is probably also why interaction
feels slower.

There are some weird vdpau errors on resizing and uninit. No idea what
causes them.
2017-03-18 17:43:57 +01:00
wm4 46e3dc27af screenshot: change details of --screenshot-format handling
This is just a pointless refactor with the only goal of making
image_writer_opts.format a number.

The pointless part of it is that instead of using some sort of arbitrary
ID (in place of a file extension string), we use a AV_CODEC_ID_. There
was also some idea of falling back to the libavcodec MJPEG encoder if
mpv was not linked against libjpeg, but this fails. libavcodec insist on
having AV_PIX_FMT_YUVJ420P, which we pretend does not exist, and which
we always map to AV_PIX_FMT_YUV420P (without the J indicating full
range), so encoder init fails. This is pretty dumb, but whatever. The
not-caring factor is raised by the fact that we don't know that we
should convert to full range, because encoders have no proper way to
signal this. (Be reminded that AV_PIX_FMT_YUVJ420P is deprecated.)
2017-03-18 15:03:05 +01:00
wm4 8e75297c26 image_writer: remove useless formats
Nobody cares about those.
2017-03-18 14:24:53 +01:00
wm4 8a28f94a7e manpage: slightly improve screenshot-raw description 2017-03-18 14:15:34 +01:00
wm4 923f9322a1 manpage: minor clarification to screenshot command argument handling 2017-03-15 19:40:39 +01:00
wm4 7eb32240c9 manpage: adjust description of libva deinterlacer ref direction mess
Relevant:

https://cgit.freedesktop.org/mesa/mesa/commit/?id=0798fddb5000f2b1edffc693ec65236a680ce61f

Eventually I'll just remove this option. But it's probably good to leave
it for while, possibly for letting Mesa VA driver users test and confirm
this.
2017-03-07 09:10:37 +01:00
wm4 85c8556eef hw_videotoolbox: allow using native decoder output format
Depends on FFmpeg commit ade7c1a2326e2bb9b.

It has yet to show whether it actually does what it should. Probably
doesn't.
2017-03-02 11:49:12 +01:00
wm4 75fc2bee1e vf_vavpp: add advanced deint bug compatibility for Intel vaapi drivers
I'm not sure what's going on here, but it appears kodi switches forward
and backwards references for advanced VPP deinterlacing modes. This in
turn makes deinterlacing with these modes apparently work. If you don't
switch the directions, you get a stuttering mess.

As far as the libva trace dump is concerned, this makes mpv's libva
deinterlacing API use behave like kodi's, and appears to reproduce
smooth video with advanced libva deinterlacing enabled.

I'm hearing that Mesa actually does it correctly, and I'm not sure what
will happen there. For now, passing "reversal-bug=no" as sub-option to
the vavpp filter will undo this behavior.
2017-02-28 00:57:51 +01:00
Akemi 2292501533 cocoa: add option to force dedicated GPU
Fixes #3242
2017-02-27 23:53:53 +01:00
wm4 6f8c953042 demux_lavf: skip avformat_find_stream_info() for some formats
Includes hls, mp4, mkv by default. This also avoids stupid things like
decoding at least 1 video frame per stream in the demuxer.

This also add --demuxer-lavf-probe-info to give finer control over what
happens.
2017-02-23 18:18:22 +01:00
wm4 6e2d3d9919 vo_opengl: remove dxva2 dummy hwdec backend
This was a hack to let libmpv API users pass a d3d device to mpv. It's
not needed anymore for 2 reasons:

1. ANGLE does not have this problem
2. Even native GL via nVidia (where this failed) seems to not require
   this anymore
2017-02-20 08:39:08 +01:00
wm4 48f601ae9e manpage: discourage vo_vaapi further
I don't know what's this comment about hardware decoding. Possibly it
was written before vo_opengl had vaapi decoding support.
2017-02-17 21:01:59 +01:00
Aman Gupta 53fab20c6d vo_opengl: implement videotoolbox hwdec on iOS
Implements --hwdec=videotoolbox on iOS. Similar to hwdec_osx.c, but
using CVPixelBuffer APIs available on iOS instead of the equivalent
IOSurface APIs in macOS.
2017-02-17 11:43:24 -08:00
wm4 e59e917e71 vo_opengl: hwdec_osx: use new format setup function
We can drop the custom table.

For some reason, the interop does not accept GL_RGB_RAW_422_APPLE as
internal format for GL_RGB_422_APPLE, so switch the format table to use
GL_RGB (this way both interop and real textures work the same).

Another victim of the apparent requirement of exactly matching texture
formats is kCVPixelFormatType_32BGRA. vo_opengl wants to handle this as
normal RGBA texture, with a swizzle applied in the shader.
CGLTexImageIOSurface2D() rejects this, because it wants the exact
internal format. Just drop the format, because it's useless anyway.

(Maybe this is a bit too fragile...)
2017-02-17 17:08:37 +01:00
wm4 e8137ee881 manpage: remove stale --volume-restore-data entry
The option was removed a while ago.
2017-02-17 12:08:12 +01:00
Pedro Pombeiro ea297c53c7 DOCS/waf-buildsystem.rst: fix typo
Signed-off-by: wm4 <wm4@nowhere>
2017-02-15 10:41:26 +01:00
Akemi 64b0d81c32 cocoa: add --ontop-level option for modifying ontop window level
since there are different views on what ontop is, we make the ontop
window level modifiable. at the moment only support for macOS was added.
the default for macOS was changed from 'system' to 'window' since this
fixes an unwanted behaviour in fullscreen and in general causes less
issues with expected behaviour.

Fixes #2376 #3974
2017-02-13 22:49:11 +01:00
wm4 8432514c5f DOCS/contribute.md: adjust coding style for if/else bracing 2017-02-11 16:48:29 +01:00
wm4 d0f1d382e6 DOCS/mplayer-changes.rst: fix syntax
The missing newline made the github rst renderer (which is a POS) hide
the entire section.

Also, add some more warning text.
2017-02-10 15:27:45 +01:00
wm4 c94ede9e62 manpage: fix incorrect option name for --record-file
Also the one in interface-changes.rst.

Fixes #4121.
2017-02-08 06:54:47 +01:00
wm4 96a45a16af player: add experimental stream recording feature
This is basically a WIP, but it can't remain in a branch forever. A
warning is print when using it as it's still a bit "shaky".
2017-02-07 17:05:17 +01:00
James Ross-Gowan e0250b9604 vo_opengl: angle: rewrite with custom swap chain
This replaces the old backend that exclusively used EGL windowing with
one that can also use ANGLE's ability to render to directly to a
texture. The advantage of this is that it allows mpv to create the swap
chain itself and this allows mpv to use a flip-mode swap chain on a HWND
(which avoids problems with DirectComposition) and to use a longer swap
chain that has six backbuffers by default (which reportedly fixes
problems with rendering 24fps video on 24Hz monitors.)

Also, "screenshot window" should now work on DXGI 1.2 and up (Windows 8
and up.)
2017-02-07 22:45:07 +11:00