abarbarian Posted March 21, 2024 Posted March 21, 2024 (edited) Am trying to get mpv screen shots to save to a customized folder. They normally save to the .temp folder and only save one which gets overwritten when you take another one. So far I have tried adding this to the /home/bloodaxe/.config/mpv/mpv.conf. This is suggested to work both in the Arch Wiki and other sources on the net. Quote screenshot-directory=Screenshots/mpv-screenshots screenshot-template="%F - [%P] (%#01n)" also tried Quote screenshot-directory=/home/bloodaxe/Screenshots/mpv-screenshots screenshot-template="%F - [%P] (%#01n)" Also tried to make a profile in /home/bloodaxe/.config/mpv/mpv.conf as advised in the Arch Wiki Quote Quote profile=myprofile #Top level area, load myprofile ontop=yes #Always on top [myprofile] #A simple profile, top level area ends here screenshot-directory=Screenshots/mpv-screenshots screenshot-template="%F - [%P] (%#01n)" and Quote profile=myprofile #Top level area, load myprofile ontop=yes #Always on top [myprofile] #A simple profile, top level area ends here screenshot-directory=/home/bloodaxe/Screenshots/mpv-screenshots screenshot-template="%F - [%P] (%#01n)" Nothing works. Any thoughts folks ? Edited March 23, 2024 by abarbarian Quote
securitybreach Posted March 21, 2024 Posted March 21, 2024 Let me see what I can find but that is odd as by default it should make one in the working directory and not overwrite each time. Quote
securitybreach Posted March 21, 2024 Posted March 21, 2024 I wouldnt think it would matter but all the examples I see have a trailing / after the directory like /home/bloodaxe/Screenshots/mpv-screenshots/ Quote
securitybreach Posted March 21, 2024 Posted March 21, 2024 May be worth looking at https://www.reddit.com/r/mpv/comments/180n3pp/save_screenshots_to_a_new_directory_based_on/ Quote
sunrat Posted March 22, 2024 Posted March 22, 2024 I messed with this for a few minutes longer than I should have. Definitely needs a trailing slash after the directory name. Quote
abarbarian Posted March 22, 2024 Author Posted March 22, 2024 20 hours ago, securitybreach said: I wouldnt think it would matter but all the examples I see have a trailing / after the directory like Well caught."/""\" can make a difference as in rysnc commands. This time it did not work. Yer Reddit link did not load. I had already looked at the post whilst hunting. I have aclean un fiddled with Arch set up and stuff still does not work for me. I'm cursed, cursed I tell you. Quote
abarbarian Posted March 22, 2024 Author Posted March 22, 2024 53 minutes ago, sunrat said: I messed with this for a few minutes longer than I should have. Definitely needs a trailing slash after the directory name. Ok thanks. I have left the "/" at the end but it still did not make a difference so my problem is something else. Quote
sunrat Posted March 22, 2024 Posted March 22, 2024 1 hour ago, abarbarian said: Ok thanks. I have left the "/" at the end but it still did not make a difference so my problem is something else. Here I just added screenshot-directory=/home/roger/mpv-screenshots/ to /home/roger/.config/mpv/mpv.conf and it works. It says it should create that directory if it doesn't exist but I had already created it manually. Maybe that profile stuff you added messed it up. Remove that and just try adding one config at a time. I also added screenshot-format=png and that works fine too. 2 Quote
abarbarian Posted March 22, 2024 Author Posted March 22, 2024 4 hours ago, sunrat said: Here I just added Yeah I did a similar thing first. Never worked so tried the profile stuff. I am thinking it is some basic setting I have not made in the new install which is affecting the mpv config stuff. Thanks for trying though. Quote
abarbarian Posted March 23, 2024 Author Posted March 23, 2024 (edited) I tried mpv like this Put brain in gear before pressing enter-->10:48:06-->Sat Mar 23-->GodEater -->mpv --profile=myprofile -v --log-file=./log '[Cleo]God_Eater_-_01_(Dual Audio_10bit_BD720p_x265).mkv' and found this amongst the output [cplayer] Setting option 'ontop' = 'yes' (flags = 4) [cplayer] Setting option 'profile' = 'myprofile' (flags = 8) [cplayer] Applying profile 'myprofile'... [cplayer] Setting option 'screenshot-directory' = '/home/bloodaxe/Screenshots/mpv-screenshots/' (flags = 12) [cplayer] Setting option 'screenshot-format' = 'jpg' (flags = 12) [cplayer] Setting option 'screenshot-template' = '%F - [%P] (%#01n)' (flags = 12) so it looks like mpv is trying to do the right thing. The screenshots are still going to /tmp. My problem would seem to lie in some basic setting in the fresh install. I followed the Arch Install guide as closely as I could and only did the bare minimum so am baffled as to what is wrong. ;-( Edited March 23, 2024 by abarbarian Quote
sunrat Posted March 23, 2024 Posted March 23, 2024 What about if you remove your user mpv.conf and just run mpv -v --log-file=./log --screenshot-directory=/home/bloodaxe/Screenshots/mpv-screenshots/ '[Cleo]God_Eater_-_01_(Dual Audio_10bit_BD720p_x265).mkv' Quote
abarbarian Posted March 23, 2024 Author Posted March 23, 2024 (edited) 4 hours ago, sunrat said: What about if you remove your user mpv.conf and just run mpv -v --log-file=./log --screenshot-directory=/home/bloodaxe/Screenshots/mpv-screenshots/ '[Cleo]God_Eater_-_01_(Dual Audio_10bit_BD720p_x265).mkv' Good idea. I did this though, stopped the myprofile in the config file #profile=myprofile #Top level area, load myprofile #ontop=yes #Always on top #[myprofile] #A simple profile, top level area ends here screenshot-directory=/home/bloodaxe/Screenshots/mpv-screenshots/ screenshot-format=jpg screenshot-template="%F - [%P] (%#01n)" now if I use the " s " key on the keyboard I get the same result as before, one screenshot to /tmp which overwrites. However if I use a capital S, " shift + s " I get multiple images like so cd -- /home/bloodaxe/Screenshots/mpv-screenshots/ Put brain in gear before pressing enter-->16:36:53-->Sat Mar 23-->mpv-screenshots -->ls '[Cleo]God_Eater_-_09_(Dual Audio_10bit_BD720p_x265) - [00:00:33.200] (1).jpg' '[Cleo]God_Eater_-_09_(Dual Audio_10bit_BD720p_x265) - [00:00:34.576] (1).jpg' '[Cleo]God_Eater_-_09_(Dual Audio_10bit_BD720p_x265) - [00:09:44.876] (1).jpg' Removing the mpv.conf altogether and running mpv from the cli gets me this from the log Quote [cplayer] Applying profile 'default'... looks like it loads the default profile [cplayer] Screenshot: '/tmp/mpv-screenshot.jpeg' [cplayer] Starting subprocess failed: init [cplayer] Starting screenshot: '/tmp/mpv-screenshot.jpeg' [screenshot] using 11 threads for scaling [screenshot] Using zimg. this is if I use just a small "s" screenshot ends up in /tmp as before [cplayer] Screenshot: 'mpv-shot0001.jpg' [cplayer] Starting screenshot: 'mpv-shot0002.jpg' [screenshot] using 11 threads for scaling [screenshot] Using zimg. this is if I use a capital S "shift+s" can not find the screenshot it disapered into the ether Edited March 23, 2024 by abarbarian Quote
securitybreach Posted March 23, 2024 Posted March 23, 2024 I dont get why it keeps writing to/temp, it makes no sense but probably something simple Quote
abarbarian Posted March 23, 2024 Author Posted March 23, 2024 I have some lua scripts installed which all seemed to work ok before. One in particular for screenshots this was installed before I knew that mpv had an inbuilt option. I took this particular lua script out and also changed the mpv.conf, deleted the myuser profile. So now this only contains, screenshot-directory=~/Screenshots/mpv-screenshots/ screenshot-format=jpg screenshot-template="%F (%#01n)" Now pressing " s " gets me a screenshot with subs in ~/Screenshots/mpv-screenshots/, also pressing " S " (capital S) gets me a screenshot without subs in ~/Screenshots/mpv-screenshots/. So the problem is solved. screenshot-directory=~/Screenshots/mpv-screenshots/ screenshot-directory=/home/anyuser/Screenshots/mpv-screenshots/ Both work. Many thanks for all your efforts I could not have solved this without your help.You might not have given the solution but you helped me to think out of the box a bit. 1 Quote
abarbarian Posted March 23, 2024 Author Posted March 23, 2024 8 minutes ago, securitybreach said: probably something simple The user probably No idea why it goes to /temp either. 1 Quote
sunrat Posted March 23, 2024 Posted March 23, 2024 2 hours ago, abarbarian said: The user probably No idea why it goes to /temp either. That's what was screwy about it. Mine goes to ~ without any config options. 1 Quote
securitybreach Posted March 24, 2024 Posted March 24, 2024 15 hours ago, sunrat said: That's what was screwy about it. Mine goes to ~ without any config options. That's always been the case for me as well, also it doesn't overwrite but makes a new one. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.