Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: modify logo and menu emulationstation #86872
    smokinpuppy
    Participant

    If anyone is interested, I got the screensaver video to work. I forked the original ES git and added this to GuiMenu.cpp:
    screensavers.push_back("video"); // Line 104 in the screensaver menu section
    I also added changed the following in Window.cpp:
    Under Window::input(), Change this:

    if(mSleeping)
    	{
    		// wake up
    		mTimeSinceLastInput = 0;
    		mSleeping = false;
    		onWake();
    		return;
    	}

    to this:

    if(mSleeping)
    	{
    		// wake up
    		mTimeSinceLastInput = 0;
    		mSleeping = false;
    		onWake();
    		system("sudo pkill -9 -f \"/usr/bin/omxplayer\""); // Kill video playback
    		return;
    	}

    Under Window::onSleep(), change this:

    Renderer::setMatrix(Eigen::Affine3f::Identity());
    	unsigned char opacity = Settings::getInstance()->getString("ScreenSaverBehavior") == "dim" ? 0xA0 : 0xFF;
    	Renderer::drawRect(0, 0, Renderer::getScreenWidth(), Renderer::getScreenHeight(), 0x00000000 | opacity);
    	}

    to this:

    Renderer::setMatrix(Eigen::Affine3f::Identity());
    	unsigned char opacity = Settings::getInstance()->getString("ScreenSaverBehavior") == "dim" ? 0xA0 : 0xFF;
    	if(Settings::getInstance()->getString("ScreenSaverBehavior") == "video"){
    		system("playvid");
    	} else {
    		Renderer::drawRect(0, 0, Renderer::getScreenWidth(), Renderer::getScreenHeight(), 0x00000000 | opacity);
    	}

    Then install from “SOURCE” either using my fork for EmulationStaion (https://github.com/smokinpuppy/EmulationStation/) or my fork for RetroPie-Setup (https://github.com/smokinpuppy/RetroPie-Setup/) which already uses my fork of EmulationStation.

    Finally, for this to work, you need to make a bash script and place it in /usr/bin like so:
    sudo nano /usr/bin/playvid

    #! /bin/bash
    
    # Play Video
    omxplayer --vol -3000 -o hdmi --layer 10000 --loop /home/pi/screensaver.mp4 &
    
    # Exit
    exit 0


    Ctrl-X, Y, Enter
    sudo chmod +x /usr/bin/playvid

    I did have to set disable overscan for my setup to work as the video is 1080p

    sudo nano /boot/config.txt 
    set disable_overscan=1

    And that’s it,
    PS, I found that using the original RetroPie SD Image and then compiling by replacing the RetroPie-Setup folder with my fork of it then installing from source (option 2) using ./retropie_setup.sh and only selecting EmulationStation to be the best/easiest way.

    PSS, If anyone knows of an easy way to have omxplayer loop seamlessly, that would be greatly appreciated.

    in reply to: modify logo and menu emulationstation #83530
    smokinpuppy
    Participant

    [quote=83525]
    You can’t. The screensaver modes are built into EmulationStation, you’ll have to code a way by yourself to do make it play movies. At the moment we are not planning to add this feature. If more people demand this feature, we will eventually think about it.
    [/quote]

    Thanks for your reply nilsbyte, That would be a great feature to add. For the time being, I’m wondering if you think the following will do the trick:

    In GuiMenu.cpp under the screensaver behavior section:
    ADD:
    screensavers.push_back("video");

    In Window.cpp under the Window::onSleep() function:
    CHANGE:

    unsigned char opacity = Settings::getInstance()->getString("ScreenSaverBehavior") == "dim" ? 0xA0 : 0xFF;
    Renderer::drawRect(0, 0, Renderer::getScreenWidth(), Renderer::getScreenHeight(), 0x00000000 | opacity);

    TO:

    unsigned char opacity = Settings::getInstance()->getString("ScreenSaverBehavior") == "dim" ? 0xA0 : 0xFF;
    	if(Settings::getInstance()->getString("ScreenSaverBehavior") == "video"){
    		system("omxplayer -o hdmi --layer 10000 --loop /home/pi/video.mp4");
    	} else {
    		Renderer::drawRect(0, 0, Renderer::getScreenWidth(), Renderer::getScreenHeight(), 0x00000000 | opacity);
    	}

    Then recompile & install

    Thanks in advance,

    Robert

    in reply to: modify logo and menu emulationstation #83516
    smokinpuppy
    Participant

    I got whoismezero’s omxplayer method to work, I only had to set the width and height of the video to 640 x 360 respectively. Unfortunatlly the sound wasn’t working at first, but it’s working now after I installed the latest version of omxplayer from here: https://github.com/popcornmix/omxplayer

    I have another question, I can’t seam to find anything about it online, but does anyone know how I can play a video instead of “DIM” or “Blank Screen” in the screensaver?

    Thanks in advance,

    Robert

Viewing 3 posts - 1 through 3 (of 3 total)