LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2019, 11:56 PM   #1
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 47

Rep: Reputation: 8
Question Set default volume Mplayer?


I use MPlayer Graphics.
Not by Terminal

He always insists on starting at 50% volume and still decreases the volume of my entire system to 50%
no use I put the volume at maximum he does not obey

I tried in the archives gui.conf, config
But nothing seems to work
I tried this below on the 2 files and nothing works!
volume=100
softvol=yes
softvol-max=100
softvol=100

Does anyone know how to configure so that it always starts at full volume?

Last edited by Nick-us; 10-06-2019 at 12:19 AM. Reason: more information
 
Old 10-06-2019, 04:27 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,587

Rep: Reputation: 1177Reputation: 1177Reputation: 1177Reputation: 1177Reputation: 1177Reputation: 1177Reputation: 1177Reputation: 1177Reputation: 1177
There'll be a config somewhere which sets defaults. I had the same issue in pulse and eventually found a config. From the briefest of searches, it appearsd to be ~/.mplayer/config

You can search yourself, btw
 
Old 10-06-2019, 11:22 AM   #3
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 47

Original Poster
Rep: Reputation: 8
Quote:
Originally Posted by business_kid View Post
There'll be a config somewhere which sets defaults. I had the same issue in pulse and eventually found a config. From the briefest of searches, it appearsd to be ~/.mplayer/config

You can search yourself, btw
As I reported above, I've tried this file you mention and the other. Writing the settings that I also mention in the question that didn't work


 
Old 10-06-2019, 01:04 PM   #4
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 2,349

Rep: Reputation: 517Reputation: 517Reputation: 517Reputation: 517Reputation: 517Reputation: 517
https://www.linuxquestions.org/quest...er-4175655325/
 
Old 10-06-2019, 01:35 PM   #5
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 47

Original Poster
Rep: Reputation: 8
Unhappy

Quote:
Originally Posted by teckk View Post
Yes, I also read this post and tried to find a solution in it.

But there is nothing in it that shows or teaches how to actually set the Mplayer volume.

Soon this article was of no use to me. Your links point to solutions that have nothing to do with my question.


 
Old 10-06-2019, 01:39 PM   #6
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 47

Original Poster
Rep: Reputation: 8
Trying once again to clarify for those who still cannot understand the question I asked

I want to set the Mplayer volume to 100%.
I want that when I start the Mplayer clicking a video, or even opening it normally, the volume is already at the maximum.

Currently when I open Mplayer the volume is always at 50% I don't want that. I want the volume at maximum

Once again explaining. Setting up the files I mentioned in my question with the commands I put in doesn't work.

I didn't find any other commands anywhere! All I want is to set up on the volume, it shouldn't be harder than compiling a source and installing programs on linux. But it seems no one can do that?

Its no WORK, And I had already informed that in the question
softvol-max
softvol-max=100

I found so many complex configurations on the Internet ...
But it seems no one cares about the simple volume of the Player!

Not even the terminal command works
Just to know, it doesn't work, because it doesn't turn the volume max
gmplayer -softvol -softvol-max 100 video.avi
gmplayer -af volume=10 video.avi
gmplayer -af volume=100 video.avi
gmplayer -af volume=1000 video.avi
gmplayer -volstep 100 video.avi

I cannot understand at all how simple a thing should be, and it is impossible for me to solve!

No command written in Mplayer help works! http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html

-softvol

Force the use of the software mixer, instead of using the sound card mixer.

-softvol-max <10.0-10000.0>

Set the maximum amplification level in percent (default: 110). A value of 200 will allow you to adjust the volume up to a maximum of double the current level. With values below 100 the initial volume (which is 100%) will be above the maximum, which e.g. the OSD cannot display correctly.

-volstep <0-100>

Set the step size of mixer volume changes in percent of the whole range (default: 3).

-volume <-1-100> (also see -af volume)

Set the startup volume in the mixer, either hardware or software (if used with -softvol). A value of -1 (the default) will not change the volume.

Last edited by Nick-us; 10-06-2019 at 02:08 PM.
 
Old 10-06-2019, 02:27 PM   #7
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 62

Rep: Reputation: Disabled
It seems that the "default volume" you are trying to adjust is tied to the skin that gmplayer is using. The other volume parameters you are referring to adjust volume at startup but not the slider you see in gmplayer.

You can edit /usr/share/mplayer/skins/default/skin with a text editor. Look for the lines
Code:
;hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg             
  hpotmeter = pos, 13, 10, NULL, 100,  0, 242, 79, 82, 10, evSetMoviePosition                
  hpotmeter = pos, 13, 10, NULL,  50, 50,  78, 59, 42, 10, evSetBalance                      
  hpotmeter = pos, 13, 10, NULL,  50, 50,  79, 78, 44, 10, evSetVolume
And edit it to:
Code:
  ;hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg             
  hpotmeter = pos, 13, 10, NULL, 100,  0, 242, 79, 82, 10, evSetMoviePosition                
  hpotmeter = pos, 13, 10, NULL,  50, 50,  78, 59, 42, 10, evSetBalance                      
  hpotmeter = pos, 13, 10, NULL,  50, 100,  79, 78, 44, 10, evSetVolume
Note the comment at the top of that section. You want to adjust the "default value" setting.
 
1 members found this post helpful.
Old 10-06-2019, 03:09 PM   #8
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 47

Original Poster
Rep: Reputation: 8
Quote:
Originally Posted by 0XBF View Post
It seems that the "default volume" you are trying to adjust is tied to the skin that gmplayer is using. The other volume parameters you are referring to adjust volume at startup but not the slider you see in gmplayer.

You can edit /usr/share/mplayer/skins/default/skin with a text editor. Look for the lines
Code:
;hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg             
  hpotmeter = pos, 13, 10, NULL, 100,  0, 242, 79, 82, 10, evSetMoviePosition                
  hpotmeter = pos, 13, 10, NULL,  50, 50,  78, 59, 42, 10, evSetBalance                      
  hpotmeter = pos, 13, 10, NULL,  50, 50,  79, 78, 44, 10, evSetVolume
And edit it to:
Code:
  ;hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg             
  hpotmeter = pos, 13, 10, NULL, 100,  0, 242, 79, 82, 10, evSetMoviePosition                
  hpotmeter = pos, 13, 10, NULL,  50, 50,  78, 59, 42, 10, evSetBalance                      
  hpotmeter = pos, 13, 10, NULL,  50, 100,  79, 78, 44, 10, evSetVolume
Note the comment at the top of that section. You want to adjust the "default value" setting.
Please, can you explain this to me?
Understand ... I really want the volume max.
Not exactly information on the Player Skin.

But in doing what you suggested, yes Player Skin started showing the volume at maximum.
But it also somehow kept my computer volume up to its maximum.
That is, the change you suggested fixed it and prevents Mplayer from changing on my system volume.

Solving my problem.

But how is this possible if we only change one Skin?
I was very surprised and curious about this solution.

When I posted my question, what was bothering me most was that Mplayer took the volume from my system that was at maximum and put it at 50%, always giving me the trouble of having to turn up the volume again.

To clarify, when I talk about volume, it's my computer's volume control that I put in the XFCE Taskbar and use it to increase and decrease the overall volume for any program.

I would really like to understand why a simple skin would be responsible? Looks pretty crazy!

But as I said, it really fixed the problem!

And even more curious. If I turn my system volume down, for example 10%. When opening the Player, even Skin showing wrong volume at maximum, Player stopped changing my volume!

For me it's not a problem because I always turn the volume up or down the Taskbar


 
Old 10-06-2019, 03:19 PM   #9
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,702

Rep: Reputation: 6245Reputation: 6245Reputation: 6245Reputation: 6245Reputation: 6245Reputation: 6245Reputation: 6245Reputation: 6245Reputation: 6245Reputation: 6245Reputation: 6245
Quote:
Originally Posted by Nick-us View Post
I would really like to understand why a simple skin would be responsible? Looks pretty crazy!
I don't think you realize what a "skin" is to an application.
Skinning an application allows it to change its look and feel. But in the end, every skin for the application needs to do thw same: allow you to control the application.
That is why this gmplayer skin has a pot-meter, to let you control the volume. The default value is not only a visual, it will apply its value to the application. What did you think was the function of that potmeter?
 
1 members found this post helpful.
Old 10-06-2019, 03:37 PM   #10
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 62

Rep: Reputation: Disabled
I'm not sure I am understanding what you are getting at. The volume controls inside mplayer do not affect the overall system volume or anything outside of the program, at least not on my machines. If I set my machine at something like 10% volume then that is all I get from the speakers. Adjusting the volume slider inside mplayer changes what mplayer is outputting and can go 0 to 100% inside the program, but the system volume will not get louder than the set 10%.

The command line options to start mplayer like volume, softvol-max, or volume filters will boost what mplayer can output in the backend, but the gui controls are still run by that master volume slider inside the program and will give you 0-100% of whatever mplayer is set up with.

The "skin" coding sets the look of the gmplayer application. Since these gui elements also control actual things like volume, their default values have actual effect on the program. I thought that was all you were going for: having mplayer start up and be at 100% already, instead of having to manually turn it up every time. And yes, then the volume is really at max, its not just something superficial. You can try editing the skin file to 10 instead, you will hear it starts up and volume is lower. Of course "max" is relative. If you crank up softvol-max limits higher then the max will be pushed higher (even up to clipping the signal).

Last edited by 0XBF; 10-06-2019 at 03:42 PM.
 
Old 10-06-2019, 04:00 PM   #11
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 47

Original Poster
Rep: Reputation: 8
Quote:
Originally Posted by 0XBF View Post
I'm not sure I am understanding what you are getting at. The volume controls inside mplayer do not affect the overall system volume or anything outside of the program, at least not on my machines. If I set my machine at something like 10% volume then that is all I get from the speakers. Adjusting the volume slider inside mplayer changes what mplayer is outputting and can go 0 to 100% inside the program, but the system volume will not get louder than the set 10%.

The command line options to start mplayer like volume, softvol-max, or volume filters will boost what mplayer can output in the backend, but the gui controls are still run by that master volume slider inside the program and will give you 0-100% of whatever mplayer is set up with.

The "skin" coding sets the look of the gmplayer application. Since these gui elements also control actual things like volume, their default values have actual effect on the program. I thought that was all you were going for: having mplayer start up and be at 100% already, instead of having to manually turn it up every time. And yes, then the volume is really at max, its not just something superficial. You can try editing the skin file to 10 instead, you will hear it starts up and volume is lower. Of course "max" is relative. If you crank up softvol-max limits higher then the max will be pushed higher (even up to clipping the signal).
I also figured it could be like this. But that's not what happens in my Slackware. I think maybe this is because I don't have Slackware FULL installed. My installation is minimal using XFCE, I'm not even sure who controls the sound on my PC. What I did was install slackware with almost no packages and get the packages to work what I need. And as the system complained.

One of the clear problems I had with XFCE was that the sound initially didn't work

I believe that what makes Sound on my PC work is Alsa and PulseAudio, because I did not install anything from phonom because my system did not complain.

I have been using minimal installation to understand what each package slackware does and whether or not I really need it



 
Old 10-06-2019, 04:17 PM   #12
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 62

Rep: Reputation: Disabled
Well if that's the case then this is getting outside of what I can try to test on my system. mplayer works as expected in xfce/plasma/whatever else on my system, but I also use a full install of current (with some extra software of course). If you want to go that route and play package roulette you are free to play with the system. Might have trouble getting support though.
 
Old 10-06-2019, 11:02 PM   #13
Nick-us
Member
 
Registered: Feb 2019
Distribution: Slackware64-Current
Posts: 47

Original Poster
Rep: Reputation: 8
To wrap up this topic and be able to help others with the same issue, the solution that solved my issue was

I followed the tip of 0XBF with a minor change, actually addition.
as root I edited the file /usr/share/mplayer/skins/default/skin
as 0XBF reported

I searched the line
hpotmeter = pos, 13, 10, NULL, 50, 50, 79, 78, 44, 10, evSetVolume

changed to
hpotmeter = pos, 13, 10, NULL, 50, 100, 79, 78, 44, 10, evSetVolume

I also searched the line
hpotmeter = pos, 13, 10, NULL, 50, 50, 269, 70, 61, 10, evSetVolume

changed to
hpotmeter = pos, 13, 10, NULL, 50, 100, 269, 70, 61, 10, evSetVolume

Thus, opening the MPlayer or even clicking a video it starts with maximum volume.

Thanks to all who gave information and explanations, because they helped me a lot.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting default volume for mplayer lin66uxx Linux - Software 2 06-07-2019 10:05 PM
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
How can i make mplayer adjust only master volume rather than PCM volume Stevithen Linux - Desktop 2 04-04-2010 08:33 AM
How to start mplayer with reduced volume to 70pct ? mplayer -volume ? frenchn00b Linux - General 1 03-29-2008 08:29 AM
How do set mplayer to loop by default? walterbyrd Linux - Software 3 07-24-2004 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration