10

I want to make my video to be a screensaver.

Is there any software to make it?

Bruno Pereira
  • 73,643

4 Answers4

9

There are some really complicated suggestions on here, but making a video your screensaver is really easy when using xscreensaver and mpv. Xscreensaver can be installed by typing sudo apt-get install xscreensaver. Mpv can be installed by typing sudo apt-get install mpv.

Go into Terminal, and type gedit ~/.xscreensaver. Scroll down to the part of the code that says "programs". On the top of the list, put in code similar to this:

"Screensaver Name" mpv --really-quiet --no-audio --no-stop-screensaver --loop=inf --fs --wid=$XSCREENSAVER_WINDOW $HOME/fileDirectory

"fileDirectory" can be made a single file, or a folder. If you want to play all the videos in a folder, put something like $HOME/Videos/* You can also limit it to a specific file format by putting that format after the asterisk. (ex:*.mp4) The -shuffle tag can also be applied to make the videos play in a random order.

Once this code has been put in, use Ctrl+S to save, and then change your screensaver to your new one. And that's it, you're done!

Eliah Kagan
  • 117,780
  • :-( I get mpv : Depends: libsdl2-2.0-0 (>= 2.0.0) but it is not going to be installed on Ubuntu 14.04 (Mate edition) – KlaymenDK Oct 17 '17 at 10:05
  • 1
    ~/.xscreensaver is missing by default. One should run xscreensaver-demo to create it. – Albus Dumbledore Jun 05 '18 at 12:13
  • fantastic, thank you!

    Small expansion, if you have a directory full of videos and you want to pick a random one, and also let xscreensaver choose other random screen savers, then change the line to be like this: "Videos" mpv --really-quiet --no-audio --no-stop-screensaver --fs --wid=$XSCREENSAVER_WINDOW $(ls $HOME/fileDirectory|shuf -n 1)

    which picks one video at random and doesn't loop

    – mike Apr 27 '20 at 06:19
  • i put this into ~/.xscreensaver in the line below programs: "Videos" mpv --shuffle --really-quiet --no-audio --no-stop-screensaver --fs --wid=$XSCREENSAVER_WINDOW $( find /path/to/video/basefolder/ -iname *.mp4 -o -iname *.MOV ) --script-opts=osc-visibility=always \n\ – cucujoidea Sep 29 '20 at 19:23
  • One small note. Do not forget to wrap your ss name in quotation marks, otherwise it will not work. – Alex B Jul 24 '21 at 20:53
2

It's possible the AniBG project will give you what you want :

http://code.google.com/p/anibg/

This UbuntuGuide article has step by step instructions.

[Edit: As noted in the comments, AniBG hasn't seen any love for quite a few years now. The best replacement I could find was Komorebi, as noted in this Sep 2017 OMGUbuntu article. The GitHub page can be found here.

Scaine
  • 11,139
  • your answer doesn't actually refer to what he asked - I'm confused as to how he marked it as answered. Karthick's link is the correct answer. – RolandiXor Jan 15 '11 at 14:38
  • Karthick didn't answer, unless you mean his comment. His comment refers to a hack using mplayer from 2009. AniBG is an actively maintained project to "put videos and screensaves on your desktop" and has a one-line installation. Not sure where your confusion arises from? – Scaine Jan 15 '11 at 15:21
  • @Scaine AniBG was actively maintained in 2011, but it doesn't seem to be maintained in 2017. – Flimm Sep 26 '17 at 06:18
  • Thanks @Flimm. Can't believe this answer is nearly 7 years old! I've updated my answer, in case this is still useful to anyone. – Scaine Oct 07 '17 at 21:53
2

Too old question but here is another way to play a list of videos as screensaver:

Install xscreensaver

sudo apt-get install xscreensaver

and install webscreensaver.

clone webnuxsaver project wherever you want and add mp4/webm format in folder videos. run getArrayVideos.py inside of the videos folder to get all the array of videos.

cd videos python getArrayVideos.py

Example output:

['nameofvideo.mp4','nameofvideo2.webm'.....]

Copy the output and add in index.html the array of videos in videosStorage variable.

Open index.html in browser to view everything is working fine and copy de path.

Example path in browser:

file:///usr/lib/xscreensaver/webnuxsaver/index.html

Then need to open xscreenserver to generate a ~/.xscreensaver file. Close xscreensaver and open ~/.xscreensaver file then edit ~/.xscreensaver:

programs:

webscreensaver \n\

Open xscreensaver and search for webscreensaver then click in settings then advanced>>

in command line add:

webscreensaver -url "file:///usr/lib/xscreensaver/webnuxsaver/index.html"

Note: is the url of local file of the index.html. Open your browser to get the path.

Extra note: Try to use simple name of the videos without special characters.

Finally to start with xscreensaver as default. Follow the next steps:

1) xscreensaver needs to be launched at startup via "Startup Applications" (hit Super and type "Startup"). Add a new entry to launch the xscreensaver daemon on startup as xscreensaver -no-splash.

2)You need to bring up the xscreensaver config app. Hit Super and type screensaver. Set the "Blank after x minutes" to your desired amount (e.g. 5 minutes). Remember this value for later. Ensure "Lock screen after" is UNCHECKED.

3)Finally, go to System Settings / Brightness & Lock. Set "Turn screen off when inactive for x minutes" to the same value as you set xscreensavers "Blank after x minutes" setting (e.g. 5 minutes). Then still under Brightness & Lock, set "Lock screen after:" to "Screen turns off".

Or in shortcuts keyboard add the next command:

xscreensaver-command -lock

with the shortcut you prefer. Ex. Ctrl+alt+l

more info: How do I configure xscreensaver to use the GNOME lockscreen on Ubuntu 14.04?

Archagy
  • 31
  • 1
  • 6
1

Firstly Copy-Paste this into the address box in your browser apt:libgle3,xscreensaver-data-extra,xscreensaver-gl-extra then download This and this and install the two .debs.

Now Go to Applications->Accessories menu and open AniBG. Now adjust your preferences from the indicator on top left.

Rinzwind
  • 299,756
Lincity
  • 25,371