summaryrefslogtreecommitdiffstats
path: root/player/lua
Commit message (Collapse)AuthorAgeFilesLines
* ytdl_hook: add ytdl:// prefix again for non-youtube playlistsRicardo Constantino2018-02-111-2/+6
| | | | | | | | Only youtube playlists return ID-only urls. Other extractors may return "<extractor>:<ID>" so those still need the ytdl:// prefix. Reproduced with http://www.cbc.ca/burdenoftruth/videos/trailers-promos/burden-of-truth-returns
* ytdl_hook: add script opt for using manifest URLsRicardo Constantino2018-02-111-2/+3
| | | | | | | | | | | Disable by default. This feature was added in 7eb342757, which allowed stream selection in runtime. Problem with this atm is that FFmpeg will try to demux every first packet of every track leading to noticeable delay opening the URL. This option can be changed to enabled by default or removed when HLS/DASH demuxers are improved upstream.
* ytdl_hook: parse youtube playlist urls to set start indexRicardo Constantino2018-02-111-5/+53
| | | | | | | | | | | | | | Still needs `--ytdl-raw-option=yes-playlist=` because this only works for youtube. This was requested in a few issues: https://github.com/mpv-player/mpv/issues/1400 https://github.com/mpv-player/mpv/issues/2592 https://github.com/mpv-player/mpv/issues/3024 For #1400 to be completely implemented would need ytdl_hook to re-request the same playlist with the last video's ID for the mix to continue indefinitely which would probably too hackish to work reliably.
* ytdl_hook: exit early, save an indentation levelRicardo Constantino2018-02-111-164/+165
|
* ytdl_hook: various nitRicardo Constantino2018-02-111-9/+5
| | | | | | | | Remove obsolete comment about FFmpeg ignoring non-http proxies which was repeated in ytdl_hook before the feature was added. Remove unnecessary conditions for not nil. Lua tables will always return nil for non-existent keys.
* ytdl_hook: whitelist subtitle URLs as wellRicardo Constantino2018-02-111-2/+4
| | | | | This was overlooked when doing the whitelisting for video and audio to fix #5456.
* ytdl_hook: use fallback if there's no demuxer-lavf-list propRicardo Constantino2018-02-111-3/+3
| | | | | | | This is important if backporting by grabbing the latest version of the script without backporting the commit that added the property: 828bd2963cd10a851e0a977809687aed4d377dc3
* ytdl_hook: pass http proxy to ffmpegRicardo Constantino2018-01-301-15/+27
| | | | | | | | | | | | | | FFmpeg only suppports http proxies and ignores it if the resulting url is https. Also, no SOCKS. Use it like `--ytdl-raw-options=proxy=[http://127.0.0.1:3128]` so it doesn't confuse mpv because of the colons. You need to pass it as an option because youtube-dl doesn't give us the proxy. Or just set `http_proxy` environment variable as recommended before. Added example using -append, which doesn't need escaping.
* ytdl_hook: pre-append id-only playlist items with shortened youtube URLRicardo Constantino2018-01-291-1/+1
|
* ytdl_hook: whitelist segmented DASH and HLS for the manifests codeRicardo Constantino2018-01-271-7/+9
| | | | Close #5453
* ytdl_hook: prefer hls/dash manifest if availableRicardo Constantino2018-01-261-6/+10
| | | | | | | This makes all the video/audio variants available for selection. Might break with non-hls/dash, or even with dash if FFmpeg wasn't compiled with the demuxer.
* ytdl_hook: fix safe url checking with EDL urlsRicardo Constantino2018-01-261-11/+11
|
* ytdl_hook: move url_is_safe earlier in codeRicardo Constantino2018-01-261-9/+9
| | | | lua isn't javascript.
* ytdl_hook: whitelist protocols from urls retrieved from youtube-dlRicardo Constantino2018-01-261-7/+47
| | | | | | Not very clean since there's a lot of potential unsafe urls that youtube-dl can give us, depending on whether it's a single url, split tracks, playlists, segmented dash, etc.
* ytdl_hook: support native dash demuxer, if presentRicardo Constantino2018-01-151-1/+44
| | | | | | Uses track tbr instead of track disposition id for dash selection Works just as expected because youtube-dl also takes tbr from the manifests.
* osc: leave only demuxer cache duration and limit its refresh rateRicardo Constantino2018-01-141-19/+16
| | | | Sorta requested in #5390
* ytdl_hook: look for the right ytdl binary according to systemRicardo Constantino2018-01-121-1/+2
| | | | | | | | package.config is available in 5.1, 5.2, 5.3 and luajit, so should be fine. The first character is the path separator, so it's '\' on windows and '/' on *nix. This should also prevent cases where users download the wrong binary.
* ytdl_hook: be more informative when youtube-dl failsRicardo Constantino2018-01-121-2/+8
|
* ytdl_hook: don't try to use webpage_url if non-existentRicardo Constantino2018-01-111-1/+1
|
* ytdl_hook: actually use the script option from 87d3af6Ricardo Constantino2018-01-071-1/+1
|
* ytdl_hook: add script option to revert to trying youtube-dl firstRicardo Constantino2018-01-071-2/+3
| | | | | Should only make a difference if most of the URLs you open need youtube-dl parsing.
* ytdl_hook: check for possible infinite loop in playlist generationRicardo Constantino2018-01-061-7/+8
|
* ytdl_hook: add additional check for comedycentral urlsRicardo Constantino2018-01-061-1/+2
| | | | | | | If this breaks another site again, remove this whole if and just leave them as separate playlist items. Close #5364
* ytdl_hook: update obsolete warning about retrying URL if failedRicardo Constantino2018-01-041-1/+1
|
* osc: add seekbarkeyframes as a user optiondudemanguy2018-01-031-2/+3
|
* player: add on_load_fail hookRicardo Constantino2018-01-021-1/+1
|
* osc: check if demuxer cache has not reached eofRicardo Constantino2018-01-021-3/+3
| | | | Avoids flickering stream cache status while filling the demuxer cache.
* ytdl_hook: fix single-entry playlistsRicardo Constantino2018-01-021-9/+8
| | | | Close #5313
* osc: hide cache if not forced for local filesRicardo Constantino2017-12-261-13/+7
| | | | | Also hide cache if 'cache-used' is 0 (usually means video fits entirely within demuxer-cache-duration or stream cache is disabled).
* stats: enhance cache statsJulian2017-12-261-19/+35
| | | | | | Show total cache as well as demuxer cache separately. This adjusts the presented values to be consistent with status line and OSC modifications made in https://github.com/mpv-player/mpv/pull/5250
* lua: implement mp_utils.format_bytes_humanizedJulian2017-12-261-0/+10
|
* osc: make seek ranges rendering optionalpavelxdd2017-12-261-0/+4
| | | | | This commit adds a new osc setting `seekranges` to control the seek ranges visibility.
* ytdl_hook: use table concat for playlist buildingRicardo Constantino2017-12-241-5/+4
| | | | Faster and more efficient than string concat with large playlists.
* ytdl_hook: don't preappend ytdl:// to non-youtube links in playlistsRicardo Constantino2017-12-241-1/+5
| | | | Close #5003
* osc: show demuxer cache buffered amount in byteswm42017-12-231-2/+6
| | | | | | | | Same as previous commit, but for the OSC. (A bit of a waste to request demuxer-cache-state at least twice per frame, but the OSC queries so many properties it probably doesn't matter anymore.)
* lua: implement mp.msg.traceNiklas Haas2017-12-151-0/+1
|
* msg: reinterpret a bunch of message levelsNiklas Haas2017-12-151-7/+7
| | | | | | | | | | | | | | | | | | | | | | I've decided that MP_TRACE means “noisy spam per frame”, whereas MP_DBG just means “more verbose debugging messages than MSGL_V”. Basically, MSGL_DBG shouldn't create spam per frame like it currently does, and MSGL_V should make sense to the end-user and provide mostly additional informational output. MP_DBG is basically what I want to make the new default for --log-file, so the cut-off point for MP_DBG is if we probably want to know if for debugging purposes but the user most likely doesn't care about on the terminal. Also, the debug callbacks for libass and ffmpeg got bumped in their verbosity levels slightly, because being external components they're a bit less relevant to mpv debugging, and a bit too over-eager in what they consider to be relevant information. I exclusively used the "try it on my machine and remove messages from MSGL_* until it does what I want it to" approach of refactoring, so YMMV.
* Revert "ytdl: handle HLS with FFmpeg"Kevin Mitchell2017-12-071-4/+1
| | | | | | Apparently, this breaks youtube live and possibly other things. This reverts commit 06519aae5837312437b07e8bfef10c025ec2f688.
* ytdl: handle HLS with FFmpegwm42017-12-061-1/+4
| | | | | Using youtube-dl's metadata ends up with stupid things like missing variant streams, or missing audio streams entirely.
* osc: make cycling visibility an input.conf key bindingwm42017-11-031-1/+1
| | | | | As builtin script, it should not register global key bindings, and add them to input.conf instead. This is similar to what stats.lua does.
* osc: render seek ranges a bit less uglyChrisK22017-11-021-1/+1
|
* osc: render seek rangeswm42017-11-021-0/+26
| | | | | | Pretty fucking ugly, but I'm not a UI designer. Of course only does something with --demuxer-seekable-cache.
* stats: add file sizeJulian2017-10-131-1/+2
| | | | also one minor cosmetic change: comment the "coming soon" dummy page
* stats: change the way toggling/oneshot works internallyJulian2017-10-091-106/+109
| | | | | | | | | | | | | | | | Previously multiple timers were used to realize oneshot, toggling (redrawing) and page keybindings. The oneshot case in particular also relied on mp.osd_message to display text only for a given duration. This was changed to only use one timer in total now. Because now each case has a defined "start" and "end" point (including oneshot) mp.set_osd_ass() can be used to print stats as well. This is currently optional and has to be activated using the config option persistent_overlay=true. One shortcoming: oneshot and toggling are mutual exclusive right now. Previously you could enter toggling while oneshot stats were shown, this is not possible anymore to reduce the number of cases to be considered. This can be added later on if desired.
* stats: stop coloring timing valuesJulian2017-10-091-26/+8
| | | | | | It used a bad heuristic that got even worse/less reliable with recent changes in mpv. In fact, it's not reliable at all. Watch out for dropped frames instead. That's a useful indicator.
* stats: add current and total chapter numberJulian2017-10-091-1/+8
| | | | | Fixes #44 (well, partially, I'm still not sure about the time)
* stats: add audio and video filtersJan Janssen2017-10-091-0/+55
|
* stats: reorganize the framedrop countersNiklas Haas2017-10-091-4/+5
| | | | | Clarified the relationship between `Dropped` and `VO`, and also merged the DS-exclusive stats into the DS line.
* stats: revert DR indicator as it's unnecessaryJulian2017-10-091-2/+1
| | | | | It's apparently already stated as part of the upload pass name. This reverts commit ec837f64c29a1b825e28b65edc34059b6c1cad40.
* stats: reduce default font size to 8Julian2017-10-091-1/+1
|
* stats: visually indicate direct renderingJulian2017-10-091-1/+2
|
* stats: change font weight of % sign as wellJulian2017-10-091-1/+1
| | | | Due to popular demand
* stats: fix indentation/newline of frame timing pageJulian2017-10-091-11/+11
| | | | There was a superfluous newline and some indentation
* stats: show % of a pass on frame timing pageJulian2017-10-091-9/+23
|
* stats: always print perfdata totalJulian2017-10-091-7/+4
| | | | There's no point in disabling it anyway
* stats: make add_header() append at current positionJulian2017-10-091-7/+7
|
* stats: print perfdata total by defaultJulian2017-10-091-1/+1
| | | | There is enough space now
* stats: mark dummy as suchJulian2017-10-091-1/+1
|
* stats: correctly re-eval ASS tag usageJulian2017-10-091-11/+17
| | | | Fixes #42
* stats: make page keybinding repeatableJulian2017-10-091-1/+1
| | | | There's no reason it's not.
* stats: remove table in tableJulian2017-10-091-14/+6
| | | | | | Almost cosmetic change. This tables-in-table was done back when we actually processed strings but that's long ago now and no longer needed nor useful.
* stats: resilience against accidential timer removalJulian2017-10-091-9/+12
| | | | | | | Previously I could trigger a bug with intense button mashing, however, was unable to reproduce it and therefore debug it. This change now seems to be resilient against button mashing, let's hope it really is.
* stats: allow keybindings for specific pageJulian2017-10-091-12/+21
| | | | | | A keybinding in input.conf like: e script-binding stats/display-page-2 can be used to directly show the respective page (2, in this case)
* stats: support for multiple "pages" of statsJulian2017-10-091-26/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Please note that the latest version of this script needs a very recent version of mpv (from yesterday, to be precise, see the readme). For older versions, please go to "releases". HOW IT WORKS: While the stats are visible (i.e. text is printed to the OSD) a subsequent click on a numeric key (1, 2, ...) will display the corresponding "page". This works no matter if the stats are toggled or just shown as a single invocation. In case of a single invocation, the newly displayed page will be shown for the full duration again. The selected page will be remembered (not persistantly though). So far, only 3 pages are available. 1: the default page, stats as they used to be 2: extensive VO performance stats (to be redesigned/changed soon) 3: dummy In the future, many more pages are possible. Implementation is likely to change again (functionality will stay the same). A new timer had to be introduced to remove the forced keybindings in the oneshot case. The toggle case can remove them without a timer. Ensuring that each mode won't remove timers of the other mode didn't really turn out neat. Therefore, I intend to change this again, maybe by merging the oneshot case into the toggle case.
* stats: remove check for lua timer functionJulian2017-10-091-8/+0
| | | | | We now require a modern mpv version. `property_aliases` is kept for future use.
* stats: rescale graphs to make the average align with the center, if possibleNiklas Haas2017-10-091-4/+11
| | | | | For vsync measurements this is not currently done because they don't track their average
* stats: add support for `vo-passes`, which replaces `vo-performance`Niklas Haas2017-10-091-68/+60
| | | | | | | | | | | Due to the large amount of per-pass data, the function takes a parameter indicating whether or not to print a simplified view instead. The overall intent is to print the simplified view for now, but supposed printing the full view on a dedicated "tab" (or extra view type), and as such, `o.print_perfdata_passes` will go away again. I've only introduced it for now so users can play around with this functionality if they want to, until Argon- gets around to implementing stats "tabs".
* stats: update HDR peak for upstream changesNiklas Haas2017-10-091-2/+2
| | | | | This no longer reports cd/m² but now reports a relative peak as a multiple of the SDR reference brightness.
* stats: add support for deprecated propertiesJulian2017-10-091-11/+21
| | | | | | | | | | | | | | Previously, we used a property and when it was unavailable we assumed it doesn't exist before assuming it really is just unavailable. This lead to unnecessarily falling back to deprecated properties which made mpv print deprecation warnings. Now we can really check if a property is not known to mpv. The alternative would've been to check the error part of mp.get_property and perform string comparisons on the returned error message. Not sure if supporting old mpv versions is actually worth it though. Fixes #37 #36
* stats: comment to remind me about deprecated propertiesJulian2017-10-091-0/+1
|
* stats: add new versions of decoder and VO dropped frame countsRicardo Constantino2017-10-091-1/+5
|
* stats: put vsync ratio and jitter on the same lineJulian2017-10-091-15/+10
| | | | Free some vertical space. Hope this doesn't hurt visibility.
* stats: declare function as localJulian2017-10-091-1/+1
| | | | Apparently forgot this one
* stats: use container-fps together with fps (as fallback)Julian2017-10-091-1/+3
| | | | | This was already done for the actual stats a few months ago. Now it is also used by the perfdata coloring code.
* stats: rename option timing_total to print_perfdata_totalJulian2017-10-091-2/+2
| | | | | Should make its purpose more clear. Also add a comment to further explain its use.
* stats: add vsync-ratio and vsync-jitterJulian2017-10-091-69/+138
| | | | | | | | | | | | | | | |