Commit Graph

8826 Commits

Author SHA1 Message Date
wm4 a21cfddaab options: remove some questionable -lavdopts suboptions
Most of these are rather questionable, the rest you rarely need to set
manually. You still can set all of them with -lavdopts-o (because
libavcodec has AVOptions for them).
2013-05-29 14:57:05 +02:00
wm4 a9892f901f manpage: fix typo 2013-05-27 23:41:37 +02:00
wm4 f05ec1c738 options: add allow-mimetype suboption for demux_lavf
This can control whether demux_lavf should use the HTTP mime type to
determine the format, instead of probing the data with the libavformat
API. Do this to allow easier debugging in case the mimetype is
incorrect. (This is done only for AAC streams right now.)
2013-05-27 22:48:04 +02:00
wm4 953b0eca3b manpage: fix typo 2013-05-26 19:37:59 +02:00
wm4 9a2a410d3f manpage: mark some filters as deprecated in favor of libavfilter
This is basically a "do not use" label. We don't remove them yet,
because we still support FFmpeg releases where we can not use
libavfilter for various reasons. Also, Libav causes pain as usual
due to the lack of ported mplayer filters in its codebase, so not
all filters will be available there.
2013-05-26 17:31:21 +02:00
wm4 58a7d81dc5 gl_video: improve dithering
Use a different algorithm to generate the dithering matrix. This
looks much better than the previous ordered dither matrix with its
cross-hatch artifacts.

The matrix generation algorithm as well as its implementation was
contributed by Wessel Dankers aka Fruit. The code in dither.c is
his implementation, reformatted and with static global variables
removed by me.

The new matrix is uploaded as float texture - before this commit, it
was a normal integer fixed point matrix. This means dithering will
be disabled on systems without float textures.

The size of the dithering matrix can be configured, as the matrix is
generated at runtime. The generation of the matrix can take rather
long, and is already unacceptable with size 8. The default is at 6,
which takes about 100 ms on a Core2 Duo system with dither.c compiled
at -O2, which I consider just about acceptable.

The old ordered dithering is still available and can be selected by
putting the dither=ordered sub-option. The ordered dither matrix
generation code was moved to dither.c. This function was originally
written by Uoti Urpala.
2013-05-26 16:44:20 +02:00
wm4 39225ed196 gl_video: add scaler-resizes-only sub-option
This option disables the scaler set with lscale if the video image is
not resized.
2013-05-26 16:44:20 +02:00
wm4 c23bf5311f vf_lavfi: allow setting avopts 2013-05-26 16:44:18 +02:00
wm4 60a7f3b8bc af_lavfi: add libavfilter bridge
Mostly copied from vf_lavfi. The parts that could be shared are minor,
because most code is about setting up audio and video, which are too
different.

This won't work with Libav. I used ffplay.c as guide, and noticed too
late that their setup methods are incompatible with Libav's. Trying to
make it work with both would be too much effort. The configure test for
av_opt_set_int_list() should disable af_lavfi gracefully when compiling
with Libav.

Due to option parser chaos, you currently can't have a "," as part of
the filter graph string - not even with quoting or escaping. This will
probably be fixed later.

The audio filter chain is not PTS aware. So we have to do some hacks
to make up a fake PTS, and we have to map the output PTS back to the
filter chain's method of tracking PTS changes and buffering, by
adjusting af->delay.
2013-05-23 17:44:06 +02:00
wm4 3d87ca6b5e m_option, vf: add label support
Can be used to refer to filters by name. Intended to be used when the
filter chain is changed at runtime.

A label can be assigned to a filter by prefixing it with '@name:', where
'name' is an user-chosen identifier. For example, a filter added with
'-vf-add @label1:gradfun=123' can be removed with '-vf-del @label1'.
If a filter with an already existing label is added, the existing filter
is replaced with the new filter (this happens for both -vf-add and
-vf-pre). If a filter is replaced, the new filter takes the position of
the old filter, instead of being appended/prepended to the filter chain
as usual. For -vf-toggle, labels are compared if at least one of the
filters has a label; otherwise they are compared by filter name and
arguments (like before). This means two filters are never considered
equal if one has a label and the other one does not.
2013-05-23 01:02:24 +02:00
wm4 58cc0f637f input: do property expansion for all input command string arguments
Also add a "raw" prefix for commands, which prevents property expansion.
The idea is that if the commands are generated by a program, it doesn't
have to know whether the command expands properties or not.
2013-05-18 17:45:55 +02:00
wm4 f569d245ba core: allow changing filter filters at runtime
Add the "vf" command, which allows changing the video filter chain at
runtime. For example, the 'y' key could be bound to toggle deinterlacing
by adding 'y vf toggle yadif' to the input.conf.

Reconfiguring the video filter chain normally resets the VO, so that it
will be "stuck" until a new video frame is rendered. To mitigate this, a
seek to the current position is issued when the filter chain is changed.
This is done only if playback is paused, because normal playback will
show an actual new frame quickly enough.

If vdpau hardware decoding is used, filter insertion (whether it fails
or not) will break the video for a while. This is because vo_vdpau
resets decoding related things on vo_config().
2013-05-18 17:45:54 +02:00
wm4 f921a675ae manpage: document af_* commands
Except af_cmdline, which is too questionable.
2013-05-18 17:32:37 +02:00
wm4 db69e0edd4 options: add -V as alias for --version
This is a common convention.
2013-05-15 15:34:11 +02:00
wm4 894288457b options: add --version 2013-05-15 15:14:24 +02:00
Paul B Mahol 83570fc0fb add osd-scale command
Signed-off-by: Paul B Mahol <onemda@gmail.com>

Modified to add docs for --osd-scale option, and adjusted to the
previous commit by wm4.
2013-05-14 23:32:07 +02:00
wm4 989b482bd6 core: re-add -dumpstream as --stream-dump
Apparently useful for dumping DVD. Could also be used to rip streams
with libquvi and such, but for that there are better tools. Actually
I doubt there aren't better tools to dump DVDs, but whatever, this was
a feature request, so I don't need a good reason.
2013-05-12 21:57:02 +02:00
wm4 faad40aad9 core: add --stream-capture
This is a partial revert of commit 7059c15, and basically re-adds
--capture, just with different option names and slightly different
semantics.
2013-05-12 21:51:57 +02:00
wm4 e6e5a7b221 Merge branch 'audio_changes'
Conflicts:
	audio/out/ao_lavc.c
2013-05-12 21:47:55 +02:00
wm4 9d1f5e8e9f manpage: update --channels 2013-05-12 21:24:56 +02:00
wm4 d9582ad0a4 audio/filters: add af_force
Its main purpose is for testing in case channel layout stuff breaks, in
particular in connection with old audio filters.
2013-05-12 21:24:56 +02:00
Stefano Pigozzi 6000e8f206 man: fix spelling error
Thanks @kastaren for spotting this.
2013-05-12 20:20:28 +02:00
Stefano Pigozzi 74c15ec696 cocoa_common: add native OSX fullscreen support
This adds Mission Control fullscreen functionality to mpv. Since this doesn't
play well with many of mpv's features disable it by default. Users can activate
this feature by using `--native-fs` when starting mpv.

Fixes #34
2013-05-12 15:27:54 +02:00
wm4 139bc5ce09 command: add time-remaining property 2013-05-10 15:20:40 +02:00
wm4 ce9a854d54 core: add playback resume feature (manual/opt-in)
A "watch later" command is now mapped to Shift+Q. This quits the player
and stores the playback state in a config file in ~/.mpv/watch_later/.
When calling the player with the same file again, playback is resumed
at that time position.

It's also possible to make mpv save playback state always on quit with
the --save-position-on-quit option. Likewise, resuming can be disabled
with the --no-resume-playback option.

This also attempts to save some playback parameters, like fullscreen
state or track selection. This will unconditionally override config
settings and command line options (which is probably not what you would
expect, but in general nobody will really care about this). Some things
are not backed up, because that would cause various problems. Additional
subtitle files, video filters, etc. are not stored because that would be
too hard and fragile. Volume/mute state are not stored because it would
mess up if the system mixer is used, or if the system mixer was
readjusted in the meantime.

Basically, the tradeoff between perfect state restoration and
complexity/fragility makes it not worth to attempt to implement
it perfectly, even if the result is a little bit inconsistent.
2013-05-05 20:08:11 +02:00
wm4 81a1d07b81 manpage: fix option description 2013-05-05 18:44:21 +02:00
wm4 012d297bb1 video: add --hwdec-codecs option to whitelist codecs for hw decoding 2013-05-04 01:38:27 +02:00
reimar daee1a04e7 stream_bluray: remove the broken -bluray-chapter option
Remove the broken -bluray-chapter option.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36175 b3059339-0415-0410-9bf9-f77b7e298cf2

Conflicts:
	DOCS/man/en/mplayer.1
	cfg-common.h
2013-04-27 15:28:57 +02:00
wm4 56efcc7b7f manpage: fix references to --slave 2013-04-26 20:44:18 +02:00
wm4 28a971e26f options: allow using [ ] for quoting in sub-options
This is an attempt to make quoting of sub-option values less awkward,
even if it works only with some shells. This is needed mainly for
vf_lavfi. Also update the vf_lavfi manpage section.
2013-04-26 20:44:18 +02:00
wm4 55262a4427 manpage: remove broken example
Weird video size presets have been removed.
2013-04-24 21:39:28 +02:00
wm4 4873c798b6 manpage: document --native-keyrepeat
Forgotten in commit d853aba.
2013-04-24 21:37:10 +02:00
wm4 ff549a2f6a core: add backstep support
Allows stepping back one frame via the frame_back_step inout command,
bound to "," by default.

This uses the precise seeking facility, and a perfect frame index built
on the fly. The index is built during playback and precise seeking, and
contains (as of this commit) the last 100 displayed or skipped frames.
This index is used to find the PTS of the previous frame, which is then
used as target for a precise seek. If no PTS is found, the core attempts
to do a seek before the current frame, and skip decoded frames until the
current frame is reached; this will create a sufficient index and the
normal backstep algorithm can be applied.

This can be rather slow. The worst case for backstepping is about the
same as the worst case for precise seeking if the previous frame can be
deduced from the index. If not, the worst case will be twice as slow.

There's also some minor danger that the index is incorrect in case
framedropping is involved. For framedropping due to --framedrop, this
problem is ignored (use of --framedrop is discouraged anyway). For
framedropping during precise seeking (done to make it faster), we try
to not add frames to the index that are produced when this can happen.
I'm not sure how well that works (or if the logic is sane), and it's
sure to break with some video filters. In the worst case, backstepping
might silently skip frames if you backstep after a user-initiated
precise seek. (Precise seeks to do indexing are not affected.)

Likewise, video filters that somehow change timing of frames and do not
do this in a deterministic way (i.e. if you seek to a position, frames
with different timings are produced than when the position is reached
during normal playback) will make backstepping silently jump to the
wrong frame. Enabling/disabling filters during playback (like for
example deinterlacing) will have similar bad effects.
2013-04-24 20:27:12 +02:00
wm4 d638a8eda8 manpage: remove references to --no-slices
Background: slice support has been completely removed, because it
doesn't work with multithreading, and provides a rather bad complexity
to performance tradeoff otherwise.
2013-04-23 14:16:06 +02:00
wm4 c8df1799d9 m_option: allow quoted positional parameters for -vf
This allows things like:

    '--vf=lavfi="gradfun=20:30"'

Adjust the documentation for vf_lavfi to make the example less verbose.
As an unrelated change, add a general description to vf_lavfi.
2013-04-23 14:10:43 +02:00
wm4 7979718159 vf_lavfi: add libavfilter bridge
Requires recent FFmpeg/Libav git versions. Earlier versions will not
be supported, as the API is different. (A libavfilter version that
uses AVFrame instead of AVFilterBuffer is needed.)

Note that this is sort of useless, because the option parser prevents
you from making use of the full libavfilter graph syntax. This has to be
fixed later.

Most of the filter creation code (half of the config() function) has
been taken from avplay.c.

This code is not based on MPlayer's vf_lavfi. The MPlayer code doesn't
compile as it hasn't been updated through multiple libavfilter API
changes, making it completely useless as a starting point.
2013-04-21 04:39:58 +02:00
wm4 6d66a547a4 manpage: clarify --cache behavior 2013-04-20 23:25:55 +02:00
Ellis Berner 4beedec44d Fix typo for opengl dither-depth default 2013-04-18 14:41:32 -07:00
wm4 df8a481eba sub: add --osd-blur and --sub-text-blur options
These require bleeding edge libass (latest git version), and will be
ignored otherwise.

I'm not sure about the blur factor and scaling. The ASS/VSFilter
semantics for blur scaling are a bad mess. Might require further
investigation.
2013-04-13 18:53:03 +02:00
wm4 071a8f50b9 options: add option to prevent decoder audio downmixing
Also rename --a52drc to --ad-lavc-ac3drc, and add --ad-lavc-o.
2013-04-13 04:21:30 +02:00
wm4 d2c20f4cfb manpage: update af_lavrresample entry
Reflects the changes over the last few commits.
2013-04-13 04:21:29 +02:00
wm4 ff6342a311 af_lavrresample: add no-detach suboption
Normally, af_lavrresample detaches itself immediately if the input and
output audio parameters are the same. no-detach prevents this.
2013-04-13 04:21:29 +02:00
wm4 abd5e8a2e7 options: remove --af-adv
Anything this option did has been removed in the preceding 3 commits.
Note that even though these options sounded like a good idea (like
setting accuracy vs. speed tradeoffs), they were not really properly
implemented.
2013-04-13 04:21:29 +02:00
wm4 bc268b313e audio: remove float processing option
The only thing this option did was changing the behavior of af_volume.
The option decided what sample format af_volume would use, but only if
the sample format was not already float. If the option was set, it would
default to float, otherwise to S16.

Remove use of the option and all associated code, and make af_volume
always use float (unless a af_volume specific sub-option is set).

Silence maximum value tracking. This message is printed when the filter
is destroyed, and it's slightly annoying. Was enabled due to enabling
float by default.
2013-04-13 04:21:28 +02:00
wm4 a5916f5d1d core: remove dead --vsync leftovers 2013-04-12 14:36:26 +02:00
wm4 9df2260506 core: add --reset-on-next-file option
This option can be used to selectively reset settings when playing the
next file in the playlist (i.e. restore mplayer and mplayer2 behavior).

Might remove this option again should it turn out that nobody uses it.
2013-04-10 21:32:46 +02:00
wm4 4e55a6e828 Remove some apple remote leftovers
The options and key names don't do anything anymore.
2013-04-05 23:59:39 +02:00
wm4 75afa370b9 demux_mkv: try to show current subtitle when seeking
Makes sure that seeking to a given time position shows the subtitle at
that position. This can fail if the subtitle packet is not close enough
to the seek target. Always enabled for hr-seeks, and can be manually
enabled for normal seeks with --mkv-subtitle-preroll.

This helps displaying subtitles correctly with ordered chapters. When
switching ordered chapter segments, a seek is performed. If the subtitle
is timed slightly before the start of the segment, it normally won't be
demuxed. This is a problem with all seeks, but in this case normal
playback is affected. Since switching segments always uses hr-seeks,
the code added by this commit is always active in this situation.

If no subtitles are selected or the subtitles come from an external
file, the demuxer should behave exactly as before this commit.
2013-04-04 14:45:29 +02:00
wm4 ccc213fdac core: add --heartbeat-interval option
This closely follows MPlayer commit 36099, with some changes.

Move a mutable static variable into MPContext.
2013-04-04 14:24:42 +02:00
wm4 c80c6fa270 manpage: fix a typo 2013-03-31 22:00:56 +02:00