This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Video and HTML wallpaper types

Tags: None
(comma "," separated)
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Tue Oct 24, 2017 6:53 pm
acrimont wrote:However, you got it right when you put ffmpeg at the possible origin of the bug as downgrading it solved the issue...


https://bbs.archlinux.org/viewtopic.php?id=231156
--> https://bbs.archlinux.org/viewtopic.php?id=231116
---> https://bugzilla.gnome.org/show_bug.cgi?id=789193
----> gst-libav can no longer decode video (3.4 regression): https://trac.ffmpeg.org/ticket/6775
User avatar
Rog131
Registered Member
Posts
828
Karma
10
lexikon
Registered Member
Posts
17
Karma
0

Re: Video and HTML wallpaper types

Fri Mar 02, 2018 6:19 pm
Hello. Who can help me and say how I can change qml and pause video when focus of desktop is loosing?
Example I change focus on my second screen and now I want pause video on first screen
Gannet
Registered Member
Posts
11
Karma
0

Re: Video and HTML wallpaper types

Tue Mar 06, 2018 7:40 pm
Hello, video in SDDM is not working in KDE 5.12.2. Could anybody update?
Thanks.
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Tue Mar 06, 2018 8:33 pm
Gannet wrote:Hello, video in SDDM is not working in KDE 5.12.2. Could anybody update?
Thanks.


Video background is working at here, with the SDDM:
Image
Full image: https://imgur.com/gt5Ojqk

... and with the lock screen:
Image
Full image: https://imgur.com/oqedY2J

To make the helping a bit easier, please tell:

Your distribution,
Qt version,
SDDM theme,
error messages when testing the SDDM greeter/lock screen,
are the Gstreamer plugins installed ?

SDDM: https://github.com/sddm/sddm/wiki/Theming
Testing
You can test your themes using sddm-greeter. Note that in this mode, actions like shutdown, suspend or login will have no effect.

sddm-greeter --theme /path/to/you/theme


Plasma wallpaper/lock screen testing: viewtopic.php?f=289&t=131783&start=45#p382975
Gannet
Registered Member
Posts
11
Karma
0

Re: Video and HTML wallpaper types

Tue Mar 06, 2018 9:57 pm
Your distribution

Kubuntu 18.04
Qt version

5.9.3
SDDM theme

self created from breeze by editing metadata.desktop and Main.qml
error messages when testing the SDDM greeter/lock screen, are the Gstreamer plugins installed ?

I'm trying to open a video file but when then checking by:
Code: Select all
$ sddm-greeter --test --theme /usr/share/sddm/themes/breeze-video

it shows white sddm background. So a video file is just not applied for some reason:
Code: Select all
$ sddm-greeter --test --theme /usr/share/sddm/themes/breeze-video/
[00:16:18.914] (II) GREETER: High-DPI autoscaling not Enabled
[00:16:18.966] (II) GREETER: Loading theme configuration from "/usr/share/sddm/themes/breeze-video//theme.conf"
[00:16:18.966] (II) GREETER: Reading from "/usr/share/xsessions/plasma.desktop"
[00:16:18.966] (II) GREETER: Reading from "/usr/share/wayland-sessions/plasmawayland.desktop"
[00:16:18.967] (EE) GREETER: Socket error:  "QLocalSocket::connectToServer: Неправильне ім'я"
[00:16:18.968] (EE) GREETER: Cannot connect to the daemon - is it running?
[00:16:19.019] (II) GREETER: Loading file:///usr/share/sddm/themes/breeze-video//Main.qml...
[00:16:19.310] (WW) GREETER: file:///usr/share/sddm/themes/breeze-video//components/VirtualKeyboard.qml:20:1: module "QtQuick.VirtualKeyboard" is not installed
[00:16:19.351] (II) GREETER: Adding view for "DVI-I-1" QRect(0,0 1680x1050)
Image
Code: Select all
$ dpkg --get-selections | grep -i gstreamer
gstreamer-qapt                                  install
gstreamer0.10-plugins-base:amd64                install
gstreamer1.0-libav:amd64                        install
gstreamer1.0-nice:amd64                         install
gstreamer1.0-plugins-bad:amd64                  install
gstreamer1.0-plugins-base:amd64                 install
gstreamer1.0-plugins-good:amd64                 install
gstreamer1.0-plugins-ugly:amd64                 install
gstreamer1.0-pulseaudio:amd64                   install
gstreamer1.0-x:amd64                            install
libgstreamer-gl1.0-0:amd64                      install
libgstreamer-plugins-bad1.0-0:amd64             install
libgstreamer-plugins-base0.10-0:amd64           install
libgstreamer-plugins-base1.0-0:amd64            install
libgstreamer-plugins-good1.0-0:amd64            install
libgstreamer0.10-0:amd64                        install
libgstreamer1.0-0:amd64                         install
libreoffice-avmedia-backend-gstreamer           install
phonon-backend-gstreamer:amd64                  install
phonon-backend-gstreamer-common:amd64           install
phonon4qt5-backend-gstreamer:amd64              install
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 5:28 am
Does your video player work with the qmlscene ?

Image

Simple test player: https://pastebin.com/PtZi4gA7

Could you share the sddm Main.qml ?
Gannet
Registered Member
Posts
11
Karma
0

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 5:07 pm
/usr/share/sddm/themes/breeze-video$ qmlscene Main.qml
qmlscene: could not find a Qt installation of ' '

Main.qml
Code: Select all
/*
 *   Copyright 2016 David Edmundson <davidedmundson@kde.org>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library General Public License as
 *   published by the Free Software Foundation; either version 2 or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details
 *
 *   You should have received a copy of the GNU Library General Public
 *   License along with this program; if not, write to the
 *   Free Software Foundation, Inc.,
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

import QtQuick 2.2

import QtQuick.Layouts 1.1
import QtQuick.Controls 1.1

import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras

import QtMultimedia 5.6

import "components"

PlasmaCore.ColorScope {
    id: root
    colorGroup: PlasmaCore.Theme.ComplementaryColorGroup

    width: 1600
    height: 900

    property string notificationMessage

    LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
    LayoutMirroring.childrenInherit: true

    PlasmaCore.DataSource {
        id: keystateSource
        engine: "keystate"
        connectedSources: "Caps Lock"
    }

    Repeater {
        model: screenModel

        Background {
            x: geometry.x; y: geometry.y; width: geometry.width; height: geometry.height
            sceneBackgroundType: config.type
            sceneBackgroundColor: config.color
            sceneBackgroundImage: config.background
        }
    }
   
    MediaPlayer {
        id: mediaplayer
        autoPlay: true
        loops: MediaPlayer.Infinite
        source: config.background
    }

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

    Clock {
        visible: y > 0
        y: (userListComponent.userList.y + mainStack.y)/2 - height/2
        anchors.horizontalCenter: parent.horizontalCenter
    }


    StackView {
        id: mainStack
        anchors {
            left: parent.left
            right: parent.right
        }
        height: root.height

        focus: true //StackView is an implicit focus scope, so we need to give this focus so the item inside will have it

        Timer {
            //SDDM has a bug in 0.13 where even though we set the focus on the right item within the window, the window doesn't have focus
            //it is fixed in 6d5b36b28907b16280ff78995fef764bb0c573db which will be 0.14
            //we need to call "window->activate()" *After* it's been shown. We can't control that in QML so we use a shoddy timer
            //it's been this way for all Plasma 5.x without a huge problem
            running: true
            repeat: false
            interval: 200
            onTriggered: mainStack.forceActiveFocus()
        }

        initialItem: Login {
            id: userListComponent
            userListModel: userModel
            userListCurrentIndex: userModel.lastIndex >= 0 ? userModel.lastIndex : 0
            lastUserName: userModel.lastUser
            showUserList: {
                if ( !userListModel.hasOwnProperty("count")
                || !userListModel.hasOwnProperty("disableAvatarsThreshold"))
                    return (userList.y + mainStack.y) > 0

                if ( userListModel.count == 0 ) return false

                return userListModel.count <= userListModel.disableAvatarsThreshold && (userList.y + mainStack.y) > 0
            }

            notificationMessage: {
                var text = ""
                if (keystateSource.data["Caps Lock"]["Locked"]) {
                    text += i18nd("plasma_lookandfeel_org.kde.lookandfeel","Caps Lock is on")
                    if (root.notificationMessage) {
                        text += " • "
                    }
                }
                text += root.notificationMessage
                return text
            }

            actionItems: [
                ActionButton {
                    iconSource: "system-suspend"
                    text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Suspend")
                    onClicked: sddm.suspend()
                    enabled: sddm.canSuspend
                    visible: !inputPanel.keyboardActive
                },
                ActionButton {
                    iconSource: "system-reboot"
                    text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Restart")
                    onClicked: sddm.reboot()
                    enabled: sddm.canReboot
                    visible: !inputPanel.keyboardActive
                },
                ActionButton {
                    iconSource: "system-shutdown"
                    text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Shutdown")
                    onClicked: sddm.powerOff()
                    enabled: sddm.canPowerOff
                    visible: !inputPanel.keyboardActive
                },
                ActionButton {
                    iconSource: "system-search"
                    text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Different User")
                    onClicked: mainStack.push(userPromptComponent)
                    enabled: true
                    visible: !userListComponent.showUsernamePrompt && !inputPanel.keyboardActive
                }
            ]

            onLoginRequest: {
                root.notificationMessage = ""
                sddm.login(username, password, sessionButton.currentIndex)
            }
        }

        Behavior on opacity {
            OpacityAnimator {
                duration: units.longDuration
            }
        }
    }

    Loader {
        id: inputPanel
        state: "hidden"
        property bool keyboardActive: item ? item.active : false
        onKeyboardActiveChanged: {
            if (keyboardActive) {
                state = "visible"
            } else {
                state = "hidden";
            }
        }
        source: "components/VirtualKeyboard.qml"
        anchors {
            left: parent.left
            right: parent.right
        }

        function showHide() {
            state = state == "hidden" ? "visible" : "hidden";
        }

        states: [
            State {
                name: "visible"
                PropertyChanges {
                    target: mainStack
                    y: Math.min(0, root.height - inputPanel.height - userListComponent.visibleBoundary)
                }
                PropertyChanges {
                    target: inputPanel
                    y: root.height - inputPanel.height
                    opacity: 1
                }
            },
            State {
                name: "hidden"
                PropertyChanges {
                    target: mainStack
                    y: 0
                }
                PropertyChanges {
                    target: inputPanel
                    y: root.height - root.height/4
                    opacity: 0
                }
            }
        ]
        transitions: [
            Transition {
                from: "hidden"
                to: "visible"
                SequentialAnimation {
                    ScriptAction {
                        script: {
                            inputPanel.item.activated = true;
                            Qt.inputMethod.show();
                        }
                    }
                    ParallelAnimation {
                        NumberAnimation {
                            target: mainStack
                            property: "y"
                            duration: units.longDuration
                            easing.type: Easing.InOutQuad
                        }
                        NumberAnimation {
                            target: inputPanel
                            property: "y"
                            duration: units.longDuration
                            easing.type: Easing.OutQuad
                        }
                        OpacityAnimator {
                            target: inputPanel
                            duration: units.longDuration
                            easing.type: Easing.OutQuad
                        }
                    }
                }
            },
            Transition {
                from: "visible"
                to: "hidden"
                SequentialAnimation {
                    ParallelAnimation {
                        NumberAnimation {
                            target: mainStack
                            property: "y"
                            duration: units.longDuration
                            easing.type: Easing.InOutQuad
                        }
                        NumberAnimation {
                            target: inputPanel
                            property: "y"
                            duration: units.longDuration
                            easing.type: Easing.InQuad
                        }
                        OpacityAnimator {
                            target: inputPanel
                            duration: units.longDuration
                            easing.type: Easing.InQuad
                        }
                    }
                    ScriptAction {
                        script: {
                            Qt.inputMethod.hide();
                        }
                    }
                }
            }
        ]
    }


    Component {
        id: userPromptComponent
        Login {
            showUsernamePrompt: true
            notificationMessage: root.notificationMessage

            userListModel: QtObject {
                property string name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Login as different user")
                property string iconSource: ""
            }

            onLoginRequest: {
                root.notificationMessage = ""
                sddm.login(username, password, sessionButton.currentIndex)
            }

            actionItems: [
                ActionButton {
                    iconSource: "go-previous"
                    text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Back")
                    onClicked: mainStack.pop()
                }
            ]
        }
    }

    //Footer
    RowLayout {
        id: footer
        anchors {
            bottom: parent.bottom
            left: parent.left
            right: parent.right
            margins: units.smallSpacing
        }

        Behavior on opacity {
            OpacityAnimator {
                duration: units.longDuration
            }
        }

        PlasmaComponents.ToolButton {
            text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to show/hide virtual keyboard", "Virtual Keyboard")
            iconName: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off"
            onClicked: inputPanel.showHide()
            visible: inputPanel.status == Loader.Ready
        }

        KeyboardButton {
        }

        SessionButton {
            id: sessionButton
        }

        Item {
            Layout.fillWidth: true
        }

        Battery { }
    }

    Connections {
        target: sddm
        onLoginFailed: {
            notificationMessage = i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Login Failed")
        }
        onLoginSucceeded: {
            //note SDDM will kill the greeter at some random point after this
            //there is no certainty any transition will finish, it depends on the time it
            //takes to complete the init
            mainStack.opacity = 0
            footer.opacity = 0
        }
    }

    onNotificationMessageChanged: {
        if (notificationMessage) {
            notificationResetTimer.start();
        }
    }

    Timer {
        id: notificationResetTimer
        interval: 3000
        onTriggered: notificationMessage = ""
    }

}
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 6:29 pm
Gannet wrote:/usr/share/sddm/themes/breeze-video$ qmlscene Main.qml
qmlscene: could not find a Qt installation of ' '


1)
What i mean: If you test your player part only - Does it play the video ?
Earlier - Qml mediaplayer stopped to play some formats: viewtopic.php?f=289&t=131783&start=45#p382976

2)
I tested your Main.qml:

I Inserted it to the Breeze theme and picked a video file with the kcm_sddm module.
Konsole:
Code: Select all
kcmshell5 kcm_sddm

Everything is working fine. Video is playing.


=>

a) Is the Qml mediaplayer playing all formats in your system ?
b) When you are using the kcm_sddm module:
Is the video file information marked right in the /usr/share/sddm/themes/breeze-video/theme.conf.user ?

At here - theme.conf.user:
Code: Select all
[General]
background=4K UHD 25fps FREE Video Background   HUD Sci Fi Futuristic Planet Earth.mp4
type=image


Is the video file copied to the /usr/share/sddm/themes/breeze-video/ ?

Image
Gannet
Registered Member
Posts
11
Karma
0

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 6:50 pm
>a) Is the Qml mediaplayer playing all formats in your system ?
I don't know. How can I check it?

>b) When you are using the kcm_sddm module:
>Is the video file information marked right in the /usr/share/sddm/themes/breeze-video/theme.conf.user ?
No, it doesn't:
Code: Select all
/usr/share/sddm/themes/breeze-video$ cat theme.conf.user
[General]
type=image

Last edited by Gannet on Wed Mar 07, 2018 7:10 pm, edited 2 times in total.
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 7:07 pm
Gannet wrote:>a) Is the Qml mediaplayer playing all formats in your system ?
I don't know. How can I check it?


Earlier: viewtopic.php?f=289&p=395728#p395700

Make a simple player: https://pastebin.com/PtZi4gA7
and execute it with the qmlscene.


Gannet wrote:>b) When you are using the kcm_sddm module:
>Is the video file information marked right in the /usr/share/sddm/themes/breeze-video/theme.conf.user ?
No, it doesn't:
Code: Select all
/usr/share/sddm/themes/breeze-video$ cat theme.conf.user
[General]
type=image


This seems to be a problem. Try to rename the video file and try again. Sometimes the Videos from the net have extra characters that are messing the kcm_sddm. Another way is to use kate/kwrite to fix the theme.conf.user.

The kcm_sddm output (konsole) should be something like:
Ovr: "/usr/share/sddm/themes/breeze-video/theme.conf.user"
idx: 2
Debug message from helper: Removed previous background "/usr/share/sddm/themes/breeze-video/Joan Jett - Dirty Deeds Done Dirt Cheap.webm"
Debug message from helper: Copying background from "/media/sda1/Backgrounds/Rotating earth/4K UHD 25fps FREE Video Background HUD Sci Fi Futuristic Planet Earth.mp4" to "/usr/share/sddm/themes/breeze-video/4K UHD 25fps FREE Video Background HUD Sci Fi Futuristic Planet Earth.mp4"
Option saved
Gannet
Registered Member
Posts
11
Karma
0

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 7:13 pm
Seems I found what was the cause of problem. It is because of Cyrillic folders names in which the video is. I just moved one file into /home/$username and it started to playing. So, as I understanding kcm_sddm module doesn't support Cyrillic (?) Is this a some kind of bug?
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 7:49 pm
Gannet wrote:Seems I found what was the cause of problem. It is because of Cyrillic folders names in which the video is. I just moved one file into /home/$username and it started to playing. So, as I understanding kcm_sddm module doesn't support Cyrillic (?) Is this a some kind of bug?


I would call it a bug and report it to the KDE bug tracker: https://bugs.kde.org
Other kcm_sddm bugs: https://bugs.kde.org/buglist.cgi?bug_st ... emsettings

A wish/revision request - Make it possible to pass different kind of backgrounds as such: https://phabricator.kde.org/D8833
Gannet
Registered Member
Posts
11
Karma
0

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 7:56 pm
Also, could you explain, after I successfully chose a video file should the background change also in kcm_sddm as a preview of chosen video? In my case nothing is changes.
Thanks.
User avatar
Rog131
Registered Member
Posts
828
Karma
10

Re: Video and HTML wallpaper types

Wed Mar 07, 2018 9:42 pm
Gannet wrote:Also, could you explain, after I successfully chose a video file should the background change also in kcm_sddm as a preview of chosen video? In my case nothing is changes.
Thanks.


Do you mean 1 or 2:

Image
Full image: https://imgur.com/Mr6JmiB

1) is set in the metadata.desktop

2) The kcm_sddm only supports image file background previews.


With a trickery you could make the preview/screenshot image (1) to follow your theme.

The trickery: http://doc.qt.io/qt-5/qml-qtquick-item. ... age-method
(working with the X, not sure if this will work with the wayland)

You could add to the metadata.desktop:
Code: Select all
Screenshot=previewtest/preview.png


and add to the end of the Main.qml:
Code: Select all
    Timer {
        interval: 1000; running: true
        onTriggered: {
            root.grabToImage(function(image) {
                image.saveToFile("/usr/share/sddm/themes/breeze-video/previewtest/preview.png");
            });
        }
    }


Image

Edit the "/usr/share/sddm/themes/breeze-video/previewtest/" rights so that the sddm greeter has right to write the preview.png.

After this the execution of the greeter will save a new preview.png.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], Yahoo [Bot]