Page 1 of 1

Video snaps playing at full volume.

Posted: Fri Aug 11, 2017 3:23 pm
by username 123
All my video snaps are playing at full volume through hdmi audio and i cant adjust it or change output. I am currently using wermys custom mintypi image and OMX player HW accelerator on. Anyone know how to fix it?

Re: Video snaps playing at full volume.

Posted: Tue Aug 15, 2017 7:03 am
by RxBrad
I just turned off snapshot video sound in the RetroPie Start Menu. My ears bleed a lot less now.

Re: Video snaps playing at full volume.

Posted: Tue Aug 15, 2017 12:47 pm
by YaYa
Lol :lol: i love the bleeding ears image ;)

Re: Video snaps playing at full volume.

Posted: Thu Aug 17, 2017 9:07 pm
by username 123
So the only solution I have is to turn off the video snap sound?

Re: Video snaps playing at full volume.

Posted: Mon Oct 16, 2017 4:29 pm
by Viriiguy
There has to be a config file somewhere, that controls the volume.

Re: Video snaps playing at full volume.

Posted: Tue Nov 14, 2017 10:40 am
by fraggle
I don't think there is a user editable config - you would need to change emulationstation source and compile it.

Actually it would be a fairly trivial change looking at it. The file is: /es-core/src/components/VideoPlayerComponent.cpp - line 113

Currently you have...

Code: Select all

113: int OMXVolume = (int)((percentVolume-98)*105);
As you can see the snapshot video volume is being calculated as a value based on the system volume...this seems really odd and looks like a bug the --vol param being passed to oxmplayer expects values in the range [-6000,0] - however as it is being calculated various values will give odd results...

(98-98)*105=0=full volume!
(99-98)*105=105=OOR so full volume!
(100-98)*105=210=OOR so full volume!

even setting the system vol to 0 produces
(0-98)*105=-10290=circa 80% volume!

To fix - either set the volume at a good level (say -4000, and hardcode it. You can play around with omxplayer using --vol flag to determine what the best level is...)

Code: Select all

113: int OMXVolume = -4000;
Or else, much better, refine the calculation so that it translates the range [0,100] to [-6000,0] correctly, i.e. in a logarithmic fashion.

Code: Select all

113: int OMXVolume = (int)(log(percentVolume/100)*2000);
So that the current ES system volume is used for the omxplayer in snapshots.

FWIW I patched this myself and put in a pull request for it to be fixed at source - https://github.com/RetroPie/EmulationStation/pull/305

Hope that helps.

:)