Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Video Screensaver Volume



  • I am working with a windows version of Emulation Station. I found Jrassa's version which has the video screensavers working. I know I can disable audio entirely through the audio menu, but I would just like to turn it down. As Emulation station is open source, I think I see the part in the code where the player is called, but I'm not knowledgeable enough to understand exactly what it's doing, or how I would turn the volume down. The code that I am referring to is:

            if (!Settings::getInstance()->getBool("VideoAudio") || (float)VolumeControl::getInstance()->getVolume() == 0)
            {
                argv[8] = "-1000000";
            }
            else
            {
                float percentVolume = (float)VolumeControl::getInstance()->getVolume();
                int OMXVolume = (int)((percentVolume-98)*105);
                argv[8] = std::to_string(OMXVolume).c_str();
            }
    

    I would like to ideally turn the video screensaver volume down to 50% or 25%.. Any help would be greatly appreciated!



  • @tr33x0rs There are 2 video implementations in ES. The default implementation (VideoVLCComponent.cpp) uses VLC and there is a PI specific implementation (VideoPlayerComponent.cpp) that uses OMX Player. The code you have referenced above is the VideoPlayerComponent which is PI specific and is not built or included in Windows build.

    All that being said, There should be a audio volume option available in the menu. Changing the volume with that option will change the overall system volume, including videos. The code above is included for PI, because for whatever reason, OMXPlayer does not respect the system volume and would play videos at full volume regardless of the system volume.



  • @jdrassa Can you elaborate more on the audio volume option in the Menu? I'm not home currently but should be soon. I only remember seeing a video volume on or off, I don't recall seeing a way to set the volume.

    Are you saying there isn't really a way to "hardcode" so that the video volume is at 50%? Thank for the help and the work you've done! The video screensaver is the one option I really wanted in Windows that wasn't available. Do you have somewhere I can donate to you?



  • @tr33x0rs said in Video Screensaver Volume:

    @jdrassa Can you elaborate more on the audio volume option in the Menu? I'm not home currently but should be soon. I only remember seeing a video volume on or off, I don't recall seeing a way to set the volume.

    @tr33x0rs In the "Sound Settings" menu there should be a "System Volume" option. This will effect volume system wide so it will also lower the volume of games.

    Are you saying there isn't really a way to "hardcode" so that the video volume is at 50%? Thank for the help and the work you've done! The video screensaver is the one option I really wanted in Windows that wasn't available.

    No, I think you should be able to, you were just looking in the wrong place. Based on a quick search of the VLC documentation, I would suggest adding the following line

    libvlc_audio_set_volume(mMediaPlayer,  50);
    

    to VideoVlcComponent here. I didn't actually test this out, but it seems like it should work.

    Do you have somewhere I can donate to you?

    I don't, but you can donate to RetroPie here.



  • Thank you for the information. I will try to edit the VideoVlcComponent and see if it works. I have been following the guide here: https://retropie.org.uk/forum/topic/5202/step-by-step-how-to-build-emulationstation-on-windows

    I'm not understanding under FreeImage and FreeType where they say:

    Build Debug | Win32
    Build Release | Win32

    It looks as though you have commented on this in the past. Is this the best guide to follow? Can you help me out with how to "Build Debug / Build Release"?

    I really appreciate all your help! I'm 99.9% done with my cabinet.. I really like the video screensavers and like the sound but I want it lower than 100% volume. Thank you again!


  • Global Moderator

    @tr33x0rs said in Video Screensaver Volume:

    I'm not understanding under FreeImage and FreeType where they say:
    Build Debug | Win32
    Build Release | Win32

    It means you need to compile both versions of the library in Visual Studio - the Debug and Release versions.



  • @mitu As I'm not very familiar with Visual Studio, can you explain how to do this?


  • Global Moderator

    @tr33x0rs The page you references assumes some familiarity with compiling/building software on Windows using Visual Studio (Community edition). Basically any library referenced there has a Visual Studio solution (.sln) or project included with the sources, you open it in Visual Studio and you compile the solution, resulting in the necessary library files (.dll). Each Visual Studion solution/project has multiple compilation options - Release or Debug are the most common options - each compilation option will result in a different .dll file being produced.
    Have you attempted to follow any of the steps in the topic you linked ?



  • @mitu Yes I have downloaded Boost, and Eigen, as well as FreeImage. I have extracted it in the directory they ask it to be extracted to. I have also edit tif_config.h to remove #define snprintf _snprintf.

    I'm not sure what exactly I need to do to Build Debug and Release. I have tried going to build, and Build Solution. I do notice that I have a "C:\Src\lib\FreeImage\Win32" directory which contains both a Debug and Release directory. The Build directory has a FreeImaged.dll and the release Directory has a FreeImage.dll. I'm not sure if this is all that I need... Now that I look into it more, and realize that I'm working with Jdrassa's fork of ES, the instructions may be different for what I need to do..



  • @tr33x0rs said in Video Screensaver Volume:

    Yes I have downloaded Boost, and Eigen, as well as FreeImage.

    FYI, those instructions are a bit out of date, Boost and Eigen are no longer needed.

    @tr33x0rs said in Video Screensaver Volume:

    I'm not sure what exactly I need to do to Build Debug and Release. I have tried going to build, and Build Solution.

    It has been a while since I have actually used VS to build, but if I remember correctly, there should be a drop-down in the toolbar that lets you select between Debug and Release. You need to choose one, build the solution, then choose the other and build the solution again. If you don't plan on using VS to debug, you may not actually need to run the Debug builds, in my automated builds I only run the Release builds.

    @tr33x0rs said in Video Screensaver Volume:

    Now that I look into it more, and realize that I'm working with Jdrassa's fork of ES, the instructions may be different for what I need to do..

    My github mirrors the RetroPie repository so there shouldn't be any differences in the build process.

    Alternatively, you could check out my Appveyor config that I use for the automated builds. The install section deals with downloading all the dependencies and the build_script builds everything. Those 2 sections are basically a batch script for running the build.



  • @jdrassa I don't know anything about YML files but It looks as though I need to download something like docker to run the YML file. Hopefully it isn't too complicated, but I will give this a shot. I definitely gained some respect for you and ES developers after seeing what a lengthy process it is to simply change one value! Thank you again.



  • @tr33x0rs you shouldn't need to download docker. If you look in the yml file, the 2 sections I mentioned are just a list of commands. In theory you should be able to open a command prompt and run them. Or you could take them and create batch script for running the build. You may need to make some tweaks though.



  • @jdrassa I have been able to follow the appveyor install section. I am having issues with the build_script section. I see references to things like msbuild, and nmake. Msbuild looks like it just does the "build solution" in Visual Studio. I'm not sure what nmake/cmake does. Do you happen to have these .exe files or are you able to provide me with instructions on where to get them?

    I also skipped the first couple of steps with the if statements: if %APPVEYOR_REPO_BRANCH%==master if %prepare_mode%==YES c:\dev\ciuploadtool\ciuploadtool.exe -suffix="%APPVEYOR_REPO_BRANCH%" -preponly
    I have no idea what i am supposed to be doing here.

    I'm sorry I have had so many questions for you. I'm really just trying to try 2 different settings for the VideoScreenSaver. 50% volume and 25% volume. I appreciate you helping me so much with this.


  • Global Moderator

    @tr33x0rs If you have Visual Studio installed, then you have msbuild and nmake installed, but they're not in your path. Try to open the Visual Studio command line prompt (should be in the programs menu) and run your script from that cmd prompt.

    As for cmake, download it from cmake.org and install it, then add it to your PATH or replace the calls to cmake with the complete path to cmake.exe.



  • Thank you Mitu for your help. I tried to do what you suggested and am now receiving an error about the WIndows SDK 8.1 missing. This has turned into a much bigger project than I expected. I will continue to work with it when I can tomorrow, but if either of you are able to possibly change the VideoScreenSaver volume to 25% and 50% I would be more than happy to compensate you for your time.

    I don't want to come across as lazy, or unwilling to try, as I definitely have been trying everything that has been mentioned, but it seems like i get about 15 mins in and run into another issue. At that point I have to post on the forum and wait for a response before I can move on. Now I know I can likely download the WIndows SDK 8.1, but if either of you are able to change the volume and compile it, it would make my day. Again, not trying to be lazy, this all just seems above my head and I don't feel as though I'm doing some of the things correctly.

    Thank you both for all your help!



  • I finally got some time to mess with this again and got to line 87 in the appveyor.yml and got a long list of about 747 warnings. Part of my issue may be that I Installed Visual Studio 2017 community edition? I'm not sure if this would cause an issue or not.. Here is a list of my readout after trying to run line $87. https://pastebin.com/YNJeVQyC

    Again,

    I don't want to come across as lazy but if someone is able to compile this with 25%, 50% and 75% volume I would be more than happy to Paypal you $20, or give you a $20 Amazon gift card, or donate $20 to the company/charity of your choosing for your time. I just feel as though I keep hitting snags and I'm not sure that it's worth the hours that I've invested into it at this point when someone who knows what they are doing could likely do this in 10 minutes.

    I appreciate all your help again. Thank you both.



  • @tr33x0rs said in Video Screensaver Volume:

    I finally got some time to mess with this again and got to line 87 in the appveyor.yml and got a long list of about 747 warnings. Part of my issue may be that I Installed Visual Studio 2017 community edition? I'm not sure if this would cause an issue or not.. Here is a list of my readout after trying to run line $87. https://pastebin.com/YNJeVQyC

    I checked my build logs and I get a bunch of warnings at that step as well. Not sure if there is any differences, but if you aren't getting errors, I would keep going.

    Again,
    I don't want to come across as lazy but if someone is able to compile this with 25%, 50% and 75% volume I would be more than happy to Paypal you $20, or give you a $20 Amazon gift card, or donate $20 to the company/charity of your choosing for your time. I just feel as though I keep hitting snags and I'm not sure that it's worth the hours that I've invested into it at this point when someone who knows what they are doing could likely do this in 10 minutes.

    Unfortunately, it probably isn't just 10 minutes of effort. The advice I gave above on how to try to change the volume was just that advice. It will likely need some trail and error to figure out the right way to implement it. Right now most of my time I spend on ES is focused on reviewing and testing a new grid implementation. I may look at a adding a more generic volume option for the video screensaver, but I can't say for sure if/when I will find the time.



  • I'm sorry but maybe I missed it: why didn't the sound option in ES work for you?

    Alternatively, obviously not ideal, but you could reconsider batch encoding your videos with lower volume of that's your goal.

    Thanks @jdrassa for going through the details here.



  • @pjft The only option in ES is video volume on or off. I want the volume on, but not at 100% volume. My cabinet is in my office and I like the background noise but the volume is too loud.

    I ended up using your suggestion which seemed like the obvious, and easier route. I used a program called handbrake and changed all my video's volume to 50% which worked great. Thank you for the suggestion! I feel stupid that I have been working on this for weeks trying to change Emulation Station's volume instead of just manually changing my video's volume!



  • @tr33x0rs Glad you're sorted.

    My suggestion was really to lower the entire volume in ES's sound settings - I was hoping that, on Windows, it wouldn't change the entire OS volume settings.

    Have a great weekend.



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.