Coder Social home page Coder Social logo

mpv-scripts's People

Contributors

cogentredtester avatar keiviv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpv-scripts's Issues

[profile-command.lua] How to use?

I haven't understoond well what's the purpose of this script; does it allow the use of profile-conditional key bindings? So I could use RIGHT/LEFT arrow while viewing image files to go to the next /previous file? Currentlu I use the following auto profile:

[image-only]
profile-cond=p['current-tracks/video/image'] and not p['current-tracks/video/albumart']
profile-restore=copy
osd-playing-msg=

My long-time desire would be to use different key bindings depending on the profile I'm using. Does this script make this possible?

YouTube Search Feature Request: use Invidious/Newpipe API as an option?

I have succesfully made MPV into my personal dream player, thanks in no small part to plug-in developers like you. YouTube Search was a plugin I initially avoided because I didn't want to log into my Gmail Account just to fetch the required YT API, but one day I decided "to heck with it" because I do most of my YT Viewing through MPV anyway. So I opened a temporary container in FireFox, got my API Key, plugged it into this plugin, and I've been happily using it since.

....But here's the thing. What if I wanted to reccomend this plugin to someone who doesn't have a Google/GMail account, and is unwilling to make one just to use this plugin? What workaround could they use?

My proposal? Invidious API. Or Newpipe API. Either option works. I don't know if it could work with this plugin, but I can only presume it's possible because of the many apllications that offer to use Invidious/Newpipe API as well as Google API, including FreeTube, NewPipe (duh), etc.

youtube-search.lua: Use yt-dlp instead of curl+API

#####################################
Is this a request for a brand new script?
If so please make a Discussion thread instead
#####################################

Is your feature request related to a problem? Please describe.
I like the idea of being able to search and browse Youtube infinitely, but having to enter API key is a bit rough, yt-dlp support searching out-of-the-box and doens't require API at all.

Describe the solution you'd like
Use yt-dlp instead, with --flat-playlist it's very very fast:

yt-dlp ytsearch10:SEARCH --get-id --get-title --flat-playlist

10 = number of result, of course it must be used with --flat-playlist to increase searching speed by ten forth.

Describe alternatives you've considered
yt-dlp instead of curl+API

Additional context
Should be good enough information.

Add it mplug script directory

#####################################
Is this a request for a brand new script?
If so please make a Discussion thread instead
#####################################

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Addition to mplug repo
Describe the solution you'd like
A clear and concise description of what you want to happen.
Mplug is like a package manager but for mpv scripts.
Please add your script there (if already not there) and also installation instructions in manifest - https://github.com/Nudin/mpv-script-directory/blob/master/HOWTO_ADD_INSTALL_INSTRUCTIONS.md
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

All the ' are displayed as ' when searching

This is really a minor issue but I'm wondering if there is a way I could fix it. Is it something I can fix editing the files or it's not possible?

Edit: I'm talking about the youtube-search script btw.

keep-session.lua: "auto_load" resize mpv window although mpv.conf "auto-window-resize=no"

Without keep-session.lua :

  1. Set auto-window-resize=no in mpv.conf
  2. Open mpv
  3. Set whatever size for mpv window
  4. Load a video file
  5. mpv window keep his original size

With keep-session.lua :

  1. Set auto-window-resize=no in mpv.conf
  2. Add keep-session.lua to "scripts" path
  3. Open mpv
  4. Set whatever size for mpv window
  5. Load a video file
  6. mpv keep his original window size
  7. Close mpv
  8. Open mpv
  9. keep-session.lua auto_load the last video file
  10. mpv change his window size

Expected behaviour
10. mpv keep his original window size

Please complete the following information:

  • OS: Windows 11
  • mpv version v0.36.0-707-gcb2b579f
  • log.log

script-name: keep-session.lua

#####################################
Is this a request for a brand new script?
If so please make a Discussion thread instead
#####################################

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like

  1. Keep multiple sessions (playlist)
  2. add two commmand:
    session-prev: Jumps to the previous playlist of history, if there is one.
    session-next: Jumps to the next playlist of history, if there is one.

How to specify no-osd with the new syntax of the Cycle-commands plugin?

Hello!

Thanx for keeping maintaining and improving your code; the new syntax is great! Easier to read, and efficient!

Since the command is now written to the OSD, is there a way to set "no-osd"?
The problem is that only the last subset of the command is written to the OSD, so it doesn't always make sense; for example let's say that you have the following command:

V script-message cycle-commands "set sub-font Sans ; set sub-color \"#FFFF00\" ; set sub-ass-override force" "set sub-font Sans ; set sub-color \"#000000\" ; set sub-ass-override force"

It will write set sub-ass-override force to the OSD (and only that, not the previous parts of the command) each time you press the V key. It's not very helpful ;) So I would prefer that it doesn't write anything at all. Is this possible?

I've tried to add no-osd at diferent places in the command, but it never had any effect...

Thanx for the help!

youtube-search: curl not returning search list

Describe the bug
The script is not getting search results after giving user input.

To Reproduce
Steps to reproduce the behaviour:

  1. Enter a search query
  2. Press enter

Expected behaviour
Returns a list of search results.

Please complete the following information:

  • OS: Linux (Nobara Linux 37)
  • mpv version: 0.35.0
  • mpv.log

Additional context
I get this in my console.

[youtube_search] Search did not return a results list
[youtube_search] search failed - attempting fallback
[youtube_search] curl: (3) URL using bad/illegal format or missing URL
[youtube_search]
[youtube_search] Search did not return a results list

curl version:

curl 7.85.0 (x86_64-redhat-linux-gnu) libcurl/7.85.0 OpenSSL/3.0.8 zlib/1.2.12 libidn2/2.3.4 nghttp2/1.51.0
Release-Date: 2022-08-31
Protocols: file ftp ftps http https 
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz SPNEGO SSL threadsafe UnixSockets

Edit: added curl version if needed

New cycle-commands syntax error with sharp sign

Hello,

I'm trying to convert my cycle-commands syntax to the new format, but it seems to fail each time a sharp sign must be used:

V script-message cycle-commands [ [["set","sub-font","Sans"],["set","sub-color","#FFFF00"]] , [["set","sub-font","Sans"],["set","sub-color","#000000"]] ]

It gives the following error:

[cycle_commands] command syntax incorrect for string: [ [["set","sub-font","Sans"],["set","sub-color","
[cycle_commands] if you see quotes around the above string then try removing them from input.conf

Thanx for the help,
Best regards,
Dupond

keep-session: add an option to remeber only the last opened video, not the playlist

Is your feature request related to a problem? Please describe.
I want to use this script together with autoload.lua, autoload.lua loads all files inside a folder into the playlist anytime you open a video, but keep-session.lua seems to override this playlist with its own (possibly outdated) playlist. This is a problem when I add new videos to a folder, that weren't there before when I last "saved my session".

Describe the solution you'd like
I would like an option in the config, which makes it so that the script only remembers the last video, not the whole playlist.

Describe alternatives you've considered
use a diffirent script for remembering the last video

Additional context
I'm not a programmer, so the reason for these 2 scripts not working together could be completely diffirent

Documentation: Unclear on how to set it up

Hi, I am a bit new to this. I moved all the scripts to C:\Users\User1\AppData\Roaming\mpv\mpv\scripts and I opened mpv. I can't seem to use all the features you've mentioned in the readme and I'd really appreciate it if you could tell me on how to set it up

image

`command-timeout.lua`: `screenshot` command doesn't print any OSD message

Describe the bug
Running script-message command-timeout ["screenshot"] 2 works but the OSD message (Screenshot - /path/to/screenshot) isn't printed, unlike when running screenshot.

To Reproduce

  1. Open any video file with $ mpv --no-really-quiet /path/to/video
  2. In mpv, open the console
  3. Run screenshot
  4. Screenshot - /path/to/screenshot, is displayed in the terminal, in mpv console and as an OSD message
  5. Run script-message command-timeout ["screenshot"] 2
  6. The screenshot message is only printed in the terminal and in mpv console, not in the OSD

Expected behaviour
script-message command-timeout ["screenshot"] 2 should behave like screenshot (the OSD message should be printed in mpv window)

Please complete the following information:

  • OS: Linux
  • mpv version: mpv 0.35.0

[cycle-profile] How to restore default profile?

I've added this to mpv.conf:

[profile1]
profile-restore=copy
brightness=-50
contrast=100

And this to input.conf:

W   script-message cycle-profiles "profile1"

And it applies the custom profile correctly, but how do I restore the default one?
I've tried script-message cycle-profiles "profile1;profile1 restore" with no success.

Latest commit on keep-session.lua forces mpv to play first video on playlist.

Even from starting in file manager if I choose video 20 mpv starts video 1.
Also somehow the script is not being automatically loaded even after adding this line
scripts-opts-append=keep_session-auto_load=yes
in mpv.conf.
It was working but somehow broke after update.
After reverting to the past .lua without the latest commit the problem with the first video in playlist being forced to play is solved but mpv still doesn't load automatically so I don't know why if it's a problem with my mpv or with the script.

youtube-search: ctrl+i breaks searching.

Another MPV Plugin (Youtube+Download) uses the crtl+i command (by default) for downloading videos with subtitles embedded. While testing this command for conflicts, I found it summoned the search bar for youtube-search, which is weird because the default command for that (and likewise how I have it set) is ctrl+y. I tried ctrl+y, and it wouldn't summon the search bar. Tried ctrl+i again, and nothing happened. Tried shift+y twice, nothing happened. Closed MPV and restarted it, and shift+y and ctrl+y worked as intended, but using ctrl+i again would summon the search bar randomly, and break the plugin as previously detailed until I refreshed MPV. Likewise, if I use ctr+i before using any other youtube-search commands, no Search Bar will appear, but the ctrl+y command will be broken anyway.

tldr: using the ctrl+i keyboard command breaks the plugin and makes it impossible to use the search functionality without closing the session and starting a new one.

Looking at the plugin's code, nowhere is Ctrl+i ever mentioned, which makes this even weirder.

youtube-search: Update Description in README.md

#####################################
Is this a request for a brand new script?
If so please make a Discussion thread instead
#####################################

Is your feature request related to a problem? Please describe.
Not too long ago I requested an option to use Invidious API in the Youtube-Search.lua script, and that suggestion has since been made into a reality. In the README for this repo, however, it still says a YouTube API Key is needed to use the script. Obviously, this is outdated.

Describe the solution you'd like
An updated README that specifies that either a YouTube API Key or the URL for a working Invidious Instance is required (as opposed to just the YouTube API Key).

Additional context
That's all. Not much else to say. Thanks for making these excellent MPV Scripts, and for being responsive to bug reports, feature requests etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.