Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: HOWTO: Play Videos as Screensaver

  1. #21
    Join Date
    Apr 2005
    Location
    Stavanger, Norway
    Beans
    3
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Play Videos as Screensaver

    Hey all,


    Nice piece of work there =D Much appreciated. I also ran into a couple of the same problems others have had here but managed to sort them. The first was the Screensaver menu entry which was sorted thanks to theonlytruth and brendanpiater. The second was that, like others, fullscreen preview didn't show nor did it kick in when it should have and only "seemed" to go back to desktop after first showing a black screen.

    This last issue was fixed by adding a specific output option in the code, I chose xv and that works like a charm :

    Code:
    #! /bin/bash
    
    ## setup MPlayer aruments, remove -nosound if you want the video
    ## to play sound. If you have to specify the video driver to use
    ## then add that to the list
    MPLAYERARGS="-nosound -nolirc -vo xv -wid $XSCREENSAVER_WINDOW -nostop-xscreensaver -fs -really-quiet"
    
    ## path to video
    VIDEO=/path/to/video
    
    exec mplayer $MPLAYERARGS -loop 0 "$VIDEO"
    You can of course choose whichever output you wish whether it be xv, x11, gl, gl2 etc

    Thanks again.

  2. #22
    Join Date
    Jul 2008
    Location
    /home/Microsoft_Sucks
    Beans
    104

    Re: HOWTO: Play Videos as Screensaver

    Long time no see everyone. I've been using Debian Squeeze as my primary distro for a good while now. I really like it. I switched from CentOS about 6 months to a year ago. Does anyone know how to modify this screensaver setup to work in other desktop environments such as KDE4 and LXDE. I'd also like to know how to get it working on xscreensaver also.



    Thanks,

    SSVegito888

    EDIT: By the way I like the playlist idea.

    I modified the scripts a tiny bit and combined several of the parameters that I wanted into a slightly new one.


    Here's the code for the script.

    Code:
    #! /bin/bash
    
    ## delete previous playlist
    rm -f ~/.Screensavers/playlist.pls
    
    ## setup MPlayer aruments, remove -nosound if you want the video
    ## to play sound. If you have to specify the video driver to use
    ## then add that to the list
    MPLAYERARGS="-nolirc -vo xv -wid $XSCREENSAVER_WINDOW -nostop-xscreensaver -fs -really-quiet"
    
    
    ## find all files in the chosen directory add to playlist
    find ~/.Screensaver/.Videos/* > ~/.Screensaver/playlist.pls
    
    ## child pid, no need to modify
    CPID=0
    
    #play freshly generated playlist
    exec mplayer $MPLAYERARGS -loop 0 -shuffle -playlist ~/.Screensaver/playlist.pls
    Last edited by SSVegito888; May 7th, 2011 at 08:56 AM.

  3. #23
    Join Date
    Jul 2008
    Location
    /home/Microsoft_Sucks
    Beans
    104

    Re: HOWTO: Play Videos as Screensaver

    Seriously, anyone know how to get it working in kde4?

  4. #24
    Join Date
    Jun 2008
    Beans
    8

    Re: HOWTO: Play Videos as Screensaver

    Hello, trying to make it work with two monitors in twin view with no luck. the preview works but when the screensaver starts i get a blank screen in my two monitors. Some idea how to fix it?

  5. #25
    Join Date
    Jul 2008
    Location
    /home/Microsoft_Sucks
    Beans
    104

    Re: HOWTO: Play Videos as Screensaver

    Sorry it took me so long to reply back. I've been without an internet connection for a long time now. I got it working. My problem was, xscreensaver wasn't set up properly. But, fixed it.



    Also, for those of you who want to run xscreensaver on two monitors, my guess would be either looking around the man pages for xscreensaver and/or mplayer for display flags.

    eg. man mplayer lists an option for "-display". Try modding the mplayer script to say:

    Code:
    -display :0 --display :1

    That may work. But, i'm not sure.


    -SSVegito888
    Last edited by SSVegito888; August 29th, 2011 at 05:49 PM. Reason: Made an error in mplayer command.

  6. #26
    Join Date
    Aug 2011
    Beans
    2

    Re: HOWTO: Play Videos as Screensaver

    Does anybody have this working for 11.10 with gnome 3?

  7. #27
    Join Date
    Jun 2008
    Beans
    31

    Re: HOWTO: Play Videos as Screensaver

    We can't be serious...

    ...?


    A screensaver is supposed to be one of the most absolute basic parts of a GUI OS these days. And you need to go through lines of code JUST TO PUT A VIDEO AS YOUR SCREENSAVER?! (sorry for the caps, but I'm a little flustered here)

    This simply must be addressed. Not in a how to with points of "copy this folder", "type this code", "enter this in terminal"...

    Imagine how fast a first time ex-windows user will drop Ubuntu when THIS is the best answer we can give them regarding making a simple video as their screensaver!


    The reason I wound up here :
    I've created a rather nice animation for a studio to use as their screensaver. They love it. And so far, all I can use it on is their winblows machines because they're not willing to copy lines of code on each machine just to have the screensaver on the hundreds of Ubuntu machines they have.

    They want a simple solution. Set this as screensaver, done.


    This is really an issue?

  8. #28
    Join Date
    Jul 2008
    Beans
    37

    Re: HOWTO: Play Videos as Screensaver

    Quote Originally Posted by draldo View Post
    Hey all,


    Nice piece of work there =D Much appreciated. I also ran into a couple of the same problems others have had here but managed to sort them. The first was the Screensaver menu entry which was sorted thanks to theonlytruth and brendanpiater. The second was that, like others, fullscreen preview didn't show nor did it kick in when it should have and only "seemed" to go back to desktop after first showing a black screen.

    This last issue was fixed by adding a specific output option in the code, I chose xv and that works like a charm :

    Code:
    #! /bin/bash
    
    ## setup MPlayer aruments, remove -nosound if you want the video
    ## to play sound. If you have to specify the video driver to use
    ## then add that to the list
    MPLAYERARGS="-nosound -nolirc -vo xv -wid $XSCREENSAVER_WINDOW -nostop-xscreensaver -fs -really-quiet"
    
    ## path to video
    VIDEO=/path/to/video
    
    exec mplayer $MPLAYERARGS -loop 0 "$VIDEO"
    You can of course choose whichever output you wish whether it be xv, x11, gl, gl2 etc

    Thanks again.

    THANKS! That goes out to both TheOnlyTruth and Draldo. I just got a blanck screen, but the -vo x11 helped solve the problem. Thank you for stating that you could use not only xv but also x11, a very thorough explanation that solved my problem. -vo xv didn't do it, but -vo x11 did the trick. Perfect! Thanks alot, this is great.

  9. #29
    Join Date
    Apr 2011
    Beans
    Hidden!

    Re: HOWTO: Play Videos as Screensaver

    Let XScreenSaver play videos using MPlayer, in 3 easy steps:

    Using Ubuntu 12.04 OS with Gnome 3, the Gnome-Screensaver is not working as it used to anymore.
    Screensavers were actually removed back in Ubuntu 11.10. Ubuntu uses gnome-screensaver and inherited the change from upstream GNOME. The GNOME developers think a black screen that puts your monitor into lower-power mode is optimal. http://www.howtogeek.com/114027/how-...-ubuntu-12.04/
    So I removed Gnome-Screensaver and installed XScreenSaver
    Code:
    sudo apt-get purge gnome-screensaver
    
    sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra
    Details: http://www.distrogeeks.com/how-to-in...-ubuntu-12-04/

    Then I installed MPlayer
    Code:
    sudo apt-get install mplayer
    The next thing was to edit the XScreenSaver Preferences File
    Code:
    sudo gedit ~/.xscreensaver
    Under
    programs: \
    I added
    Code:
    "My Movies" mplayer -shuffle -nosound -really-quiet \
    -nolirc -nostop-xscreensaver -wid \
    $XSCREENSAVER_WINDOW -fs -loop 0 \
    $HOME/Path/to/my/movies/* \n\
    Here I used ~/movies/* to play all the files in the ~/movies/ directory.
    e.g. Use ~/movies/*.avi to play all avi files or ~/movies/mymovie.mp4 to loop one file.

    The MPlayer option -shuffle plays the files in random order.
    I also used -nosound for it to be a silent screensaver.

    Source: http://www.jwz.org/xscreensaver/faq.html#mpeg
    For further information check the manual links at the bottom of this post.


    The XScreenSaver Preferences File then looks like this
    Code:
    # XScreenSaver Preferences File
    # Written by xscreensaver-demo 5.15 for marric on Sat Aug 11 08:28:35 2012.
    # http://www.jwz.org/xscreensaver/
    
    timeout:    0:01:00
    cycle:        0:10:00
    lock:        False
    lockTimeout:    0:00:00
    passwdTimeout:    0:00:30
    visualID:    default
    installColormap:    True
    verbose:    False
    timestamp:    True
    splash:        True
    splashDuration:    0:00:05
    demoCommand:    xscreensaver-demo
    prefsCommand:    xscreensaver-demo -prefs
    nice:        10
    memoryLimit:    0
    fade:        True
    unfade:        False
    fadeSeconds:    0:00:03
    fadeTicks:    20
    captureStderr:    True
    ignoreUninstalledPrograms:False
    font:        *-medium-r-*-140-*-m-*
    dpmsEnabled:    False
    dpmsQuickOff:    False
    dpmsStandby:    2:00:00
    dpmsSuspend:    2:00:00
    dpmsOff:    4:00:00
    grabDesktopImages:  False
    grabVideoFrames:    False
    chooseRandomImages: False
    imageDirectory:    
    
    mode:        one
    selected:    0
    
    textMode:    url
    textLiteral:    XScreenSaver
    textFile:    
    textProgram:    fortune
    textURL:    http://fridge.ubuntu.com/node/feed
    
    programs: \
            "My Movies" mplayer -shuffle -nosound -really-quiet \
            -nolirc -nostop-xscreensaver -wid \
            $XSCREENSAVER_WINDOW -fs -loop 0 \
            $HOME/Path/to/my/movies/* \n\
             maze -root \n\
             superquadrics -root \n\
             attraction -root \n\
    
    # Here might be a long list of programs
                      
             blitspin -root \n\
             greynetic -root \n\
             helix -root \n\
    
    
    pointerPollTime:    0:00:05
    pointerHysteresis:  10
    windowCreationTimeout:0:00:30
    initialDelay:    0:00:00
    GetViewPortIsFullOfLies:False
    procInterrupts:    True
    xinputExtensionDev: False
    overlayStderr:    True
    Start XScreenSaver
    Code:
    xscreensaver-demo
    Now I can choose the new program My Movies in the scrolling menu.
    The display mode can be changed by clicking 'Settings...' and then 'Advanced >>'.


    Links:

    XScreenSaver
    https://en.wikipedia.org/wiki/Xscreensaver
    http://packages.ubuntu.com/precise/xscreensaver
    http://www.jwz.org/xscreensaver/man1.html Manual

    MPlayer
    https://en.wikipedia.org/wiki/Mplayer
    http://packages.ubuntu.com/precise/mplayer
    http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html Manual
    Last edited by Marric; August 14th, 2012 at 11:31 AM.

  10. #30
    Join Date
    Sep 2009
    Beans
    22

    Re: HOWTO: Play Videos as Screensaver

    Anyone successfully made this work with VLC instead of MPlayer?

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •