Compare commits

...
37 Commits
Author SHA1 Message Date
Alessandro Ghedini 5b6a67bf76 Release 0.5.3 2014-09-10 19:34:45 +02:00
Alessandro Ghedini 41f2ad33e5 player: fix build
This fixes a build failure introduced by c269fa1.
2014-09-10 19:32:54 +02:00
Alessandro Ghedini 27996bf1de Release 0.5.2 2014-09-09 12:18:47 +02:00
wm4 e3d3a47c0d stream_lavf: assume icy title data is terminated with ';'
Should fix #1071.
2014-09-06 14:32:24 +02:00
wm4 b109d20ef7 audio/out: make EOF handling properly event-based
With --gapless-audio=no, changing from one file to the next apparently
made it hang, until the player was woken up by unrelated events like
input. The reason was that the AO doesn't notify the player of EOF
properly. the played was querying ao_eof_reached(), and then just went
to sleep, without anything waking it up.

Make it event-based: the AO wakes up the playloop if the EOF state
changes.

We could have fixed this in a simpler way by synchronously draining the
AO in these cases. But I think proper event handling is preferable.

Fixes: #1069
CC: @mpv-player/stable (perhaps)
2014-09-06 00:22:07 +02:00
wm4 3c7d49c38f audio: correctly initialize output buffer
Just like the previous commit, this takes care of fallout from commit
7ab228, which fixed a bug, but introduced some new ones.

CC: @mpv-player/stable
2014-09-05 21:16:59 +02:00
James Ross-Gowan 0ba2da8a76 player: check for null in resume config search
Signed-off-by: wm4 <wm4@nowhere>

CC: @mpv-player/stable
2014-09-05 21:16:53 +02:00
wm4 1871f2a703 audio: fix obscure audio resync failure with timelines
Somehow, there was a larger misunderstanding in the code: ao_buffer
does not need to be preserved over audio reinit for proper support of
gapless audio. The actual AO internal buffer takes care of this.

In fact, preserving ao_buffer just breaks audio resync. In the ordered
chapter case, end_pts is used, which means not all audio data in the
buffer is played, thus some data is left over when audio decoding
resumes on the next segment. This triggers some code that aborts resync
if there's "audio decoded" (ao_buffer contains something), but no PTS
is known (nothing was actually decoded yet).

Simplify, and always bind the output buffer to the decoder.

CC: @mpv-player/stable (maybe)
2014-09-05 12:01:26 +02:00
wm4 4a8e5ea269 build: handle insane libavcodec API bullshit
The oldest supported FFmpeg release doesn't provide
av_vdpau_alloc_context(). With these versions, the application has no
other choice than to hard code the size of AVVDPAUContext. (On the other
hand, there's av_alloc_vdpaucontext(), which does the same thing, but is
FFmpeg specific - not sure if it was available early enough, so I'm not
touching it.)

Newer FFmpeg and Libav releases require you to call this function, for
ABI compatibility reasons. It's the typcal lakc of foresight that make
FFmpeg APIs terrible. mpv successfully pretended that this crap didn't
exist (ABI compat. is near impossible to reach anyway) - but it appears
newer developments in Libav change the function from initializing the
struct with all-zeros to something else, and mpv vdpau decoding would
stop working as soon as this new work is relewased.

So, add a configure test (sigh).

CC: @mpv-player/stable
2014-09-05 12:01:22 +02:00
wm4 367665b4c4 demux_mkv: allow up to 256 MB of extradata to make broken files work
What the flying fuck?

Unfortunately, these are already in the wild.

CC: @mpv-player/stable
2014-09-05 12:01:17 +02:00
wm4 46437e96c6 path: remove XDG bullshit
Don't worry, your ~/.config/... paths are safe. This merely removes
handling of $XDG_CONFIG_DIRS for global paths.

Maybe there is a better solution for this, like still including the
"traditional" config dir. But I will leave the fine reading of this
(crappy) spec and fixing the code accordingly to someone else. So, if
anyone has interest in getting this behavior back, you will have to
write a patch. This patch should _also_ not break expected behavior.

Fixes #1060.
2014-09-03 23:22:08 +02:00
wm4 29d3bbdaa2 player: properly resume playlists loaded at runtime
If a playlist is loaded from the internal playlist (like
"mpv playlist.m3u"), then attempt to resume from it.

CC: @mpv-player/stable
2014-09-03 23:21:36 +02:00
Alexander Preisinger 16c3b27d0a gl_wayland: fix crash after eglInitialze failed
Only execute most of the opengl termination procedure if we actually have an
egl context.
2014-09-01 17:13:24 +02:00
Martin Herkt f8dc208d0c man: fix a whole bunch of typos
Conflicts:
	DOCS/man/input.rst
	DOCS/man/options.rst
2014-09-01 14:53:55 +02:00
wm4 6d006a5a39 playlist: don't add the base path twice
Loading a playlist with --playlist from a sub-directory added the
playlist's base path twice: one time in the playlist demuxer, and then
again in playlist_parse_file(). The latter function is used only for
--playlist, so it worked when loading the playlist directly.

(This is probably a mess-up when the MPlayer playlist parsers were
replaced with newer code.)

CC: @mpv-player/stable
2014-09-01 14:48:23 +02:00
wm4 6a355959d9 audio/out: prevent burning CPU when seeking while paused
The audio/video sync code in player/audio.c calls ao_reset() each time
audio decoding is entered, but the player is paused, and there would be
more than 1 sample to skip to make audio start match with video start.
This caused a wakeup feedback loop with push.c.

CC: @mpv-player/stable
2014-09-01 14:48:17 +02:00
wm4 36bdbbe716 x11: when using --wid, inherit event flags from parent window
When embedding a X window, it's hard to control whether it receives
mouse/keyboard input or not. It seems the X protocol itself makes this
hard (basically due to the outdated design mismatching with modern
toolkits), and we have to take care of these things explicitly.

Simply do this by manually querying and using the parent window event
flags.

This restores some MPlayer behavior (it doesn't add back exactly the
same code, but it's very similar).

This probably has some potential to interfere with libmpv embedding, so
bump the client API minor.

CC: @mpv-player/stable (if applied, client-api-changes.rst has to be
    adjusted to include the 0.5.2 release)
2014-09-01 14:48:01 +02:00
wm4 c269fa1609 player: fix quit handling when seeking past EOF while paused
The player didn't quit when seeking past EOF in audio-only mode while
paused. The only case when we don't want to quit is when the last video
frame is displayed while paused.

This logic was probably broken a while ago, but I'm not exactly sure.

CC: @mpv-player/stable

Conflicts:
	player/playloop.c
2014-08-31 00:19:40 +02:00
wm4 0f1d6c09e0 audio: restore old speed change behavior
Don't attempt to resync after speed changes. Note that most other cases
of audio reinit (like switching tracks etc.) still resync, but other
code paths take care of setting the audio_status accordingly.

This restores the old behavior of not trying to fix audio desync, which
was probably changed with commit 261506e3.

Note that the code as of now wasn't even entirely correct, since the A/V
sync values are slightly shifted. The dsync depends on the audio buffer
size, so a larger buffer size will show more extreme desync. Also see
mplayer2 commit 213a224e, which should fixed this - it was not merged
into mpv, because it disabled audio for too long, resulting in a worse
user experience. This is similar to the issue this commit attempts to
fix.

Fixes: #1042 (probably)
CC: @mpv-player-stable
2014-08-28 18:10:32 +02:00
Alessandro Ghedini b677937c27 Release 0.5.1 2014-08-26 10:27:40 +02:00
Otto Modinos fdd648bdf9 manpage: mention that mp.commandv doesn't expand properties
The little lua snippet at #488 as well as the actual implementation
seems to indicate that not expanding properties is indeed the correct
behavior.  Document that.

Signed-off-by: wm4 <wm4@nowhere>
2014-08-26 10:24:21 +02:00
Stefano Pigozzi 334fd10f1c coreaudio_device: fix overwriting of user input
Fixes #1030
2014-08-25 11:24:01 +02:00
wm4 226735331c options: compatibility hack for --slave-broken
Seems some programs were still relying on it. Whatever, it's not hard to
support.

CC: @mpv-player/stable
2014-08-25 11:23:30 +02:00
wm4 5523370ab9 player: don't clobber playback position on video end
If video reaches EOF, and audio is also EOF (or is otherwise not
meaningful, like audio disabled), then the playback position was briefly
set to 0. Fix this by not trying to use a bogus audio PTS.

CC: @mpv-player/stable (maybe)
2014-08-25 11:23:26 +02:00
Bin Jin 8c7d61f1d9 manpage: remove duplicated content
Probably be accidentally added in b6b8bffd.

CC: @mpv-player/stable
Signed-off-by: wm4 <wm4@nowhere>
2014-08-25 11:23:05 +02:00
wm4 f021b5a379 etc/mpv.desktop: add audio/flac mimetype
Fixes #1025.

CC: @mpv-player/stable
2014-08-21 15:16:58 +02:00
wm4 43e164964c manpage: fix opengl-hq defaults
The FBO format was changed some time ago.

CC: @mpv-player/stable
2014-08-18 11:14:48 +02:00
Philip Sequeira aeb64723fd TOOLS/zsh.pl: protect global environment 2014-08-17 14:14:48 +02:00
Philip Sequeira f935838b2d TOOLS/zsh.pl: fix a ret that hadn't been changed to rc 2014-08-17 14:14:30 +02:00
Alessandro Ghedini ec46ad79e2 TOOLS/zsh.pl: properly set the return value
The previous commit made the completion script always return non-zero, even when
a match is found. This explicitly sets the return value to zero whenever a match
is found but defaults to non-zero in case nothing is matched.
2014-08-15 16:31:18 +02:00
c_14 d6ccc4d8de TOOLS/zsh.pl: properly return non-zero when no matches are found
Returning a non-zero value signals to the zsh completion system that no matches
were added by the script so that it can try the user-defined matchers (e.g.
those defined with matcher-list).

Fixes #1008.
2014-08-13 23:00:36 +02:00
Alexander Preisinger 8664dc3c47 wayland: pointer interface is created after theme
Just always load the theme. It gets freed properly and dosn't bother anyone.

Fixes #1012.

CC: @mpv-player/stable
2014-08-13 23:00:26 +02:00
wm4 51ce535822 player: don't quit with --loop-file
Fixes #1009.

CC: @mpv-player/stable
2014-08-13 23:00:21 +02:00
Alessandro Ghedini e33df9b7bc vdpau: correctly mark invalid mixer as such on vdp_video_mixer_create() failure
Otherwise vdp_video_mixer_destroy() would later fail when called on an invalid
video mixer handle. With mesa r600 vdpau driver, this would cause a segfault.
2014-08-13 19:16:53 +02:00
wm4 6310bd60e6 vo_vdpau: fix screenshots with anamorphic video
Fixes #1007.

CC: @mpv-player/stable
2014-08-13 10:55:49 +02:00
wm4 6729e39983 DOCS: mark the recent release in client-api-changes.rst
Also add instructions to release-policy.md, since this can be easily
forgotten.

CC: @mpv-player/stable
2014-08-13 10:55:44 +02:00
Alessandro Ghedini 88f247c0af Release 0.5.0 2014-08-12 10:50:38 +02:00
43 changed files with 483 additions and 261 deletions

No files matched your search

+3
View File
@@ -25,6 +25,9 @@ API changes
::
--- mpv 0.5.2 is released ---
1.4 - subtle change in X11 and "--wid" behavior
--- mpv 0.5.0 is released ---
1.3 - add MPV_MAKE_VERSION()
1.2 - remove "stream-time-pos" property (no replacement)
1.1 - remap dvdnav:// to dvd://
+14 -14
View File
@@ -72,7 +72,7 @@ Available filters are:
``tospdif=<yes|no>``
Output raw AC-3 stream if ``no``, output to S/PDIF for
passthrough if ``yes`` (default).
pass-through if ``yes`` (default).
``bitrate=<rate>``
The bitrate use for the AC-3 stream. Set it to 384 to get 384 kbps.
@@ -101,7 +101,7 @@ Available filters are:
Sine function delta, use very low values to hear the sweep.
``sinesuppress[=freq:decay]``
Remove a sine at the specified frequency. Useful to get rid of the 50/60Hz
Remove a sine at the specified frequency. Useful to get rid of the 50/60 Hz
noise on low quality audio equipment. It only works on mono input.
``<freq>``
@@ -182,7 +182,7 @@ Available filters are:
``mpv --af=equalizer=11:11:10:5:0:-12:0:5:12:12 media.avi``
Would amplify the sound in the upper and lower frequency region
while canceling it almost completely around 1kHz.
while canceling it almost completely around 1 kHz.
``channels=nch[:routes]``
Can be used for adding, removing, routing and copying audio channels. If
@@ -277,8 +277,8 @@ Available filters are:
once for every audio stream.
``<volumedb>``
Sets the desired gain in dB for all channels in the stream from -200dB
to +60dB, where -200dB mutes the sound completely and +60dB equals a
Sets the desired gain in dB for all channels in the stream from -200 dB
to +60 dB, where -200 dB mutes the sound completely and +60 dB equals a
gain of 1000 (default: 0).
``replaygain-track``
Adjust volume gain according to the track-gain replaygain value stored
@@ -311,7 +311,7 @@ Available filters are:
.. admonition:: Example
``mpv --af=volume=10.1 media.avi``
Would amplify the sound by 10.1dB and hard-clip if the sound level
Would amplify the sound by 10.1 dB and hard-clip if the sound level
is too high.
``pan=n:[<matrix>]``
@@ -368,8 +368,8 @@ Available filters are:
to the subwoofer.
``<fc>``
cutoff frequency in Hz for the low-pass filter (20Hz to 300Hz)
(default: 60Hz) For the best result try setting the cutoff frequency
cutoff frequency in Hz for the low-pass filter (20 Hz to 300 Hz)
(default: 60 Hz) For the best result try setting the cutoff frequency
as low as possible. This will improve the stereo or surround sound
experience.
``<ch>``
@@ -381,7 +381,7 @@ Available filters are:
.. admonition:: Example
``mpv --af=sub=100:4 --audio-channels=5 media.avi``
Would add a subwoofer channel with a cutoff frequency of 100Hz to
Would add a subwoofer channel with a cutoff frequency of 100 Hz to
output channel 4.
``center``
@@ -409,7 +409,7 @@ Available filters are:
.. admonition:: Example
``mpv --af=surround=15 --audio-channels=4 media.avi``
Would add surround sound decoding with 15ms delay for the sound to
Would add surround sound decoding with 15 ms delay for the sound to
the rear speakers.
``delay[=[ch1,ch2,...]]``
@@ -437,8 +437,8 @@ Available filters are:
.. admonition:: Example
``mpv --af=delay=[10.5,10.5,0,0,7,0] media.avi``
Would delay front left and right by 10.5ms, the two rear channels
and the subwoofer by 0ms and the center channel by 7ms.
Would delay front left and right by 10.5 ms, the two rear channels
and the subwoofer by 0 ms and the center channel by 7 ms.
``export=mmapped_file:nsamples]``
Exports the incoming signal to other processes using memory mapping
@@ -588,7 +588,7 @@ Available filters are:
tempo.
``mpv --af=scaletempo=stride=30:overlap=.50:search=10 media.ogg``
Would tweak the quality and performace parameters.
Would tweak the quality and performance parameters.
``mpv --af=format=float,scaletempo media.ogg``
Would make scaletempo use float code. Maybe faster on some
@@ -600,7 +600,7 @@ Available filters are:
1.2x.
``lavfi=graph``
Filter audio using ffmpeg's libavfilter.
Filter audio using FFmpeg's libavfilter.
``<graph>``
Libavfilter graph. See ``lavfi`` video filter for details - the graph
+1 -1
View File
@@ -23,7 +23,7 @@ normal driver parameters.
where PulseAudio is used. On Windows, ``--ao=wasapi`` is preferred,
though it might cause trouble sometimes, in which case ``--ao=dsound``
should be used. On BSD systems, ``--ao=oss`` or `--ao=sndio`` may work
(the latter being experimental). On OSX systems, use ``--ao=coreaudio``.
(the latter being experimental). On OS X systems, use ``--ao=coreaudio``.
.. admonition:: Examples
+18 -16
View File
@@ -19,14 +19,14 @@ General Changes for MPlayer to mpv
Linux 2.4 (including VIDIX)
* Large internal cleanups
* Removal of support for dead platforms
* New buildsystem
* No embedded copy of ffmpeg and other libraries
* New build system
* No embedded copy of FFmpeg and other libraries
* Better pause handling (do not unpause on a command)
* Better MKV support (such as ordered chapters)
* vo_vdpau improvements
* Precise seeking support
* Native OpenGL backend for OSX
* General OSX improvements
* Native OpenGL backend for OS X
* General OS X improvements
* Improvements in audio/video sync handling
* Cleaned up terminal output
* Gapless audio support (``--gapless-audio``)
@@ -35,14 +35,14 @@ General Changes for MPlayer to mpv
* OSS4 volume control
* More correct color reproduction (color matrix generation)
* Use libass for subtitle rendering by default (better quality)
* Generally preferring ffmpeg/libav over internal demuxers and decoders
* Generally preferring FFmpeg/Libav over internal demuxers and decoders
* Improvements when playing multiple files (``--fixed-vo``)
* Screenshot improvements (instant screenshots without 1-frame delay, allow
taking screenshots even with hardware decoding)
* Improved support for PulseAudio
* Generally improved MS Windows support (dealing with unicode filenames,
* Generally improved MS Windows support (dealing with Unicode file names,
improved ``--vo=direct3d``, improved window handling)
* Better OSD rendering (using libass). This has full unicode support, and
* Better OSD rendering (using libass). This has full Unicode support, and
languages like Arabic should be better supported.
* Cleaned up terminal output (nicer status line, less useless noise)
* Support for playing URLs of popular streaming sites directly
@@ -50,19 +50,19 @@ General Changes for MPlayer to mpv
* Improved OpenGL output (``--vo=opengl-hq``)
* Make ``--softvol`` default (**mpv** is not a mixer control panel)
* Improved support for .cue files
* Screenshot improvements (can save screenshots as JPG or PNG, configurable
filenames, support for taking screenshots with or without subtitles - the
* Screenshot improvements (can save screenshots as JPEG or PNG, configurable
file names, support for taking screenshots with or without subtitles - the
``screenshot`` video filter is not needed anymore, and should not be put
into the mpv config file)
* Removal of teletext support
* Removal of most builtin demuxers, using libavformat instead
* Removal of builtin network support, using libavformat instead (also,
* Removal of most built-in demuxers, using libavformat instead
* Removal of built-in network support, using libavformat instead (also,
support https via libavformat)
* Replace image VOs (``--vo=jpeg`` etc.) with ``--vo=image``
* Do not lose settings when playing a new file in the same player instance
* New location for config files, new name for the binary.
* Slave mode compatibility broken (see below)
* Encoding functionality (replacement for mencoder, see ``DOCS/encoding.rst``)
* Encoding functionality (replacement for MEncoder, see ``DOCS/encoding.rst``)
* Remove ``--vo=gif89a``, ``--vo=md5sum``, ``--vo=yuv4mpeg``, as encoding can
handle these use cases. For yuv4mpeg, for example, use:
``mpv input.mkv -o output.y4m --no-audio --oautofps --oneverdrop``.
@@ -71,10 +71,10 @@ General Changes for MPlayer to mpv
* Wayland support
* Support for precise scrolling which scales the parameter of commands. If the
input doesn't support precise scrolling the scale factor stays 1.
* OSX: Cocoa event loop is independent from mplayer's event loop, so user
* OS X: Cocoa event loop is independent from MPlayer's event loop, so user
actions like accessing menus and live resizing do not block the playback.
* OSX: Apple Remote support.
* OSX: Media Keys support.
* OS X: Apple Remote support.
* OS X: Media Keys support.
* Windows: Added WASAPI audio output.
* New OSD bar with chapter marks and not positioned in the middle of the video
(though this can be customized with the ``--osd-bar-align-y`` option).
@@ -99,7 +99,7 @@ General Changes for MPlayer to mpv
* Allow changing/adjusting video filters at runtime. (This is also used to make
the ``D`` key insert vf_yadif if deinterlacing is not supported otherwise.)
* Native VAAPI support
* OSX: VDA support using libavcodec hwaccel API insted of FFmpeg's decoder. Up
* OS X: VDA support using libavcodec hwaccel API instead of FFmpeg's decoder. Up
to 2-2.5x reduction in CPU usage.
* Make hardware decoding in general work with the ``opengl`` video output.
* Lua scripting (see `LUA SCRIPTING`_)
@@ -332,6 +332,8 @@ Slave mode
Assuming the system supports ``/dev/stdin``.
(The option was readded in 0.5.1 and sets exactly these options.)
* A JSON RPC protocol giving access to the client API is planned, but nothing
has emerged yet.
+2 -2
View File
@@ -38,7 +38,7 @@ You can encode files from one format/codec to another using this facility.
``--oautofps``
Sets the output format time base to the guessed frame rate of the input
video (simulates mencoder behavior, useful for AVI; may cause frame drops).
video (simulates MEncoder behavior, useful for AVI; may cause frame drops).
Note that not all codecs and not all formats support VFR encoding, and some
which do have bugs when a target bitrate is specified - use ``--ofps`` or
``--oautofps`` to force CFR encoding in these cases.
@@ -74,7 +74,7 @@ You can encode files from one format/codec to another using this facility.
.. admonition:: Example
"``--oac=libmp3lame --oacopts=b=128000``"
selects 128kbps MP3 encoding.
selects 128 kbps MP3 encoding.
Options are managed in lists. There are a few commands to manage the
options list.
+6 -6
View File
@@ -114,7 +114,7 @@ List of Input Commands
to be precise, not fast), and sometimes fails to behave as expected. How
well this works depends on whether precise seeking works correctly (e.g.
see the ``--hr-seek-demuxer-offset`` option). Video filters or other video
postprocessing that modifies timing of frames (e.g. deinterlacing) should
post-processing that modifies timing of frames (e.g. deinterlacing) should
usually work, but might make backstepping silently behave incorrectly in
corner cases. Using ``--hr-seek-framedrop=no`` should help, although it
might make precise seeking slower.
@@ -572,7 +572,7 @@ Property list
See ``--osd-level``.
``osd-scale`` (RW)
OSD font size multiplicator, see ``--osd-scale``.
OSD font size multiplier, see ``--osd-scale``.
``loop`` (RW)
See ``--loop``.
@@ -765,7 +765,7 @@ Property list
::
MPV_FORMAT_NODE_MAP
(key and string value for each metdata entry)
(key and string value for each metadata entry)
``chapter-metadata``
Metadata of current chapter. Works similar to ``metadata`` property. It
@@ -809,7 +809,7 @@ Property list
this easier, the cache resizing code will allocate the new cache while the
old cache is still allocated.
Don't use this when playing DVD or Bluray.
Don't use this when playing DVD or Blu-ray.
``cache-free`` (R)
Total free cache size in KB.
@@ -1025,7 +1025,7 @@ Property list
Estimated/measured FPS of the video filter chain output. (If no filters
are used, this corresponds to decoder output.) This uses the average of
the 10 past frame durations to calculate the FPS. It will be inaccurate
if framedropping is involved (such as when framedrop is explicitly
if frame-dropping is involved (such as when framedrop is explicitly
enabled, or after precise seeking). Files with imprecise timestamps (such
as Matroska) might lead to unstable results.
@@ -1090,7 +1090,7 @@ Property list
See ``--sub-forced-only``.
``sub-scale`` (RW)
Subtitle font size multiplicator.
Subtitle font size multiplier.
``ass-use-margins`` (RW)
See ``--ass-use-margins``.
+13 -9
View File
@@ -2,7 +2,7 @@ LUA SCRIPTING
=============
mpv can load Lua scripts. Scripts in ``~/.mpv/lua/`` will be loaded on program
start, or if passed to ``--lua``. mpv provides the builtin module ``mp``, which
start, or if passed to ``--lua``. mpv provides the built-in module ``mp``, which
provides functions to send commands to the mpv core and to retrieve information
about playback state, user settings, file information, and so on.
@@ -74,6 +74,10 @@ The ``mp`` module is preloaded, although it can be loaded manually with
These two commands are equivalent, except that the first version breaks
if the filename contains spaces or certain special characters.
Note that properties are *not* expanded. You can use either ``mp.command``,
the ``expand-properties`` prefix, or the ``mp.get_property`` family of
functions.
``mp.get_property(name [,def])``
Return the value of the given property as string. These are the same
properties as used in input.conf. See `Properties`_ for a list of
@@ -94,9 +98,9 @@ The ``mp`` module is preloaded, although it can be loaded manually with
will always result in a string.
``mp.get_property_bool(name [,def])``
Similar to ``mp.get_property``, but return the property value as boolean.
Similar to ``mp.get_property``, but return the property value as Boolean.
Returns a boolean on success, or ``def, error`` on error.
Returns a Boolean on success, or ``def, error`` on error.
``mp.get_property_number(name [,def])``
Similar to ``mp.get_property``, but return the property value as number.
@@ -109,7 +113,7 @@ The ``mp`` module is preloaded, although it can be loaded manually with
``mp.get_property_native(name [,def])``
Similar to ``mp.get_property``, but return the property value using the best
Lua type for the property. Most time, this will return a string, boolean,
Lua type for the property. Most time, this will return a string, Boolean,
or number. Some properties (for example ``chapter-list``) are returned as
tables.
@@ -124,7 +128,7 @@ The ``mp`` module is preloaded, although it can be loaded manually with
``mp.set_property_bool(name, value)``
Similar to ``mp.set_property``, but set the given property to the given
boolean value.
Boolean value.
``mp.set_property_number(name, value)``
Similar to ``mp.set_property``, but set the given property to the given
@@ -159,7 +163,7 @@ The ``mp`` module is preloaded, although it can be loaded manually with
(e.g. ``ctrl+a``).
After calling this function, key presses will cause the function ``fn`` to
be called (unless the user overmapped the key with another binding).
be called (unless the user remapped the key with another binding).
The ``name`` argument should be a short symbolic string. It allows the user
to remap the key binding via input.conf using the ``script_message``
@@ -197,7 +201,7 @@ The ``mp`` module is preloaded, although it can be loaded manually with
This will print the message when the key ``y`` is pressed. (``x`` will
still work, unless the user overmaps it.)
still work, unless the user remaps it.)
You can also explicitly send a message to a named script only. Assume the
above script was using the filename ``fooscript.lua``:
@@ -311,7 +315,7 @@ The ``mp`` module is preloaded, although it can be loaded manually with
``oneshot`` (RW)
Whether the timer is periodic (``false``) or fires just once
(``true``). This value is used when the timer expires (but before
the timer calback function fn is run).
the timer callback function fn is run).
``mp.get_opt(key)``
@@ -373,7 +377,7 @@ are useful only in special situations.
control what the Lua script does (instead of being called by the default
event loop), you can set the global variable ``mp_event_loop`` to your
own function running the event loop. From your event loop, you should call
``mp.dispatch_events()`` to unqueue and dispatch mpv events.
``mp.dispatch_events()`` to dequeue and dispatch mpv events.
If the ``allow_wait`` parameter is set to ``true``, the function will block
until the next event is received or the next timer expires. Otherwise (and
+4 -4
View File
@@ -163,7 +163,7 @@ corresponding adjustment, or the software equalizer (``--vf=eq``).)
7 and 8
Adjust saturation.
(The following keys are valid only on OSX.)
(The following keys are valid only on OS X.)
command + 0
Resize video window to half its original size.
@@ -419,8 +419,8 @@ PROTOCOLS
Play a path from Samba share.
``bd://[title][/device]`` ``--bluray-device=PATH``
Play a Blu-Ray disc. Currently, this does not accept iso files. Instead,
you must mount the iso file as filesystem, and point ``--bluray-device``
Play a Blu-Ray disc. Currently, this does not accept ISO files. Instead,
you must mount the ISO file as filesystem, and point ``--bluray-device``
to the mounted directly.
``bdnav://[title][/device]``
@@ -672,7 +672,7 @@ Play only chapters 5, 6, 7:
Play only titles 5, 6, 7:
``mpv dvd://5-7``
Play a multiangle DVD:
Play a multi-angle DVD:
``mpv dvd://1 --dvd-angle=2``
Play from a different DVD device:
+33 -62
View File
@@ -245,8 +245,8 @@ Playback Control
Without ``--hr-seek``, skipping will snap to keyframes.
Program Behaviour
-----------------
Program Behavior
----------------
``--help``
Show short summary of options.
@@ -332,7 +332,7 @@ Program Behaviour
``--merge-files``
Pretend that all files passed to mpv are concatenated into a single, big
file. This uses timeline/EDL support internally. Note that this won't work
for ordered chapter files or quvi-resolved URLs (such as youtube links).
for ordered chapter files or quvi-resolved URLs (such as YouTube links).
This option is interpreted at program start, and doesn't affect for
example files or playlists loaded with the ``loadfile`` or ``loadlist``
@@ -453,7 +453,7 @@ Video
:vdpau: requires ``--vo=vdpau`` or ``--vo=opengl`` (Linux only)
:vaapi: requires ``--vo=opengl`` or ``--vo=vaapi`` (Linux with Intel GPUs only)
:vaapi-copy: copies video back into system RAM (Linux with Intel GPUs only)
:vda: requires ``--vo=opengl`` or ``--vo=corevideo`` (OSX only)
:vda: requires ``--vo=opengl`` or ``--vo=corevideo`` (OS X only)
``auto`` tries to automatically enable hardware decoding using the first
available method. This still depends what VO you are using. For example,
@@ -750,7 +750,7 @@ Audio
.. admonition:: Examples
``--ad=lavc:mp3float``
Prefer the FFmpeg/Libav ``mp3float`` decoder over all other mp3
Prefer the FFmpeg/Libav ``mp3float`` decoder over all other MP3
decoders.
``--ad=spdif:ac3,lavc:*``
@@ -821,12 +821,12 @@ Audio
welcome. A full list of AVOptions can be found in the FFmpeg manual.
``--ad-spdif-dtshd=<yes|no>``, ``--dtshd``, ``--no-dtshd``
When using DTS passthrough, output any DTS-HD track as-is.
When using DTS pass-through, output any DTS-HD track as-is.
With ``ad-spdif-dtshd=no`` (the default), only the DTS Core parts will be
output.
DTS-HD tracks can be sent over HDMI but not over the original
coax/toslink S/PDIF system.
coax/TOSLINK S/PDIF system.
Some receivers don't accept DTS core-only when ``--ad-spdif-dtshd=yes`` is
used, even though they accept DTS-HD.
@@ -1136,7 +1136,7 @@ Subtitles
``--ass-vsfilter-color-compat=<basic|full|force-601|no>``
Mangle colors like (xy-)vsfilter do (default: basic). Historically, VSFilter
was not colorspace aware. This was no problem as long as the colorspace
was not color space aware. This was no problem as long as the color space
used for SD video (BT.601) was used. But when everything switched to HD
(BT.709), VSFilter was still converting RGB colors to BT.601, rendered
them into the video frame, and handled the frame to the video output, which
@@ -1146,16 +1146,16 @@ Subtitles
:basic: Handle only BT.601->BT.709 mangling, if the subtitles seem to
indicate that this is required (default).
:full: Handle the full ``YCbCr Matrix`` header with all video colorspaces
:full: Handle the full ``YCbCr Matrix`` header with all video color spaces
supported by libass and mpv. This might lead to bad breakages in
corner cases and is not strictly needed for compatibility
(hopefully), which is why this is not default.
:force-601: Force BT.601->BT.709 mangling, regardless of subtitle headers
or video colorspace.
or video color space.
:no: Disable color mangling completely. All colors are RGB.
Choosing anything other than ``no`` will make the subtitle color depend on
the video colorspace, and it's for example in theory not possible to reuse
the video color space, and it's for example in theory not possible to reuse
a subtitle script with another video file. The ``--ass-style-override``
option doesn't affect how this option is interpreted.
@@ -1177,7 +1177,7 @@ Subtitles
Many studios tend to use bitmap fonts designed for square pixels when
authoring DVDs, causing the fonts to look stretched on playback on DVD
players. This option fixes them, however at the price of possibly
misaligning sume subtitles (e.g. sign translations).
misaligning some subtitles (e.g. sign translations).
Disabled by default.
@@ -1284,7 +1284,7 @@ Subtitles
Also see ``--sub-speed`` option.
``--sub-gauss=<0.0-3.0>``
Apply gaussian blur to image subtitles (default: 0). This can help making
Apply Gaussian blur to image subtitles (default: 0). This can help making
pixelated DVD/Vobsubs look nicer. A value other than 0 also switches to
software subtitle scaling. Might be slow.
@@ -1357,7 +1357,7 @@ Window
``--fs-screen=<all|current|0-32>``
In multi-monitor configurations (i.e. a single desktop that spans across
multiple displays), this option tells mpv which screen to go fullscreen to.
If ``default`` is provided mpv will fallback on using the behaviour
If ``default`` is provided mpv will fallback on using the behavior
depending on what the user provided with the ``screen`` option.
.. admonition:: Note (X11)
@@ -1367,7 +1367,7 @@ Window
.. admonition:: Note (OS X)
``all`` does not work on OSX and will behave like ``current``.
``all`` does not work on OS X and will behave like ``current``.
See also ``--screen``.
@@ -1429,7 +1429,7 @@ Window
.. admonition: Note (OS X)
On Mac OSX the origin of the screen coordinate system is located on the
On Mac OS X the origin of the screen coordinate system is located on the
bottom-left corner. For instance, ``0:0`` will place the window at the
bottom-left of the screen.
@@ -1544,35 +1544,6 @@ Window
depending on GPU drivers and hardware. For other VOs, this just makes
rendering slower.
``--fs-missioncontrol``
(OS X only)
Use OS X Mission Control's fullscreen feature instead of the custom one
provided by mpv. This can potentially break a lot of stuff like
``--geometry`` and is disabled by default. On the other hand it provides
a more 'OS X-like' user experience.
``--cursor-autohide=<number|no|always>``
Make mouse cursor automatically hide after given number of milliseconds.
``no`` will disable cursor autohide. ``always`` means the cursor will stay
hidden.
``--cursor-autohide-fs-only``
If this option is given, the cursor is always visible in windowed mode. In
fullscreen mode, the cursor is shown or hidden according to
``--cursor-autohide``.
``--no-fixed-vo``, ``--fixed-vo``
``--no-fixed-vo`` enforces closing and reopening the video window for
multiple files (one (un)initialization for each file).
``--force-rgba-osd-rendering``
Change how some video outputs render the OSD and text subtitles. This
does not change appearance of the subtitles and only has performance
implications. For VOs which support native ASS rendering (like ``vdpau``,
``opengl``, ``direct3d``), this can be slightly faster or slower,
depending on GPU drivers and hardware. For other VOs, this just makes
rendering slower.
``--force-window-position``
Forcefully move mpv's video output window to default location whenever
there is a change in video parameters, video stream or file. This used to
@@ -1835,7 +1806,7 @@ Equalizer
such as PC monitors use full range color levels. However, some TVs and
video monitors expect studio RGB levels. Providing full range output to a
device expecting studio level input results in crushed blacks and whites,
the reverse in dim grey blacks and dim whites.
the reverse in dim gray blacks and dim whites.
The same limitations as with ``--colormatrix`` apply.
@@ -1971,7 +1942,7 @@ Demuxer
Sample format for ``--demuxer=rawaudio`` (default: s16le).
``--demuxer-rawaudio-rate=<value>``
Sample rate for ``--demuxer=rawaudio`` (default: 44KHz).
Sample rate for ``--demuxer=rawaudio`` (default: 44 kHz).
``--demuxer-rawvideo-fps=<value>``
Rate in frames per second for ``--demuxer=rawvideo`` (default: 25.0).
@@ -1987,11 +1958,11 @@ Demuxer
--demuxer-rawvideo=w=720:h=576
``--demuxer-rawvideo-format=<value>``
Colorspace (fourcc) in hex or string for ``--demuxer=rawvideo``
Color space (fourcc) in hex or string for ``--demuxer=rawvideo``
(default: ``YV12``).
``--demuxer-rawvideo-mp-format=<value>``
Colorspace by internal video format for ``--demuxer=rawvideo``. Use
Color space by internal video format for ``--demuxer=rawvideo``. Use
``--demuxer-rawvideo-mp-format=help`` for a list of possible formats.
``--demuxer-rawvideo-codec=<value>``
@@ -2041,7 +2012,7 @@ Input
``~/.config/mpv/input.conf``.
``--no-input-default-bindings``
Disable mpv default (builtin) key bindings.
Disable mpv default (built-in) key bindings.
``--input-cmdlist``
Prints all commands that can be bound to keys.
@@ -2107,7 +2078,7 @@ Input
Specifies a configuration file for LIRC (default: ``~/.lircrc``).
``--input-media-keys``, ``--no-input-media-keys``
OSX only: Enabled by default. Enables/disable media keys support.
OS X only: Enabled by default. Enables/disable media keys support.
``--input-right-alt-gr``, ``--no-input-right-alt-gr``
(Cocoa and Windows only)
@@ -2257,7 +2228,7 @@ OSD
Default: 10.
``--osd-scale=<factor>``
OSD font size multiplicator, multiplied with ``--osd-font-size`` value.
OSD font size multiplier, multiplied with ``--osd-font-size`` value.
``--osd-scale-by-window=yes|no``
Whether to scale the OSD with the window size (default: yes). If this is
@@ -2301,7 +2272,7 @@ Screenshot
``--screenshot-template=<template>``
Specify the filename template used to save screenshots. The template
specifies the filename without file extension, and can contain format
specifiers, which will be substituted when taking a screeshot.
specifiers, which will be substituted when taking a screenshot.
By default the template is ``shot%n``, which results in filenames like
``shot0012.png`` for example.
@@ -2414,10 +2385,10 @@ Software Scaler
Default: ``bicubic``.
``--sws-lgb=<0-100>``
Software scaler gaussian blur filter (luma). See ``--sws-scaler``.
Software scaler Gaussian blur filter (luma). See ``--sws-scaler``.
``--sws-cgb=<0-100>``
Software scaler gaussian blur filter (chroma). See ``--sws-scaler``.
Software scaler Gaussian blur filter (chroma). See ``--sws-scaler``.
``--sws-ls=<-100-100>``
Software scaler sharpen filter (luma). See ``--sws-scaler``.
@@ -2496,7 +2467,7 @@ Terminal
``--term-osd-bar-chars=<string>``
Customize the ``--term-osd-bar`` feature. The string is expected to
consist of 5 characters (start, left space, position indicator,
right space, end). You can use unicode characters, but note that double-
right space, end). You can use Unicode characters, but note that double-
width characters will not be treated correctly.
Default: ``[-+-]``.
@@ -2713,7 +2684,7 @@ Cache
May be useful when playing files from slow media, but can also have
negative effects, especially with file formats that require a lot of
seeking, such as mp4.
seeking, such as MP4.
Note that half the cache size will be used to allow fast seeking back. This
is also the reason why a full cache is usually reported as 50% full. The
@@ -2750,7 +2721,7 @@ Cache
filled to this position rather than performing a stream seek (default:
500).
This matters for small forward seeks. With slow streams (especially http
This matters for small forward seeks. With slow streams (especially HTTP
streams) there is a tradeoff between skipping the data between current
position and seek destination, or performing an actual seek. Depending
on the situation, either of these might be slower than the other method.
@@ -2822,11 +2793,11 @@ Network
``--tls-ca-file=<filename>``
Certificate authority database file for use with TLS. (Silently fails with
older ffmpeg or libav versions.)
older FFmpeg or Libav versions.)
``--tls-verify``
Verify peer certificates when using TLS (e.g. with ``https://...``).
(Silently fails with older ffmpeg or libav versions.)
(Silently fails with older FFmpeg or Libav versions.)
``--referrer=<string>``
Specify a referrer path or URL for HTTP requests.
@@ -2894,8 +2865,8 @@ PVR
``--pvr-vmode=<value>``
Specify video encoding mode:
:vbr: Variable BitRate (default)
:cbr: Constant BitRate
:vbr: Variable Bit Rate (default)
:cbr: Constant Bit Rate
``--pvr-vpeak=<value>``
Specify peak video bitrate encoding in Mbps (only useful for VBR
+4 -4
View File
@@ -122,11 +122,11 @@ time remaining
left-click toggle between total and remaining time
============= ================================================
Keybindings
~~~~~~~~~~~
Key Bindings
~~~~~~~~~~~~
These keybindings are active by default if nothing else is already bound to
these keys. In case of collosision, the function needs to be bound to a
These key bindings are active by default if nothing else is already bound to
these keys. In case of collision, the function needs to be bound to a
different key. See `Script Commands`_ section.
============= ================================================
+13 -13
View File
@@ -93,7 +93,7 @@ Available filters are:
``scale[=w:h:param:param2:chr-drop:noup:arnd``
Scales the image with the software scaler (slow) and performs a YUV<->RGB
colorspace conversion (see also ``--sws``).
color space conversion (see also ``--sws``).
All parameters are optional.
@@ -120,9 +120,9 @@ Available filters are:
0.33:0.33 Mitchell-Netravali spline
1.00:0.00 cubic B-spline
--sws=7 (gaussian): sharpness (0 (soft) - 100 (sharp))
--sws=7 (Gaussian): sharpness (0 (soft) - 100 (sharp))
--sws=9 (lanczos): filter length (1-10)
--sws=9 (Lanczos): filter length (1-10)
``<chr-drop>``
chroma skipping
@@ -222,8 +222,8 @@ Available filters are:
====================== =====================
``noformat[=fmt]``
Restricts the colorspace for the next filter without doing any conversion.
Unlike the format filter, this will allow any colorspace except the one
Restricts the color space for the next filter without doing any conversion.
Unlike the format filter, this will allow any color space except the one
you specify.
.. note:: For a list of available formats, see ``noformat=fmt=help``.
@@ -232,7 +232,7 @@ Available filters are:
Format name, e.g. rgb15, bgr24, 420p, etc. (default: 420p).
``pp[=[filter1[:option1[:option2...]]/[-]filter2...]]``
Enables the specified chain of postprocessing subfilters. Subfilters must
Enables the specified chain of post-processing subfilters. Subfilters must
be separated by '/' and can be disabled by prepending a '-'. Each
subfilter and some options have a short and a long name that can be used
interchangeably, i.e. ``dr``/``dering`` are the same. All subfilters share
@@ -336,7 +336,7 @@ Available filters are:
filtering every second line with a (-1 4 2 4 -1) filter.
``l5/lowpass5``
Vertically applied FIR lowpass deinterlacing filter that deinterlaces
Vertically applied FIR low-pass deinterlacing filter that deinterlaces
the given block by filtering all lines with a (-1 2 6 2 -1) filter.
``fq/forceQuant[:quantizer]``
@@ -356,7 +356,7 @@ Available filters are:
.. note::
This filter is only available if FFmpeg/libav has been compiled
This filter is only available if FFmpeg/Libav has been compiled
with libpostproc enabled.
.. admonition:: Examples
@@ -443,7 +443,7 @@ Available filters are:
temporal noise (noise pattern changes between frames)
``uniform``
uniform noise (gaussian otherwise)
uniform noise (Gaussian otherwise)
``hq``
high quality (slightly better looking, slightly slower) - not available
@@ -503,7 +503,7 @@ Available filters are:
:1: linear interpolation (default)
``unsharp[=lx:ly:la:cx:cy:ca]``
unsharp mask / gaussian blur
unsharp mask / Gaussian blur
``l`` is for the luma component, ``c`` for the chroma component. ``x``/``y``
is the filter size. ``a`` is the amount.
@@ -769,8 +769,8 @@ Available filters are:
anaglyph red/cyan color (red filter on left eye, cyan filter on
right eye)
``arcd`` or ``anaglyph_red_cyan_dubois``
anaglyph red/cyan color optimized with the least squares
projection of dubois (red filter on left eye, cyan filter on right
anaglyph red/cyan color optimized with the least-squares
projection of Dubois (red filter on left eye, cyan filter on right
eye)
``agmg`` or ``anaglyph_green_magenta_gray``
anaglyph green/magenta gray (green filter on left eye, magenta
@@ -803,7 +803,7 @@ Available filters are:
``gradfun[=strength[:radius|:size=<size>]]``
Fix the banding artifacts that are sometimes introduced into nearly flat
regions by truncation to 8bit color depth. Interpolates the gradients that
regions by truncation to 8-bit color depth. Interpolates the gradients that
should go where the bands are, and dithers them.
``<strength>``
+24 -24
View File
@@ -38,36 +38,36 @@ Available video output drivers are:
.. note:: This driver is for compatibility with old systems.
``adaptor=<number>``
Select a specific XVideo adaptor (check xvinfo results).
Select a specific XVideo adapter (check xvinfo results).
``port=<number>``
Select a specific XVideo port.
``ck=<cur|use|set>``
Select the source from which the colorkey is taken (default: cur).
Select the source from which the color key is taken (default: cur).
cur
The default takes the colorkey currently set in Xv.
The default takes the color key currently set in Xv.
use
Use but do not set the colorkey from mpv (use the ``--colorkey``
Use but do not set the color key from mpv (use the ``--colorkey``
option to change it).
set
Same as use but also sets the supplied colorkey.
Same as use but also sets the supplied color key.
``ck-method=<man|bg|auto>``
Sets the colorkey drawing method (default: man).
Sets the color key drawing method (default: man).
man
Draw the colorkey manually (reduces flicker in some cases).
Draw the color key manually (reduces flicker in some cases).
bg
Set the colorkey as window background.
Set the color key as window background.
auto
Let Xv draw the colorkey.
Let Xv draw the color key.
``colorkey=<number>``
Changes the colorkey to an RGB value of your choice. ``0x000000`` is
Changes the color key to an RGB value of your choice. ``0x000000`` is
black and ``0xffffff`` is white.
``no-colorkey``
Disables colorkeying.
Disables color-keying.
``x11`` (X11 only)
Shared memory video output driver without hardware acceleration that works
@@ -82,7 +82,7 @@ Available video output drivers are:
.. note::
Earlier versions of mpv (and MPlayer, mplayer2) provided sub-options
to tune vdpau postprocessing, like ``deint``, ``sharpen``, ``denoise``,
to tune vdpau post-processing, like ``deint``, ``sharpen``, ``denoise``,
``chroma-deint``, ``pullup``, ``hqscaling``. These sub-options are
deprecated, and you should use the ``vdpaupp`` video filter instead.
@@ -173,7 +173,7 @@ Available video output drivers are:
to a YUV format before the VO. Sometimes useful to force availability
of certain YUV-only features, like video equalizer or deinterlacing.
Using the VDPAU frame queueing functionality controlled by the queuetime
Using the VDPAU frame queuing functionality controlled by the queuetime
options makes mpv's frame flip timing less sensitive to system CPU load and
allows mpv to start decoding the next frame(s) slightly earlier, which can
reduce jitter caused by individual slow-to-decode frames. However, the
@@ -282,7 +282,7 @@ Available video output drivers are:
Hardware decoding over OpenGL-interop is supported to some degree. Note
that in this mode, some corner case might not be gracefully handled, and
colorspace conversion and chroma upsampling is generally in the hand of
color space conversion and chroma upsampling is generally in the hand of
the hardware decoder APIs.
``lscale=<filter>``
@@ -349,7 +349,7 @@ Available video output drivers are:
green-magenta
Convert side by side input to full-color green-magenta stereo.
quadbuffer
Convert side by side input to quadbuffered stereo. Only supported
Convert side by side input to quad buffered stereo. Only supported
by very few OpenGL cards.
``srgb``
@@ -452,7 +452,7 @@ Available video output drivers are:
auto
auto-select (default)
cocoa
Cocoa/OSX
Cocoa/OS X
win
Win32/WGL
x11
@@ -479,7 +479,7 @@ Available video output drivers are:
``gamma=<0.0..10.0>``
Set a gamma value. If gamma is adjusted in other ways (like with
the ``--gamma`` option or keybindings and the ``gamma`` property), the
the ``--gamma`` option or key bindings and the ``gamma`` property), the
value is multiplied with the other gamma value.
Setting this value to 1.0 can be used to always enable gamma control.
@@ -487,7 +487,7 @@ Available video output drivers are:
``icc-profile=<file>``
Load an ICC profile and use it to transform linear RGB to screen output.
Needs LittleCMS2 support compiled in. This option overrides the ``srgb``
Needs LittleCMS 2 support compiled in. This option overrides the ``srgb``
property, as using both is somewhat redundant. It also enables linear
light scaling.
@@ -500,12 +500,12 @@ Available video output drivers are:
``icc-cache=<file>``
Store and load the 3D LUT created from the ICC profile in this file.
This can be used to speed up loading, since LittleCMS2 can take a while
This can be used to speed up loading, since LittleCMS 2 can take a while
to create the 3D LUT. Note that this file contains an uncompressed LUT.
Its size depends on the ``3dlut-size``, and can be very big.
``icc-intent=<value>``
Specifies the ICC Intent used for transformations between colorspaces.
Specifies the ICC Intent used for transformations between color spaces.
This affects the rendering when using ``icc-profile`` or ``srgb`` and
also affects the way DCP XYZ content gets converted to RGB.
@@ -562,7 +562,7 @@ Available video output drivers are:
This is equivalent to::
--vo=opengl:lscale=spline36:dither-depth=auto:fbo-format=rgb16
--vo=opengl:lscale=spline36:dither-depth=auto:fbo-format=rgba16
Note that some cheaper LCDs do dithering that gravely interferes with
``opengl``'s dithering. Disabling dithering with ``dither-depth=no`` helps.
@@ -571,7 +571,7 @@ Available video output drivers are:
can achieve better quality or performance by changing the ``fbo-format``
suboption to ``rgb16f``, ``rgb32f`` or ``rgb``. Known problems include
Mesa/Intel not accepting ``rgb16``, Mesa sometimes not being compiled with
float texture support, and some OSX setups being very slow with ``rgb16``
float texture support, and some OS X setups being very slow with ``rgb16``
but fast with ``rgb32f``.
``opengl-old``
@@ -706,7 +706,7 @@ Available video output drivers are:
2
Convert side by side input to full-color green-magenta stereo.
3
Convert side by side input to quadbuffered stereo. Only supported
Convert side by side input to quad buffered stereo. Only supported
by very few OpenGL cards.
The following options are only useful if writing your own fragment programs.
@@ -748,7 +748,7 @@ Available video output drivers are:
auto
auto-select (default)
cocoa
Cocoa/OSX
Cocoa/OS X
win
Win32/WGL
x11
+2
View File
@@ -24,6 +24,8 @@ Release procedure
- Create and/or update the ``VERSION`` file.
- Update ``DOCS/client-api-changes.rst`` (on major releases).
- Create tag v0.X.Y.
- Push branch and tag to GitHub.
+158
View File
@@ -0,0 +1,158 @@
Release 0.5.3
=============
Bug fixes
---------
- Fix build failure introduced by the previous release.
This listing is not complete. There are many more bug fixes and changes. The
complete change log can be viewed by running ``git log 41f2ad3..41f2ad3`` in
the git repository.
Release 0.5.2
=============
Changes
-------
- Inherit event flags from parent X11 window when using --wid.
- Properly resume playlists loaded at runtime (this makes mpv try to resume a
playlist when loaded like "mpv playlist.m3u").
- Don't honor $XDG_CONFIG_DIRS anymore for global paths (this fixes a regression
on systems that set the variable by default to somewhere else then /etc,
making mpv skip previously created config files).
- Allow up to 256 MB of extradata to make broken files work.
Bug fixes
---------
- Restore old speed change behavior (this fixes a temporary lack of sound after
restoring normal speed e.g. when pressing Backspace).
- Fix quit handling when seeking past EOF while paused.
- Prevent burning CPU when seeking while paused.
- Don't add the playlist base path twice when using --playlist.
- Fix a crash when the initialization of the EGL context fails on Wayland.
- Make EOF handling properly event-based (this fixes a bug that made mpv hang
when changing from one file to the next with --gapless-audio=no).
- Assume icy title data is terminated with ';' (this fixes handling of streams
with metadata containing apostrophes).
This listing is not complete. There are many more bug fixes and changes. The
complete change log can be viewed by running ``git log 0f1d6c0..e3d3a47`` in
the git repository.
Release 0.5.1
=============
Changes
-------
- Add audio/flac to the MIME type list in mpv.desktop.
- The --slave-broken option has been reintroduced and is equivalent to using
--input-file=/dev/stdin and --input-terminal=no.
Bug fixes
---------
- Fix screenshots with anamorphic videos in the vdpau vo.
- Fix a crash happening when mpv fails to create a vdpau mixer in the vdpau vo.
- Don't quit when the --loop-file option is used.
- Always load the cursor theme in the wayland vo (this fixes a crash caused by
moving the mouse cursor over the video).
- Properly return non-zero from the zsh completion script when no matches are
found (this fixes the use of user-defined zsh completion matchers).
- Fix the description of the opengl-hq vo default options in the manpage.
- Remove duplicated content from the manpage that was accidentally added in the
manpage reorganization from the previous release.
- Avoid clobbering playback position on video end (when both audio and video
streams reached the end, the playback poisition was briefly set at 0).
- Avoid overwriting user input in the coreaudio_device ao.
This listing is not complete. There are many more bug fixes and changes. The
complete change log can be viewed by running ``git log 6729e39..fdd648b`` in
the git repository.
Release 0.5.0
=============
Changes
-------
- Support setting the start time relative to the start PTS with --start.
- Use /dev/sr0 as default cdrom/dvd device on Linux.
- Change "cache" property representation to float.
- Split the ao_coreaudio audio output into ao_coreaudio (which uses the
AudioUnits and the CoreAudio sound server) and ao_coreaudio_device (which uses
direct device access).
- Complete supported URL schemes in the zsh completion script.
- Enable compiler optimizations (-O2) during build.
- Allow precise seeking with percent-based seeks too.
- Do precise seeks when clicking on the OSC seekbar.
- Remove support for older VDA hwaccel versions on Mac OS X (requires recent
versions of ffmpeg/libav).
- Remove the last remains of slave mode (--slave-broken option). Support for
reading input commands from stdin can be emulated using: --input-terminal=no
--input-file=/dev/stdin.
- Some key binding were remapped or removed:
+ "LEFT" and "RIGHT" have been remapped to seek 5 seconds instead of 10.
+ "c" for changing the YUV color space was unmapped.
+ OSD level cycling has been remapped from "o" to "O".
+ "o" is now mapped to the show_progress command (like "P").
+ "PGUP" and "PGDWN" have been remapped to chapter-based seeks (the old
bindings "@" and "!" are still available). The old behvaiour has been
remapped to "Shift+PGUP" and "Shift+PGDWM".
+ Increasing/decreasing audio delay have been remapped from "+" and "-" to
"Ctrl++" and "Ctrl+-".
+ "(" and ")" for adjusting audio balance have been unmapped.
+ "F" for toggling the "sub-forced-only" option has been unmapped.
+ "TAB" for cycling TS programs has been unmapped.
+ "A" for cycling DVD angle has been unmapped.
+ "U" for stopping playback has been unmapped.
+ "l" and "L" for cycling quvi format have been unmapped.
- Make it possible to build the client API (libmpv) on Mac OS X.
- Do necessary checks for nested Wayland compositors which only have limited
interfaces.
- The options in the manpage have been re-organized into sections and ordered by
usage to make it easier to navigate.
- The "hard" framedrop mode has been removed (this behaviour is still available
via the --vd-lavc-framedrop option).
- Show the basename of a subtitle file only (without the directory part).
Bug fixes
---------
- Use a default color space for files with no video (this fixes color managed
OSD messages when no video channel is present).
- Fix key equivalent dispatching for Cocoa on Mac OS X.
- Disable non-interleaved audio formats by default with ao_alsa, since some
ALSA plugins don't cope well with them (non-interleaved formats can still be
enabled using the "non-interleaved" ao_alsa option).
- Fix deadlock in the client API when calling mpv_terminate_destroy() before
mpv_initialize().
- Fix flushing of filter chain (this fixes a bug where the last frames would get
dropped on EOF, if buffered by filters).
- Actually use the channels.conf configuration file for DVB.
- Restore the --dvbin-file option.
- Fix off by one error in the command parser which caused a segfault when using
the mp.commandv() Lua function with 10 or more arguments.
New features
------------
- Search for config files in $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS in addition
to ~/.mpv. The config file has also been renamed to mpv.conf (although the
old file still works and will be loaded even if the new one exists).
- Add "playback-time" property that returns the current playback time always
starting at 0. This is now used to show the playback time in the OSD and the
status line, fixing the shown playback time for transport streams that start
at a completely random timestamp.
- Add cache-related "cache-free", "cache-used" and "cache-idle" properties.
- Add option to list supported protocols (--list-protocols).
- Allow setting libavformat stream options with the --stream-lavf-o option.
- Support running the demuxer in a separate thread and prefetch packets (this
can be enabled using the --demuxer-thread option).
This listing is not complete. There are many more bug fixes and changes. The
complete change log can be viewed by running ``git log cb250d4..52f2f67`` in
the git repository.
+17 -9
View File
@@ -42,9 +42,14 @@ my $tmpl = <<"EOS";
# mpv zsh completion
local curcontext="\$curcontext" state state_descr line
typeset -A opt_args
local rc=1
_arguments -C -S \\
$opts_str
'*:files:->mfiles'
'*:files:->mfiles' && rc=0
case \$state in
ao)
@@ -53,7 +58,7 @@ case \$state in
$ao_str
)
_describe -t values 'audio outputs' values
_describe -t values 'audio outputs' values && rc=0
;;
vo)
@@ -62,7 +67,7 @@ $ao_str
$vo_str
)
_describe -t values 'video outputs' values
_describe -t values 'video outputs' values && rc=0
;;
af)
@@ -71,7 +76,7 @@ $vo_str
$af_str
)
_describe -t values 'audio filters' values
_describe -t values 'audio filters' values && rc=0
;;
vf)
@@ -80,24 +85,27 @@ $af_str
$vf_str
)
_describe -t values 'video filters' values
_describe -t values 'video filters' values && rc=0
;;
mfiles)
local expl
_tags files urls
while _tags; do
_requested files expl 'media file' _files -g \\
"*.(#i)(asf|asx|avi|flac|flv|m1v|m2p|m2v|m4v|mjpg|mka|mkv|mov|mp3|mp4|mpe|mpeg|mpg|ogg|ogm|ogv|qt|rm|ts|vob|wav|webm|wma|wmv)(-.)" && ret=0
"*.(#i)(asf|asx|avi|flac|flv|m1v|m2p|m2v|m4v|mjpg|mka|mkv|mov|mp3|mp4|mpe|mpeg|mpg|ogg|ogm|ogv|qt|rm|ts|vob|wav|webm|wma|wmv)(-.)" && rc=0
if _requested urls; then
while _next_label urls expl URL; do
_urls "\$expl[@]" && ret=0
compadd -S '' "\$expl[@]" $protos_str && ret=0
_urls "\$expl[@]" && rc=0
compadd -S '' "\$expl[@]" $protos_str && rc=0
done
fi
(( ret )) || return 0
(( rc )) || return 0
done
;;
esac
return rc
EOS
print $tmpl;
+1
View File
@@ -0,0 +1 @@
0.5.3
+1 -1
View File
@@ -321,7 +321,7 @@ void ao_drain(struct ao *ao)
bool ao_eof_reached(struct ao *ao)
{
return ao_get_delay(ao) < AO_EOF_DELAY;
return ao->api->get_eof ? ao->api->get_eof(ao) : true;
}
bool ao_chmap_sel_adjust(struct ao *ao, const struct mp_chmap_sel *s,
+8 -9
View File
@@ -404,15 +404,6 @@ static int init(struct ao *ao)
if (p->opt_list) ca_print_device_list(ao);
*p = (struct priv) {
.muted = false,
.stream_asbd_changed = 0,
.hog_pid = -1,
.stream = 0,
.stream_idx = -1,
.changed_mixing = false,
};
OSStatus err = ca_select_device(ao, p->opt_device_id, &p->device);
CHECK_CA_ERROR("failed to select device");
@@ -676,6 +667,14 @@ const struct ao_driver audio_out_coreaudio_exclusive = {
.pause = audio_pause,
.resume = audio_resume,
.priv_size = sizeof(struct priv),
.priv_defaults = &(const struct priv){
.muted = false,
.stream_asbd_changed = 0,
.hog_pid = -1,
.stream = 0,
.stream_idx = -1,
.changed_mixing = false,
},
.options = (const struct m_option[]) {
OPT_INT("device_id", opt_device_id, 0, OPTDEF_INT(-1)),
OPT_FLAG("list", opt_list, 0),
+2
View File
@@ -134,6 +134,8 @@ struct ao_driver {
float (*get_delay)(struct ao *ao);
// push based: block until all queued audio is played (optional)
void (*drain)(struct ao *ao);
// Optional. Return true if audio has stopped in any way.
bool (*get_eof)(struct ao *ao);
// Wait until the audio buffer needs to be refilled. The lock is the
// internal mutex usually protecting the internal AO state (and used to
// protect driver calls), and must be temporarily unlocked while waiting.
+9
View File
@@ -201,6 +201,14 @@ static void drain(struct ao *ao)
reset(ao);
}
static bool get_eof(struct ao *ao)
{
struct ao_pull_state *p = ao->api_priv;
// For simplicity, ignore the latency. Otherwise, we would have to run an
// extra thread to time it.
return mp_ring_buffered(p->buffers[0]) == 0;
}
static void uninit(struct ao *ao)
{
ao->driver->uninit(ao);
@@ -225,6 +233,7 @@ const struct ao_driver ao_api_pull = {
.get_space = get_space,
.play = play,
.get_delay = get_delay,
.get_eof = get_eof,
.pause = pause,
.resume = resume,
.priv_size = sizeof(struct ao_pull_state),
+41 -5
View File
@@ -54,6 +54,7 @@ struct ao_push_state {
bool drain;
bool buffers_full;
bool avoid_ao_wait;
bool still_playing;
bool need_wakeup;
bool requested_data;
bool paused;
@@ -87,15 +88,13 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return r;
}
static float get_delay(struct ao *ao)
static double unlocked_get_delay(struct ao *ao)
{
struct ao_push_state *p = ao->api_priv;
pthread_mutex_lock(&p->lock);
double driver_delay = 0;
if (ao->driver->get_delay)
driver_delay = ao->driver->get_delay(ao);
double delay = driver_delay + mp_audio_buffer_seconds(p->buffer);
pthread_mutex_unlock(&p->lock);
if (delay >= AO_EOF_DELAY && p->expected_end_time) {
if (mp_time_sec() > p->expected_end_time) {
MP_ERR(ao, "Audio device EOF reporting is broken!\n");
@@ -106,6 +105,15 @@ static float get_delay(struct ao *ao)
return delay;
}
static float get_delay(struct ao *ao)
{
struct ao_push_state *p = ao->api_priv;
pthread_mutex_lock(&p->lock);
float delay = unlocked_get_delay(ao);
pthread_mutex_unlock(&p->lock);
return delay;
}
static void reset(struct ao *ao)
{
struct ao_push_state *p = ao->api_priv;
@@ -114,6 +122,7 @@ static void reset(struct ao *ao)
ao->driver->reset(ao);
mp_audio_buffer_clear(p->buffer);
p->paused = false;
p->still_playing = false;
wakeup_playthread(ao);
pthread_mutex_unlock(&p->lock);
}
@@ -190,6 +199,15 @@ static int get_space(struct ao *ao)
return space;
}
static bool get_eof(struct ao *ao)
{
struct ao_push_state *p = ao->api_priv;
pthread_mutex_lock(&p->lock);
bool eof = !p->still_playing;
pthread_mutex_unlock(&p->lock);
return eof;
}
static int play(struct ao *ao, void **data, int samples, int flags)
{
struct ao_push_state *p = ao->api_priv;
@@ -215,6 +233,7 @@ static int play(struct ao *ao, void **data, int samples, int flags)
p->expected_end_time = 0;
p->final_chunk = is_final;
p->paused = false;
p->still_playing |= write_samples > 0;
// If we don't have new data, the decoder thread basically promises it
// will send new data as soon as it's available.
@@ -266,6 +285,7 @@ static void ao_play_data(struct ao *ao)
// any new data (due to rounding to period boundaries).
p->buffers_full = max >= space && r <= 0;
p->avoid_ao_wait = (max == 0 && space > 0) || p->paused || stuck;
p->still_playing |= r > 0;
MP_TRACE(ao, "in=%d, space=%d r=%d flags=%d aw=%d full=%d f=%d\n", max,
space, r, flags, p->avoid_ao_wait, p->buffers_full, p->final_chunk);
}
@@ -319,8 +339,23 @@ static void *playthread(void *arg)
// The most important part is that the decoder is woken up, so
// that the decoder will wake up us in turn.
MP_TRACE(ao, "buffer inactive.\n");
mp_input_wakeup(ao->input_ctx);
pthread_cond_wait(&p->wakeup, &p->lock);
bool was_playing = p->still_playing;
double timeout = -1;
if (p->still_playing && !p->paused) {
timeout = unlocked_get_delay(ao);
if (timeout < AO_EOF_DELAY)
p->still_playing = false;
}
if (!p->requested_data || (was_playing && !p->still_playing))
mp_input_wakeup(ao->input_ctx);
if (p->still_playing && timeout > 0) {
mpthread_cond_timedwait_rel(&p->wakeup, &p->lock, timeout);
} else {
pthread_cond_wait(&p->wakeup, &p->lock);
}
} else {
if (!ao->driver->wait || ao->driver->wait(ao, &p->lock) < 0) {
// Fallback to guessing.
@@ -389,6 +424,7 @@ const struct ao_driver ao_api_push = {
.pause = audio_pause,
.resume = resume,
.drain = drain,
.get_eof = get_eof,
.priv_size = sizeof(struct ao_push_state),
};
-3
View File
@@ -286,9 +286,6 @@ struct playlist *playlist_parse_file(const char *file, struct mpv_global *global
if (ret && !ret->first)
mp_warn(log, "Warning: empty playlist\n");
if (ret)
playlist_add_base_path(ret, mp_dirname(file));
talloc_free(log);
return ret;
}
+1 -1
View File
@@ -576,7 +576,7 @@ static void parse_trackentry(struct demuxer *demuxer,
track->codec_id = "";
}
if (entry->n_codec_private && entry->codec_private.len <= 0x1000000) {
if (entry->n_codec_private && entry->codec_private.len <= 0x10000000) {
int len = entry->codec_private.len;
track->private_data = talloc_size(track, len + AV_LZO_INPUT_PADDING);
memcpy(track->private_data, entry->codec_private.start, len);
+1 -1
View File
@@ -23,5 +23,5 @@ Exec=mpv --no-terminal --force-window -- %U
Terminal=false
NoDisplay=true
Categories=AudioVideo;Audio;Video;Player;TV;
MimeType=application/ogg;application/x-ogg;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/m4a;audio/x-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;video/mpeg;video/x-mpeg;video/x-mpeg2;video/mp4;video/msvideo;video/x-msvideo;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/x-fli;video/x-flv;video/x-theora;video/x-matroska;video/webm;audio/x-flac;audio/x-vorbis+ogg;video/x-ogm+ogg;audio/x-shorten;audio/x-ape;audio/x-wavpack;audio/x-tta;audio/AMR;audio/ac3;video/mp2t;
MimeType=application/ogg;application/x-ogg;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/m4a;audio/x-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;video/mpeg;video/x-mpeg;video/x-mpeg2;video/mp4;video/msvideo;video/x-msvideo;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/x-fli;video/x-flv;video/x-theora;video/x-matroska;video/webm;audio/x-flac;audio/x-vorbis+ogg;video/x-ogm+ogg;audio/x-shorten;audio/x-ape;audio/x-wavpack;audio/x-tta;audio/AMR;audio/ac3;video/mp2t;audio/flac;
X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
+1 -1
View File
@@ -162,7 +162,7 @@ extern "C" {
* relational operators (<, >, <=, >=).
*/
#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 3)
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 4)
/**
* Return the MPV_CLIENT_API_VERSION the mpv source has been compiled with.
+6
View File
@@ -833,6 +833,12 @@ api_statement_check \
libavutil/frame.h \
'av_frame_get_qp_table(NULL, NULL, NULL)'
api_statement_check \
"libavcodec av_vdpau_alloc_context()" \
HAVE_AVCODEC_VDPAU_ALLOC_CONTEXT \
libavcodec/vdpau.h \
'AVVDPAUContext *x = av_vdpau_alloc_context()'
check_pkg_config "libavfilter" $_libavfilter LIBAVFILTER 'libavfilter >= 3.90.100'
check_pkg_config "libavdevice" $_libavdevice LIBAVDEVICE 'libavdevice >= 54.0.0'
+2
View File
@@ -527,6 +527,8 @@ const m_option_t mp_opts[] = {
OPT_SUBSTRUCT("", encode_opts, encode_config, 0),
#endif
OPT_FLAG("slave-broken", slave_mode, CONF_GLOBAL),
{0}
};
+2
View File
@@ -237,6 +237,8 @@ typedef struct MPOpts {
int w32_priority;
int slave_mode;
int network_cookies_enabled;
char *network_cookies_file;
char *network_useragent;
+1 -23
View File
@@ -73,29 +73,7 @@ static int mp_add_xdg_config_dirs(struct mpv_global *global, char **dirs, int i)
i = mp_add_macosx_bundle_dir(global, dirs, i);
#endif
tmp = getenv("XDG_CONFIG_DIRS");
if (tmp && *tmp) {
char *xdgdirs = talloc_strdup(talloc_ctx, tmp);
while (xdgdirs) {
char *dir = xdgdirs;
xdgdirs = strchr(xdgdirs, ':');
if (xdgdirs)
*xdgdirs++ = 0;
if (!dir[0])
continue;
dirs[i++] = talloc_asprintf(talloc_ctx, "%s%s", dir, "/mpv");
if (i + 1 >= MAX_CONFIG_PATHS) {
MP_WARN(global, "Too many config files, not reading any more\n");
break;
}
}
} else {
dirs[i++] = MPLAYER_CONFDIR;
}
dirs[i++] = MPLAYER_CONFDIR;
return i;
}
+9 -5
View File
@@ -96,6 +96,8 @@ void reset_audio_state(struct MPContext *mpctx)
{
if (mpctx->d_audio)
audio_reset_decoding(mpctx->d_audio);
if (mpctx->ao_buffer)
mp_audio_buffer_clear(mpctx->ao_buffer);
mpctx->audio_status = mpctx->d_audio ? STATUS_SYNCING : STATUS_EOF;
}
@@ -111,8 +113,6 @@ void reinit_audio_chain(struct MPContext *mpctx)
mp_notify(mpctx, MPV_EVENT_AUDIO_RECONFIG, NULL);
mpctx->audio_status = STATUS_SYNCING;
if (!(mpctx->initialized_flags & INITIALIZED_ACODEC)) {
mpctx->initialized_flags |= INITIALIZED_ACODEC;
assert(!mpctx->d_audio);
@@ -122,15 +122,19 @@ void reinit_audio_chain(struct MPContext *mpctx)
mpctx->d_audio->opts = opts;
mpctx->d_audio->header = sh;
mpctx->d_audio->replaygain_data = sh->audio->replaygain_data;
mpctx->ao_buffer = mp_audio_buffer_create(NULL);
if (!audio_init_best_codec(mpctx->d_audio, opts->audio_decoders))
goto init_error;
reset_audio_state(mpctx);
if (mpctx->ao) {
struct mp_audio fmt;
ao_get_format(mpctx->ao, &fmt);
mp_audio_buffer_reinit(mpctx->ao_buffer, &fmt);
}
}
assert(mpctx->d_audio);
if (!mpctx->ao_buffer)
mpctx->ao_buffer = mp_audio_buffer_create(mpctx);
struct mp_audio in_format;
mp_audio_buffer_get_format(mpctx->d_audio->decode_buffer, &in_format);
+2
View File
@@ -166,6 +166,8 @@ static int mp_property_playback_speed(void *ctx, struct m_property *prop,
switch (action) {
case M_PROPERTY_SET: {
opts->playback_speed = *(double *) arg;
if (opts->playback_speed == orig_speed)
return M_PROPERTY_OK;
// Adjust time until next frame flip for nosound mode
mpctx->time_frame *= orig_speed / opts->playback_speed;
if (mpctx->d_audio)
+2 -1
View File
@@ -200,7 +200,8 @@ static char *mp_get_playback_resume_config_filename(struct mpv_global *global,
if (!res) {
res = mp_find_config_file(tmp, global, MP_WATCH_LATER_CONF);
res = talloc_asprintf(NULL, "%s/%s", res, conf);
if (res)
res = talloc_asprintf(NULL, "%s/%s", res, conf);
}
exit:
+6
View File
@@ -86,8 +86,11 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
mixer_uninit_audio(mpctx->mixer);
audio_uninit(mpctx->d_audio);
mpctx->d_audio = NULL;
talloc_free(mpctx->ao_buffer);
mpctx->audio_status = STATUS_EOF;
reselect_demux_streams(mpctx);
if (mpctx->ao_buffer)
mp_audio_buffer_clear(mpctx->ao_buffer);
}
if (mask & INITIALIZED_SUB) {
@@ -924,10 +927,13 @@ static void print_resolve_contents(struct mp_log *log,
static void transfer_playlist(struct MPContext *mpctx, struct playlist *pl)
{
if (pl->first) {
struct playlist_entry *new = mp_check_playlist_resume(mpctx, pl);
playlist_transfer_entries(mpctx->playlist, pl);
// current entry is replaced
if (mpctx->playlist->current)
playlist_remove(mpctx->playlist, mpctx->playlist->current);
if (new)
mpctx->playlist->current = new;
} else {
MP_WARN(mpctx, "Empty playlist!\n");
}
+6
View File
@@ -375,6 +375,12 @@ int mp_initialize(struct MPContext *mpctx)
mp_msg_update_msglevels(mpctx->global);
}
if (opts->slave_mode) {
MP_WARN(mpctx, "--slave-broken is deprecated (see manpage).\n");
opts->consolecontrols = 0;
m_config_set_option0(mpctx->mconfig, "input-file", "/dev/stdin");
}
mpctx->input = mp_input_init(mpctx->global);
mpctx->global->stream_interrupt_cb = check_stream_interrupt;
mpctx->global->stream_interrupt_cb_ctx = mpctx;
+9 -11
View File
@@ -734,6 +734,7 @@ static void handle_loop_file(struct MPContext *mpctx)
{
struct MPOpts *opts = mpctx->opts;
if (opts->loop_file && mpctx->stop_play == AT_END_OF_FILE) {
mpctx->stop_play = KEEP_PLAYING;
set_osd_function(mpctx, OSD_FFW);
queue_seek(mpctx, MPSEEK_ABSOLUTE, get_start_time(mpctx), 0, true);
}
@@ -887,12 +888,10 @@ void run_playloop(struct MPContext *mpctx)
}
if (mpctx->video_status == STATUS_EOF &&
mpctx->audio_status >= STATUS_PLAYING)
mpctx->audio_status >= STATUS_PLAYING &&
mpctx->audio_status < STATUS_EOF)
{
double a_pos = 0;
if (mpctx->d_audio)
a_pos = playing_audio_pts(mpctx);
mpctx->playback_pts = a_pos;
mpctx->playback_pts = playing_audio_pts(mpctx);
}
handle_dummy_ticks(mpctx);
@@ -900,12 +899,11 @@ void run_playloop(struct MPContext *mpctx)
update_osd_msg(mpctx);
update_subtitles(mpctx);
/* If we're paused, don't end playback yet. But if video is enabled, is EOF,
* and we don't have a video frame, then the user probably seeked outside
* of the video, and we want to quit. */
bool prevent_eof = mpctx->paused;
if (mpctx->d_video && mpctx->video_status == STATUS_EOF)
prevent_eof &= mpctx->video_out && mpctx->video_out->hasframe;
/* Don't quit while paused and we're displaying the last video frame. On the
* other hand, if we don't have a video frame, then the user probably seeked
* outside of the video, and we do want to quit. */
bool prevent_eof =
mpctx->paused && mpctx->video_out && mpctx->video_out->hasframe;
/* Handles terminating on end of playback (or switching to next segment).
*
* It's possible for the user to simultaneously switch both audio
+1 -1
View File
@@ -303,7 +303,7 @@ static struct mp_tags *read_icy(stream_t *s)
int i = bstr_find(packet, head);
if (i >= 0) {
packet = bstr_cut(packet, i + head.len);
int end = bstrchr(packet, '\'');
int end = bstr_find(packet, bstr0("\';"));
packet = bstr_splice(packet, 0, end);
mp_tags_set_bstr(res, bstr0("icy-title"), packet);
}
+25 -11
View File
@@ -22,6 +22,7 @@
#include <libavcodec/vdpau.h>
#include <libavutil/common.h>
#include "config.h"
#include "lavc.h"
#include "common/common.h"
#include "common/av_common.h"
@@ -36,7 +37,7 @@ struct priv {
uint64_t preemption_counter;
int fmt, w, h;
AVVDPAUContext context;
AVVDPAUContext *context;
};
#define PE(av_codec_id, ff_profile, vdp_profile) \
@@ -76,8 +77,8 @@ static int init_decoder(struct lavc_ctx *ctx, int fmt, int w, int h)
if (mp_vdpau_handle_preemption(p->mpvdp, &p->preemption_counter) < 0)
return 0;
if (p->context.decoder != VDP_INVALID_HANDLE)
vdp->decoder_destroy(p->context.decoder);
if (p->context->decoder != VDP_INVALID_HANDLE)
vdp->decoder_destroy(p->context->decoder);
const struct hwdec_profile_entry *pe = hwdec_find_profile(ctx, profiles);
if (!pe) {
@@ -104,14 +105,14 @@ static int init_decoder(struct lavc_ctx *ctx, int fmt, int w, int h)
int maxrefs = hwdec_get_max_refs(ctx);
vdp_st = vdp->decoder_create(vdp_device, pe->hw_profile, w, h, maxrefs,
&p->context.decoder);
&p->context->decoder);
CHECK_VDP_WARNING(p, "Failed creating VDPAU decoder");
if (vdp_st != VDP_STATUS_OK)
goto fail;
return 0;
fail:
p->context.decoder = VDP_INVALID_HANDLE;
p->context->decoder = VDP_INVALID_HANDLE;
return -1;
}
@@ -138,9 +139,10 @@ static void uninit(struct lavc_ctx *ctx)
if (!p)
return;
if (p->context.decoder != VDP_INVALID_HANDLE)
p->vdp->decoder_destroy(p->context.decoder);
if (p->context && p->context->decoder != VDP_INVALID_HANDLE)
p->vdp->decoder_destroy(p->context->decoder);
av_free(p->context);
talloc_free(p);
ctx->hwdec_priv = NULL;
@@ -155,16 +157,28 @@ static int init(struct lavc_ctx *ctx)
};
ctx->hwdec_priv = p;
#if HAVE_AVCODEC_VDPAU_ALLOC_CONTEXT
p->context = av_vdpau_alloc_context();
#else
p->context = av_mallocz(sizeof(AVVDPAUContext));
#endif
if (!p->context)
goto error;
p->vdp = &p->mpvdp->vdp;
p->context.render = p->vdp->decoder_render;
p->context.decoder = VDP_INVALID_HANDLE;
p->context->render = p->vdp->decoder_render;
p->context->decoder = VDP_INVALID_HANDLE;
if (mp_vdpau_handle_preemption(p->mpvdp, &p->preemption_counter) < 1)
return -1;
goto error;
ctx->avctx->hwaccel_context = &p->context;
ctx->avctx->hwaccel_context = p->context;
return 0;
error:
uninit(ctx);
return -1;
}
static int probe(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info,
+8 -6
View File
@@ -183,12 +183,14 @@ static void releaseGlContext_wayland(MPGLContext *ctx)
GL *gl = ctx->gl;
struct vo_wayland_state *wl = ctx->vo->wayland;
gl->Finish();
eglReleaseThread();
wl_egl_window_destroy(wl->egl_context.egl_window);
eglDestroySurface(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);
eglMakeCurrent(wl->egl_context.egl.dpy, NULL, NULL, EGL_NO_CONTEXT);
eglDestroyContext(wl->egl_context.egl.dpy, wl->egl_context.egl.ctx);
if (wl->egl_context.egl.ctx) {
gl->Finish();
eglReleaseThread();
wl_egl_window_destroy(wl->egl_context.egl_window);
eglDestroySurface(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);
eglMakeCurrent(wl->egl_context.egl.dpy, NULL, NULL, EGL_NO_CONTEXT);
eglDestroyContext(wl->egl_context.egl.dpy, wl->egl_context.egl.ctx);
}
eglTerminate(wl->egl_context.egl.dpy);
wl->egl_context.egl.ctx = NULL;
}
+1 -1
View File
@@ -906,7 +906,7 @@ static struct mp_image *get_screenshot(struct vo *vo)
if (vc->screenshot_surface == VDP_INVALID_HANDLE) {
vdp_st = vdp->output_surface_create(vc->vdp_device,
OUTPUT_RGBA_FORMAT,
vc->vid_width, vc->vid_height,
vo->params->d_w, vo->params->d_h,
&vc->screenshot_surface);
CHECK_VDP_WARNING(vo, "Error when calling vdp_output_surface_create");
}
+7 -12
View File
@@ -819,20 +819,15 @@ static bool create_cursor (struct vo_wayland_state *wl)
return false;
}
if (wl->cursor.pointer) {
// only create cursor surface if a pointer interface is available
// without this check it leads to problems with compositor which don't
// have pointer interfaces
wl->cursor.surface =
wl_compositor_create_surface(wl->display.compositor);
wl->cursor.surface =
wl_compositor_create_surface(wl->display.compositor);
if (!wl->cursor.surface)
return false;
if (!wl->cursor.surface)
return false;
wl->cursor.theme = wl_cursor_theme_load(NULL, 32, wl->display.shm);
wl->cursor.default_cursor = wl_cursor_theme_get_cursor(wl->cursor.theme,
"left_ptr");
}
wl->cursor.theme = wl_cursor_theme_load(NULL, 32, wl->display.shm);
wl->cursor.default_cursor = wl_cursor_theme_get_cursor(wl->cursor.theme,
"left_ptr");
return true;
}
+10 -5
View File
@@ -1177,11 +1177,16 @@ static void vo_x11_map_window(struct vo *vo, struct mp_rect rc)
}
// map window
vo_x11_selectinput_witherr(vo, x11->display, x11->window,
StructureNotifyMask | ExposureMask |
KeyPressMask | KeyReleaseMask |
ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | LeaveWindowMask);
int events = StructureNotifyMask | ExposureMask;
if (vo->opts->WinID > 0) {
XWindowAttributes attribs;
if (XGetWindowAttributes(x11->display, vo->opts->WinID, &attribs))
events |= attribs.your_event_mask;
} else {
events |= KeyPressMask | KeyReleaseMask | ButtonPressMask |
ButtonReleaseMask | PointerMotionMask | LeaveWindowMask;
}
vo_x11_selectinput_witherr(vo, x11->display, x11->window, events);
XMapWindow(x11->display, x11->window);
}
+3
View File
@@ -170,6 +170,9 @@ static int create_vdp_mixer(struct mp_vdpau_mixer *mixer)
VDP_NUM_MIXER_PARAMETER,
parameters, parameter_values,
&mixer->video_mixer);
if (vdp_st != VDP_STATUS_OK)
mixer->video_mixer = VDP_INVALID_HANDLE;
CHECK_VDP_ERROR(mixer, "Error when calling vdp_video_mixer_create");
mixer->initialized = true;
+6
View File
@@ -368,6 +368,12 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
'func': check_statement('libavutil/frame.h',
'av_frame_get_qp_table(NULL, NULL, NULL)',
use='libav')
}, {
'name': 'avcodec-vdpau-alloc-context',
'desc': 'libavcodec vdpau non-sense',
'func': check_statement('libavcodec/vdpau.h',
'AVVDPAUContext *x = av_vdpau_alloc_context()',
use='libav')
}, {
'name': '--libavfilter',
'desc': 'libavfilter',