Skip to content

Instantly share code, notes, and snippets.

@olejorgenb
Last active July 2, 2023 02:07
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save olejorgenb/a5194d9bc183dbe0bfb02aac18fe37f9 to your computer and use it in GitHub Desktop.
Save olejorgenb/a5194d9bc183dbe0bfb02aac18fe37f9 to your computer and use it in GitHub Desktop.
mpv user script: copy a command that will resume video at current position
@elig0n
Copy link

elig0n commented Jun 18, 2020

@sergeevabc could you please try again now ?

@sergeevabc
Copy link

@elig0n, still does not work.

@NothingSpecialOne
Copy link

We need a hero here.

Here i am, @sergeevabc
You have to add just a single line into input.conf file, to make the magic happen
Shift+c run "cmd.exe" "/d" "/c" "echo mpv --start=${time-pos} ${path}|clip"
That's it, no scripts have been used
And the cherry on the cake - youtube timestamp link
Ctrl+c run "cmd.exe" "/d" "/c" "echo ${path}^^^&t=${=time-pos}|clip"
but it sux, because of milliseconds at the timestamp (416.280000 for example), and link would not work properly until you delete them (416 is what we need, in this case) manually, also link ends with new line (\n) symbol
I have no idea - is this even possible to get seconds only, from current playback time, or needs a feature request, probably
Anyway, the trick is - NO scripts
Windows only solution

@sergeevabc
Copy link

@NothingSpecialOne, thank you! It works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment