Reply to topic

Video and HTML wallpaper types

User avatar MirceaKitsune
Registered Member
Posts
256
Karma
0
OS

Video and HTML wallpaper types

Sat Mar 26, 2016 1:05 pm
This is a feature I've been wanting to see for a while, even if I likely won't use it on a daily basis. I was wondering if there's any chance of it being planned and happening at some point.

Alongside the "Plain Color", "Image", and "Slideshow" wallpaper types for the desktop, I was wondering if there might ever be support for "Video" wallpapers. So users can set an avi / mp4 / ogv file as their wallpaper, and have it continuously loop in the background. Even better, a customizable playlist of videos, or random videos in a directory (as with slideshow)... with audio volume customizable and positioning being set the same way as for images. Any chance that this might happen at any stage?

Another idea were HTML wallpapers; Why can't a "Website" wallpaper type be implemented too, allowing the user to have web pages as their desktop background, through the same backend as the web plasmoid or Konqueror? Ideally links would also be clickable, and your background can literally act as a web browser which many would likely find useful and fun :)
User avatar Rog131
Registered Member
Posts
828
Karma
10
User avatar MirceaKitsune
Registered Member
Posts
256
Karma
0
OS

Re: Video and HTML wallpaper types

Sat Mar 26, 2016 2:27 pm
Rog131 wrote:KDE Forums - Video desktop background: viewtopic.php?f=83&t=119463

- Plasma 4 : viewtopic.php?f=83&t=119463#p302214
- Plasma 5 : viewtopic.php?f=83&t=119463#p331838

Full image: http://i.imgur.com/4n0PnXH.png


Thank you for the answer. I understand this plugin exists for KDE 4, but for Plasma 5 it still needs to be implemented? I'm curious why such a thing isn't included in code KDE or the plasma-addons package also, since it seems like a pretty simple and probably wanted feature.
User avatar Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Sun Mar 27, 2016 1:22 pm
MirceaKitsune wrote:
Thank you for the answer. I understand this plugin exists for KDE 4, but for Plasma 5 it still needs to be implemented? I'm curious why such a thing isn't included in code KDE or the plasma-addons package also, since it seems like a pretty simple and probably wanted feature.


With the plasma 5 it can be done with few qml script lines. The plugin is waiting a dedicated developer/maintainer.

To add things to the official KDE/plasma you will need to sell it a bit better than "This is a feature I've been wanting to see for a while, even if I likely won't use it on a daily basis." ;)


But meanwhile - borrowing file picker from the 'live wallpaper snow': http://kde-look.org/content/show.php/li ... ent=174456

With the

~/.local/share/plasma/wallpapers/org.kde.video/metadata.desktop
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Video
Name[x-test]=xxVideoxx

Type=Service
ServiceTypes=Plasma/DeclarativeWallpaper
Icon=preferences-desktop-wallpaper
X-Plasma-MainScript=ui/main.qml
X-KDE-PluginInfo-Name=org.kde.video
X-KDE-PluginInfo-EnabledByDefault=true


~/.local/share/plasma/wallpapers/org.kde.video/contents/config/main.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
      http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
  <kcfgfile name=""/>

  <group name="General">
    <entry name="Video" type="String">
      <label>Video file path</label>
      <default></default>
    </entry>
  </group>

</kcfg>


~/.local/share/plasma/wallpapers/org.kde.video/contents/ui/config.qml
Code: Select all
import QtQuick 2.5
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2
import org.kde.plasma.core 2.0

ColumnLayout {
    id: root
    property string cfg_Video

    GroupBox {

        GridLayout {
            columns: 2

            Label {
                text: i18nd("plasma_applet_org.kde.video", "Click to pick")
                Layout.alignment: Qt.AlignRight
            }

            Rectangle {
                width: 256
                height: 144
                color: "transparent"
                Image {
                    fillMode: Image.PreserveAspectFit
                    anchors.fill: parent
                    source: "data/videos.png"
                    MouseArea {
                        anchors.fill: parent
                        onClicked: fileDialog.open()
                    }
                }
            }
        }
    }

    FileDialog {
        id: fileDialog
        title: i18nd("plasma_applet_org.kde.video", "Pick a video file")
        nameFilters: [ "Video files (*.mp4 *.mpg *.ogg *.mov *.webm *.flv *.matroska *.avi)", "All files (*)" ]
        onAccepted: {
            cfg_Video = fileDialog.fileUrls[0]
        }
    }
}


The metadata.desktop, main.xml and config.qml will add the Video wallpaper option to the wallpaper types with the file picker

Image

Image

~/.local/share/plasma/wallpapers/org.kde.video/contents/ui/main.qml
Code: Select all
import QtQuick 2.5
import QtMultimedia 5.5
import org.kde.plasma.core 2.0 as Plasmacore

Item {
    MediaPlayer {
        id: mediaplayer
        autoPlay: true
        loops: MediaPlayer.Infinite
        source: wallpaper.configuration.Video
    }

    VideoOutput {
        fillMode: VideoOutput.PreserveAspectCrop
        anchors.fill: parent
        source: mediaplayer
    }
}


The main.qml is a simple qml media player.

With the:
Desktop: KDE Plasma 5.5.5
Distro: Arch Linux


It looks like this: https://youtu.be/IxJ4sTl9_Hs
User avatar MirceaKitsune
Registered Member
Posts
256
Karma
0
OS

Re: Video and HTML wallpaper types

Sun Mar 27, 2016 4:52 pm
Nice! I shall take a look at this soon. Thank you :D
momoe
Registered Member
Posts
3
Karma
0

Re: Video and HTML wallpaper types

Fri Jul 01, 2016 11:26 pm
MirceaKitsune wrote:Nice! I shall take a look at this soon. Thank you :D


Hi, I'm curious to see if this has worked out for anybody, I've followed the documentation thus far, however I don't have an option for Video in my wallpaper settings.

when trying to launch the .desktop applet it says.
"The desktop entry of type SERVICE is unknown"

looking into the script I guessing "ServiceTypes=Plasma/DeclarativeWallpaper" is not a service type availble in the latest KDE?

Or does this type of service need to be downloaded? a little direction here would be great.

Thanks!
User avatar Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Sat Jul 02, 2016 9:53 am
momoe wrote:
MirceaKitsune wrote:Nice! I shall take a look at this soon. Thank you :D


Hi, I'm curious to see if this has worked out for anybody, I've followed the documentation thus far, however I don't have an option for Video in my wallpaper settings.

when trying to launch the .desktop applet it says.
"The desktop entry of type SERVICE is unknown"

looking into the script I guessing "ServiceTypes=Plasma/DeclarativeWallpaper" is not a service type availble in the latest KDE?

Or does this type of service need to be downloaded? a little direction here would be great.

Thanks!



Someone else has tested with the Kubuntu: https://www.kubuntuforums.net/showthrea ... post385555

Testing with a newer plasma

Wraping the org.kde.video directory to tar.gz package from the 'older' Plasma (5.6.5):
Image

Tar.gz package available from: http://www.filedropper.com/orgkdevideotar_1

Unpacking the org.kde.video.tar.gz to the $HOME/.local/share/plasma/wallpapers/ to the new Plasma

Image

New is:
Kernel: 4.6.3-1-ARCH x86_64 (64 bit)
Desktop: KDE Plasma 5.6.95
KDE Frameworks version: 5.23.0
Qt Version: 5.7.0
Distro: Arch Linux


Seems to work...

Image
Full image: http://i.imgur.com/n1TJvGm.png
momoe
Registered Member
Posts
3
Karma
0

Re: Video and HTML wallpaper types

Tue Jul 05, 2016 5:42 am
Rog131 wrote:
momoe wrote:
MirceaKitsune wrote:Nice! I shall take a look at this soon. Thank you :D


Hi, I'm curious to see if this has worked out for anybody, I've followed the documentation thus far, however I don't have an option for Video in my wallpaper settings.

when trying to launch the .desktop applet it says.
"The desktop entry of type SERVICE is unknown"

looking into the script I guessing "ServiceTypes=Plasma/DeclarativeWallpaper" is not a service type availble in the latest KDE?

Or does this type of service need to be downloaded? a little direction here would be great.

Thanks!



Someone else has tested with the Kubuntu: https://www.kubuntuforums.net/showthrea ... post385555

Testing with a newer plasma

Wraping the org.kde.video directory to tar.gz package from the 'older' Plasma (5.6.5):
Image

Tar.gz package available from: http://www.filedropper.com/orgkdevideotar_1

Unpacking the org.kde.video.tar.gz to the $HOME/.local/share/plasma/wallpapers/ to the new Plasma

Image

New is:
Kernel: 4.6.3-1-ARCH x86_64 (64 bit)
Desktop: KDE Plasma 5.6.95
KDE Frameworks version: 5.23.0
Qt Version: 5.7.0
Distro: Arch Linux


Seems to work...

Image
Full image: http://i.imgur.com/n1TJvGm.png




Fantastic! This was able to work and gave a menu to open a video. Was there any solution to muting the video though. Or would it be more reasonable to strip the audio from the video tracks I want as wallpaper.

Thank you for the feedback.
User avatar Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Tue Jul 05, 2016 4:02 pm
momoe wrote:
Fantastic! This was able to work and gave a menu to open a video. Was there any solution to muting the video though. Or would it be more reasonable to strip the audio from the video tracks I want as wallpaper.

Thank you for the feedback.



There are two ways: http://doc.qt.io/qt-5/qml-qtmultimedia-mediaplayer.html
=>
Muted: http://doc.qt.io/qt-5/qml-qtmultimedia- ... muted-prop
muted : bool
This property holds whether the audio output is muted.

Defaults to false.


and

Volume: http://doc.qt.io/qt-5/qml-qtmultimedia- ... olume-prop
volume : real
This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume).

Defaults to 1.0.


i.e

~/.local/share/plasma/wallpapers/org.kde.video/contents/ui/main.qml with the line
Code: Select all
muted: true

=>
Code: Select all
import QtQuick 2.5
import QtMultimedia 5.5
import org.kde.plasma.core 2.0 as Plasmacore

Item {
    MediaPlayer {
        id: mediaplayer
        autoPlay: true
        muted: true
        loops: MediaPlayer.Infinite
        source: wallpaper.configuration.Video
    }

    VideoOutput {
        fillMode: VideoOutput.PreserveAspectCrop
        anchors.fill: parent
        source: mediaplayer
    }
}


Will play the video muted.

Note !
With older Plasma ( 5.5 ?) the mute was not working at here - tested with the Plasma 5.6.5 & 5.7.0 - seems to work.


Adding a 'Muted' radio button...

Image

Tar.gz package available from: http://www.filedropper.com/orgkdevideotar_2

Note !
As default the the video is starting as muted. User can enable the audio by unchecking the 'Muted' and clicking the 'Apply'.
momoe
Registered Member
Posts
3
Karma
0

Re: Video and HTML wallpaper types

Thu Jul 07, 2016 12:42 am
Fantastic! This works beautifully now!

I want to personally thank you for taking the time and tweaking this to work. It's a great feature for KDE, and I hope it eventually becomes a regular part of the release
stochastix
Registered Member
Posts
3
Karma
0

Re: Video and HTML wallpaper types

Sun Aug 21, 2016 2:53 am
Hey guys, Awesome post. Im almost there, but my video plays with only sound and no vid. I get a black screen. Any ideas?
Im in Plasma 5.7.3
Framework 5.25.0
Qt 5.7
Kernel 4.7.1-1-ARCH

Perhaps Im missing a library?
btw, I am not able to get any of the gziped files you guys are dropping? Is there another place I can get it from you so I can see what might be different in files I made that may be incorrect ?

Also, do you think it is possible to have the audio visualization app ProjectM show up on the desktop?

Thanks,
User avatar Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Sun Aug 21, 2016 8:59 am
stochastix wrote:Hey guys, Awesome post. Im almost there, but my video plays with only sound and no vid. I get a black screen. Any ideas?
...
Perhaps Im missing a library?
btw, I am not able to get any of the gziped files you guys are dropping? Is there another place I can get it from you so I can see what might be different in files I made that may be incorrect ?

Also, do you think it is possible to have the audio visualization app ProjectM show up on the desktop?

Thanks,



Any error messages ?

If you make a simple media player: http://doc.qt.io/qt-5/qml-qtmultimedia- ... ml#details

main.qml:
Code: Select all
import QtQuick 2.6
import QtMultimedia 5.6

Item {
    MediaPlayer {
        id: mediaplayer
        autoPlay: true
        source: "/path/to/media.file"
    }

    VideoOutput {
        anchors.fill: parent
        source: mediaplayer
    }
}


and test it with the qmlscene: http://doc.qt.io/qt-5/qtquick-qmlscene.html

Code: Select all
$ qmlscene --help
Usage: qmlscene [options] <filename>
 
 Options:
  --maximized ...................... Run maximized
  --fullscreen ..................... Run fullscreen
  --transparent .................... Make the window transparent
  --multisample .................... Enable multisampling (OpenGL anti-aliasing)
  --no-version-detection ........... Do not try to detect the version of the .qml file
  --slow-animations ................ Run all animations in slow motion
  --resize-to-root ................. Resize the window to the size of the root item
  --quit ........................... Quit immediately after starting
  --disable-context-sharing ........ Disable the use of a shared GL context for QtQuick Windows
                            .........(remove AA_ShareOpenGLContexts)
  --desktop..........................Force use of desktop GL (AA_UseDesktopOpenGL)
  --gles.............................Force use of GLES (AA_UseOpenGLES)
  --software.........................Force use of software rendering (AA_UseOpenGLES)
  --scaling..........................Enable High DPI scaling (AA_EnableHighDpiScaling)
  --no-scaling.......................Disable High DPI scaling (AA_DisableHighDpiScaling)
  --verbose..........................Print version and graphical diagnostics for the run-time
  -I <path> ........................ Add <path> to the list of import paths
  -P <path> ........................ Add <path> to the list of plugin paths
  -translation <translationfile> ... Set the language to run in


Image

Is the media file playing or do you get error messages ?

With the plasma - Start the plasmashell from terminal to get the error messages or/and look the .xsession-errors.


Freebie

The nature of the freebies is that they will die... dropping the org.kde.video.tar.gz to the https://1drv.ms/u/s!AurPvqgDMVijdOOWAlDUtM8F1O8


Everything is possible ?

"audio visualization app ProjectM" - hmm this ? - http://projectm.sourceforge.net

Everything is possible. If someone is making it possible ;)
stochastix
Registered Member
Posts
3
Karma
0

Re: Video and HTML wallpaper types

Sun Aug 21, 2016 4:01 pm
Thanks Rog131

That was a good idea to run plasmashell from the cmd, I didnt think about that this time.
It showed "Warning: "No decoder available for type «video/x-h264, stream-format=(string)avc, pixel-aspect-ratio" etc.....
So I went looking for things to install regarding x264, libav, gstreamer and ffmgeg. I may have installed too much since it just eventually required a reload for things to be found. Not sure what fixed it then.

Good news is I was able to get the video to play. However, when I pick the video, and hit apply, it begins playing just about every time, but when I hit the OK button to close the "Desktop Settings - Plasma" dialog box, the video quits and I get a Gstreamer error, "Error: "GStreamer encountered a general stream error."

If I restart plasma the video is there and playing.


Regarding ProjectM, That is the correct one. I was able to get it full screen and acting benign by playing with KDE special window settings for focus and stuff. I had it at 50% transparent and it looks cool, but it is still on top of my plasma widgets.

How cool would it be to have a desktop that is always reacting to the audio you are playing? !!!! heh!

Thanks again for your help!
User avatar Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Thu Sep 15, 2016 9:44 pm
Plasma 5.8 (beta)

The Plasma 5.8 can use the wallpaper plugins as the lock screen backgrounds.

Image

Changing - metadata.desktop:
Code: Select all
ServiceTypes=Plasma/DeclarativeWallpaper

to
Code: Select all
ServiceTypes=Plasma/Wallpaper


An updated video wallpaper available: https://1drv.ms/u/s!AOrPvqgDMVijdQ

Youtube: https://youtu.be/xZ-utBtRxTE
User avatar Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Sat Sep 24, 2016 5:57 pm
Plasma 5.8 beta

KDE SDDM video background

This is with the Arch Linux so the SDDM themes are:
Code: Select all
$ locate sddm/themes

=> /usr/share/sddm/themes/

Copying the breeze theme to breeze-video (/usr/share/sddm/themes/breeze-video/).

Editing:

metadata.desktop:
Code: Select all
[SddmGreeterTheme]
Name=Breeze Video

Name[x-test]=xxBreeze Videoxx

Description=Breeze Theme with video background
Description[x-test]=xxBreeze Theme with video backgroundxx

Author=
Copyright=
License=CC-BY-SA
Type=sddm-theme
Version=0.1
Website=https://github.com/sddm/sddm
Screenshot=breeze.jpg
MainScript=Main.qml
ConfigFile=theme.conf
TranslationsDirectory=translations
Email=
Theme-Id=breeze-video
Theme-API=2.0


Adding to the Main.qml the qml mediaplayer - http://doc.qt.io/qt-5/qml-qtmultimedia-mediaplayer.html:

Code: Select all
import QtMultimedia 5.6
...
    MediaPlayer {
        id: mediaplayer
        autoPlay: true
        loops: MediaPlayer.Infinite
        source: config.background
    }

    VideoOutput {
        fillMode: VideoOutput.PreserveAspectCrop
        anchors.fill: parent
        source: mediaplayer
    }



Image
Full image: http://imgur.com/x2hyjYj

Changing preview picture: breeze.jpg

The breeze-video will read the background information from the theme.conf.user. If the background is an image it will show the picture. If the background is a video clip it will show the video.


KDE Config Module for SDDM

As default the KDE Config Module for SDDM is picking all files (Filter: All Files):

Image
Full image: http://imgur.com/R8u6ORO

YouTube: https://youtu.be/OWdA6ZdRfmY

Seems to work.


--------------EDIT-----------------

There is an option to add the qml mediaplayer to the Background.qml:

Code: Select all
/***************************************************************************
* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
* OR OTHER DEALINGS IN THE SOFTWARE.
*
***************************************************************************/

import QtQuick 2.2
import QtGraphicalEffects 1.0

import QtMultimedia 5.6

FocusScope {
    property alias source: image.source
    property alias fillMode: image.fillMode
    property alias status: image.status

    Rectangle {
        anchors.fill: parent
        color: "#1d99f3"
    }

    Image {
        id: image
        anchors.fill: parent

        clip: true
        focus: true
        smooth: true
    }

    MediaPlayer {
        id: mediaplayer
        autoPlay: true
        loops: MediaPlayer.Infinite
        source: config.background
    }

    VideoOutput {
        fillMode: VideoOutput.PreserveAspectCrop
        anchors.fill: parent
        source: mediaplayer
    }
}




More

Breeze Nightmode: viewtopic.php?f=289&t=137502&p=367943#p367943
SDDM theme time format: viewtopic.php?f=289&t=130484&p=365600#p365600
Gapless playback workaround: viewtopic.php?f=289&t=131783&start=15#p365313

Last edited by Rog131 on Sun Dec 04, 2016 6:26 pm, edited 2 times in total.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], bartoloni, Bing [Bot], dhealey, Exabot [Bot], fullmontis, gfielding, Google [Bot], ianp5a, kyrhammer, svakk, YaCy [Bot], Yahoo [Bot]