Play any video as a screensaver with mpv and xscreensaver trick/hack
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Play any video as a screensaver with mpv and xscreensaver trick/hack
Hi! Everybody
I did a search on google an a little research, on playing any videos as a screensaver. I was getting bored with the usual ones. So, I found this little trick/hack, I did not know where specifically to put this in the forum other than here. Okay, here it goes.
1) Create a folder for your video files only in your home folder/directory, make sure you do not ERASE this folder.
2) Videos have to be 1 minute or less in duration, that means, you will have to edit the videos to 1 minute or less on a video editor.
3) Open .xscreensaver with your text editor of your choice, you do not have to be root administrator, the file is in your home folder, like this
"xed /home/Screensaver videos
And insert this lines in the programs: section like this:
Thanks for the note/reply. Yes, if you want to fiddle around with commands from scratch then yes, but xscreensaver is already giving you at least 90% of the steps/tools for making it do this faster. Thanks for the hint/note about this site and program tho. Have fun my friend.
A note on jerky transitions due to Fractional Scaling settings
Just a heads up for those of you using mpv through xscreensaver: ran into an issue where upon returning from the screensaver, back to where you left off before it came on, I suddenly encountered an issue where the screen became jerky, especially if when watching a movie. Specifically, I noticed that on return back to the desktop, the transition was very jerky, almost as if the monitor was jumping from one resolution to another in the transition. This change came about, when I restored my hard drive image back to a previous state, and changed the Settings, Display, Fractional Scaling. That notice right below in smaller text: "May increase power usage, lower speed, or reduce display sharpness". Didn't give it much thought, but checking this on makes a world of difference on my setup, which is already pushing it for 4K resolution: a 3rd Gen I7 Optiplex 7010, GT1030, Ubuntu 22.04. The difference is immediate. If you encounter this, bumpy transition and poor video performance afterwards, go straight there and don't do fractional.
I'm loving the setup now, booting to an SSD, and having it cycle through images and videos stored on a mechanical 500g hard drive. Had issues getting it to use a folder on the hdd, I simply could not get it to work, instead opting to have xcreensaver look for the files on the home directory, and then using a m3u playlist referencing videos on the hdd. Seems to work well this way, even with an under powered 7010.
Yes, 4K video it is still tricky on linux to setup right, make sure your drivers are up to date, and the settings within it are setup right, and if you lower resolution on the images and videos will perform better. I use mpv, because it is light and can play 99% of files (audio or video) formats. Happy to see you got it working! And thanks for the tip or tweak. Good luck!
Quote:
Originally Posted by rrivas01
Just a heads up for those of you using mpv through xscreensaver: ran into an issue where upon returning from the screensaver, back to where you left off before it came on, I suddenly encountered an issue where the screen became jerky, especially if when watching a movie. Specifically, I noticed that on return back to the desktop, the transition was very jerky, almost as if the monitor was jumping from one resolution to another in the transition. This change came about, when I restored my hard drive image back to a previous state, and changed the Settings, Display, Fractional Scaling. That notice right below in smaller text: "May increase power usage, lower speed, or reduce display sharpness". Didn't give it much thought, but checking this on makes a world of difference on my setup, which is already pushing it for 4K resolution: a 3rd Gen I7 Optiplex 7010, GT1030, Ubuntu 22.04. The difference is immediate. If you encounter this, bumpy transition and poor video performance afterwards, go straight there and don't do fractional.
I'm loving the setup now, booting to an SSD, and having it cycle through images and videos stored on a mechanical 500g hard drive. Had issues getting it to use a folder on the hdd, I simply could not get it to work, instead opting to have xcreensaver look for the files on the home directory, and then using a m3u playlist referencing videos on the hdd. Seems to work well this way, even with an under powered 7010.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.