LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-07-2017, 03:15 PM   #1
linux1021
Member
 
Registered: Jun 2016
Location: Washington State, USA
Posts: 78

Rep: Reputation: Disabled
Lightbulb 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:

programs: \
Best: "ScreenSaver Videos" mpv --shuffle --really-quiet --no-audio \
--fs --video-aspect=16:9 \
--no-stop-screensaver \
--wid=$XSCREENSAVER_WINDOW \
$HOME/"ScreenSaver Videos"/* \n\

Save the file and log out and log in again, sometimes it take a reboot to set it just in case.

I'll try to put a screenshot of mine, if I can, see screenshot attached to this. The "Screesaver videos" is the folder for the screen videos to play.

Okay, Have fun!
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2017-10-07_12:51:47-1024x1024.png
Views:	797
Size:	142.5 KB
ID:	26064  
 
Old 10-08-2017, 03:28 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
if you don't like xscreensaver, there's also: https://github.com/9wm/xss
 
Old 10-08-2017, 06:31 PM   #3
linux1021
Member
 
Registered: Jun 2016
Location: Washington State, USA
Posts: 78

Original Poster
Rep: Reputation: Disabled
Cool

Quote:
Originally Posted by ondoho View Post
if you don't like xscreensaver, there's also: https://github.com/9wm/xss
Hi! ondoho

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.
 
Old 10-11-2017, 09:55 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,968

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Thanks for the information.
 
Old 07-20-2022, 08:35 AM   #5
rrivas01
LQ Newbie
 
Registered: Jul 2022
Posts: 1

Rep: Reputation: 0
Exclamation 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.
 
Old 07-20-2022, 09:30 AM   #6
linux1021
Member
 
Registered: Jun 2016
Location: Washington State, USA
Posts: 78

Original Poster
Rep: Reputation: Disabled
Smile

Hi! rrivas01

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 View Post
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.
 
  


Reply

Tags
desktop, laptop, screensaver


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: MPV 0.17.0 Open-Source Video Player Adds a Direct3D11 Video Acceleration Decoder LXer Syndicated Linux News 0 04-12-2016 05:51 AM
[SOLVED] Is there a trick to get webcollage working on Xscreensaver? ricky_cardo Slackware 5 01-20-2011 02:03 PM
chbg as xscreensaver hack Toadman Linux - Software 0 05-15-2009 08:03 PM
gnome-screensaver vs. xscreensaver littletom Linux - Software 4 04-15-2009 06:31 PM
Write xscreensaver photo hack? pwc101 Programming 1 10-30-2007 06:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration