aboutsummaryrefslogtreecommitdiffhomepage
path: root/player/lua
Commit message (Collapse)AuthorAge
* ytdl: fix brightcove urlsGravatar Ricardo Constantino2016-05-30
|
* ytdl_hook: support multi-arc subtitlesGravatar Ricardo Constantino2016-05-23
| | | | While at it, pass durations of segments from ytdl if available.
* lua: add timer:is_enabled() functionGravatar Julian2016-05-14
| | | | | Allows to query if some timer is currently running or was stopped/killed.
* ytdl_hook: Just check if protocol is rtmpGravatar Ricardo Constantino2016-05-14
| | | | Partial fix to #3090
* lua: don't require key for mp.add_key_binding()Gravatar wm42016-03-26
| | | | | Requested. The intention is that scripts can provide mappable actions for key bindings without setting a default key.
* lua: don't suspend core by default during script executionGravatar wm42016-03-18
| | | | | | | | | This changes behavior somewhat. The old behavior can be restored by running "mp.use_suspend=true". It was originally introduced for the OSC, but I can't reproduce whatever misbehavior I was seeing. (See mp.suspend()/resume() for explanations what the suspend mechanism does.)
* ytdl_hook: handle optional format_noteGravatar ▟ ▖▟ ▖2016-03-10
| | | | | some extractors don't return a format_note for their audio stream which resulted in commandv complaining "argument 4 is not a string" (got nil).
* osc: fix mouse areasGravatar wm42016-03-08
| | | | | | | | The scaling was the wrong way around, and the section name was missing. Regression since commit 5fa45fb5. Fixes #2916.
* osd, lua: remove weird OSD scalingGravatar wm42016-03-07
| | | | | | | | | | | | | | | | | | | | | Do not scale OSD mouse input to the ASS OSD script resolution. The original idea of this mechanism was that the user doesn't have to care about the actual resolution of anything, and can just use the OSD resolution consistently. But this made things worse. Remove the implicit scaling, and always use the screen resolution. (Except with --vo=xv, where additional scaling is forced upon everything.) Drop get_osd_resolution(). There is no replacement. Rename get_screen_size() and get_screen_margins() to use "osd" instead of "screen". For anything but --vo=xv these are equivalent, but with --vo=xv the OSD resolution has additional implicit scaling. Add code to osc.lua which emulates the old behavior. Note that none of the changed functions were public API, so implicit breakage of scripts which used it is just going to happen.
* osc: add always-on mode and unify visibility mode (always/never/auto)Gravatar Avi Halachmi (:avih)2016-02-27
| | | | | | | | | | | | | Adds always-on mode by internally utilizing hidetimeout as negative and forbidding the user to set negative values. This removes script-message to enable/disable the osc, and instead introduces a combined 'visibility' control with the values never/auto/always. It's available via script_opts and script_message as 'osc-visibility'. As message, it also supports a 'cycle' value. The del key is bound to cycling the visibility modes.
* osc: fix runtime enable_osc(true/false)Gravatar Avi Halachmi (:avih)2016-02-27
| | | | | | | | | | | There were few issues: - When it's disabled and then enabled, it was displaying the osc briefly and then autohide right away. Don't do that. - When it's enabled and then disabled, it was not removing the osc from screen if called while the osc is visible (because tick() is responsible for the hide but it doesn't render() the empty osc when the osc is disabled). - Due to delayed/async unbinding of mouse events it was possible to show_osc() after it got disabled e.g. from mouse_move. Prevent this.
* ytdl: Include Referer header as wellGravatar Yen Chi Hsuan2016-01-10
| | | | | Some videos require correct Referer header for downloading, or 403 Forbidden is thrown.
* ytdl: disable --all-subs if "sub-lang" is in raw-optionsGravatar Ricardo Constantino2015-10-24
| | | | | | Defaults stay the same (--all-subs is used if sub-lang wasn't used.) Don't forget to also add "write-sub=" if using sub-lang or else it won't work.
* ytdl: Set a proper label for external audio tracksGravatar ChrisK22015-10-11
|
* ytdl: Remove DASH hacks, use DASH by defaultGravatar ChrisK22015-10-11
| | | | | | | | | | | Thanks to rcombs, ffmpeg now properly supports DASH and we can remove our hacks for it and use it by default whenever available. If you don't like this for whatever reason, you can get the "normal" streams back with --ytdl-format=best . Closes #579 Closes #1321 Closes #2359
* ytdl: Remove version check and minor cleanupGravatar ChrisK22015-10-06
| | | | Closes #2370
* ytdl: Don't override user-set format in no-video modeGravatar ChrisK22015-09-30
|
* osc: reinit on playlist changesGravatar Kevin Mitchell2015-08-29
| | | | | | This takes care of the corner case where the player is started with a single playlist entry so that the next/prev arrows are greyed out, but remain that way even after new elements are added to the playlist.
* osc: exit tick immediately if disabled.Gravatar torque2015-08-28
| | | | | | | | | | | Even after it has been disabled with the `disable-osc` message, the OSC continues to run the tick function. Completely preventing tick from being called is impractical since there are several different places that it's called in the code, so just make it immediately return if the OSC has been disabled. This prevents the OSC from continuing the clear the OSD on every tick, allowing other scripts to disable it so that they may draw to the OSD.
* ytdl: catch bogous extractor infoGravatar ChrisK22015-08-27
| | | | | | | Some extractors may claim to have extracted subtitles, but then set the relevant fields to null. Try to catch those cases. Fixes #2254
* osc: avoid annoying verbose mode log spamGravatar wm42015-08-10
| | | | | | | | enable_key_bindings()/disable_key_bindings() now prints a log message on each call, thus we should avoid makign redundant calls. This could probably be solved more elegantly, but since this is all legacy/private API, don't bother.
* lua: implement input_enable_section/input_disable_section via commandsGravatar wm42015-08-06
| | | | | | | | | | | | | | | Removes some more internal API calls from the Lua scripting backend. Which is good, because ideally the scripting backend would use libmpv functions only. One awkwardness is that mouse sections are still not supported by the public commands (and probably will never), so flags like allow-hide- cursor make no sense to an outside user. Also, the way flags are passed to the Lua function changes. But that's ok, because they're only undocumented internal functions, and not supposed to be used by script users. osc.lua only does due to historical reasons.
* lua: make mp.input_define_section use the define-section commandGravatar wm42015-08-06
|
* osc: completely disable if no VO window existsGravatar wm42015-08-04
| | | | | Fixes relatively excessive CPU usage when paused while playing audio only.
* player: remove higher-level remains of DVD/BD menu supportGravatar wm42015-08-03
| | | | | | | | | | | | | | | Nobody wanted to restore this, so it gets the boot. If anyone still wants to volunteer to restore menu support, this would be welcome. (I might even try it myself if I feel masochistic and like wasting a lot of time for nothing.) But if it does get restored, it should be done differently. There were many stupid things about how it was done. For example, it somehow tried to pull mp_nav_events through all the layers (including needing to "buffer" them in the demuxer), which was needlessly complicated. It could be done simpler. This code was already inactive, so this commit actually changes nothing. Also keep in mind that normal DVD/BD playback still works.
* ytdl: get start_timeGravatar Ricardo Constantino2015-07-29
|
* ytdl: print command in debug modeGravatar Ricardo Constantino2015-07-29
|
* ytdl: don't print failure warning when youtube-dl was killed by usGravatar wm42015-06-27
|
* osc: time display configuration optionsGravatar Teoh Han Hui2015-06-19
| | | | Total time and ms
* ytdl_hook: Support 'multi_video' resultsGravatar Jaime Marquínez Ferrándiz2015-06-07
| | | | | They can be handled by the same codes used for playlists, most of them will use an EDL. Fixes #2027.
* lua: fix options submoduleGravatar wm42015-05-29
| | | | | | | | | It polluted the global namespace, instead of exporting the function properly. For now, keep it compatible by explicitly keeping the bogus export. Also fix a mistake in the manpage example.
* input: allow - as separator between commands, instead of _Gravatar wm42015-05-25
| | | | | | | | | | Wnile it seems quite logical to me that commands use _ as word separator, while properties use -, I can't really explain the difference, and it tends to confuse users as well. So always prefer - as separator for everything. Using _ still works, and will probably forever. Not doing so would probably create too much chaos and confusion.
* ytdl: do not use deprecated optionGravatar wm42015-05-23
| | | | This was missed in commit 450af053.
* options: rename --media-title optionGravatar wm42015-05-22
| | | | Conflicts with the property.
* command: deprecate the "length" propertyGravatar wm42015-05-22
| | | | It collides with the --length option.
* ytdl_hook: remove tabsGravatar wm42015-05-09
| | | | We don't allow tabs in normal source code.
* ytdl_hook: Escape EDL URLsGravatar ChrisK22015-05-07
| | | | | Should prevent the EDL parser from tripping over = and , in the URL.
* osc: redo slider position translationGravatar ChrisK22015-04-28
| | | | | | Now done in one place instead of mulitple times all over the code. Fixes #1876
* ytdl_hook.lua: Change format options when vid is "off"Gravatar robin2015-04-27
| | | | | | | | This will change the format option to "bestaudio/best" instead of passing the "-x" argument to yt-dl. Prevents the video still being downloaded in the new mpv versions where the yt-dl format is set to "best" by default.
* osc: add nil check for element.eventresponderGravatar wm42015-04-23
| | | | Possibly fixes a crash (see #1101).
* osc: paint over a crashGravatar wm42015-04-22
| | | | | Sometimes tries to index a nil object when seeking close to the end of the file. See #1101.
* ytdl: set additional properties for rtmp streamsGravatar Sebastian Mayr2015-04-09
|
* ytdl_hook.lua: Disable video when vid option is "no"Gravatar robin2015-04-09
| | | | | | When setting options like --no-video, ytdl_hook adds the "-x" argument to youtube-dl, so that bandwith is saved by not downloading the video on some sites.
* lua: replace getcwd() implementationGravatar wm42015-03-24
|
* Lua: add unpack shim for Lua 5.2/5.3 compatibility.Gravatar torque2015-03-06
| | | | | | | | | The global unpack function got moved to table.unpack in Lua 5.2, and it's only available as the global if 5.2 is built with compatibility enabled (the default). Lua 5.3 does not build with 5.1 compatibility by default. Fixes #1648.
* ytdl: add "--ytdl-params" optionGravatar Thiago Kenji Okada2015-02-25
| | | | | | | | | | | This option allows the user to pass non-supported options directly to youtube-dl, such as "--proxy URL", "--username USERNAME" and '--password PASSWORD". There is no sanity checking so it's possible to break things (i.e. if you pass "--version" mpv exits with random JSON error). Signed-off-by: wm4 <wm4@nowhere>
* ytdl: add --no-warningsGravatar wm42015-02-24
| | | | | | Silences "[ytdl_hook] WARNING: video doesn't have subtitles", which was an annoying and pointless message printed with almost all youtube videos.
* ytdl: Adapt to new subtitles structureGravatar Jaime Marquínez Ferrándiz2015-02-24
| | | | The requested formats can be sorted by preference and the result gives now an url or the subtitles file content
* lua: do not use math.pow()Gravatar wm42015-01-25
| | | | | It's the first thing that breaks with Lua 5.3. I don't know if there are other failures because I don't care enough.
* ytdl: implement user-agent and cookie overridesGravatar wm42015-01-24
| | | | | | | | | | | | | | | | For some sites, youtube-dl sends a special user-agent. If we don't send the same user-agent, the server will reject mpv's connection attempt. This was observed with trailers.apple.com. Fix it by forcing the user-agent youtube-dl uses. Some sites set cookies when doing a website access, and require the client to provide these cookies when downloading the actual media. This is needed at least by nicovideo.jp. Fix by adding youtube-dl's cookies to our request headers. Both of these require a very recent youtube-dl version (youtube-dl added the necessary headers a few hours ago). The script still works with older youtube-dl versions, though.