4

I'm using mpv Media Player in Ubuntu 17.10, and whenever I take a screenshot it goes to the home directory. Is there any way to change the directory for the screenshots taken?

3

Edit: Based on a comment by doug, who does a lot of work with mpv, one can simply edit ~/.config/mpv.conf to add screenshot-directory=~/Public/ if $HOME/Public is the desired destination.


The following works with mpv/xenial,now 2:0.28.0~xenial1 amd64 [installed] and with mpv/bionic,now 0.27.0-2ubuntu4 amd64 [installed]. I haven't tested with the version available on 17.10.

I copied over /usr/share/applications/mpv.desktop to $HOME/.local/share/applications.

I then modified the Exec line from

Exec=mpv --player-operation-mode=pseudo-gui -- %U

to

Exec=mpv --player-operation-mode=pseudo-gui --screenshot-directory=$HOME/Public/ -- %U

and saved SHOME/.local/share/applications/mpv.desktop. Now, when I open a video with mpv and take a screenshot, the screenshot is saved to $HOME/Public.

Read https://mpv.io/manual/master/ for adjusting the quality of screenshots, naming them, and the format desired.

7
  • 1
    It worked perfectly after a small edit.
    – Kendots
    Jan 27 '18 at 13:12
  • What was the edit? Maybe I can use it as well!
    – DK Bose
    Jan 27 '18 at 13:16
  • Well let's say I just wanted it in the Public directory, at first I copied your path: $HOME/Public/. But that created a $Home directory and a Public directory inside it. So instead I made the path into just: Public/
    – Kendots
    Jan 27 '18 at 13:18
  • Thanks for that! I didn't see that but I'll recheck on my system.
    – DK Bose
    Jan 27 '18 at 13:23
  • Really the proper way is to just add an entry to ~/.config/mpv.conf So in your case the entry would be screenshot-directory=Public/ Note that options added to mpv.conf are not preceded by --
    – doug
    Jan 27 '18 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.