Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override stored volume #923

Open
p3lim opened this issue Jan 22, 2024 · 1 comment
Open

Override stored volume #923

p3lim opened this issue Jan 22, 2024 · 1 comment

Comments

@p3lim
Copy link

p3lim commented Jan 22, 2024

Overview Description:

The --volume nor --mpv-volume commandline options or configuration options seem to work, the "stored" volume always take precedence.

Steps to Reproduce:

  1. Enable mpv.conf in settings
  2. Set volume=10 in mpv.conf
  3. Play a video

Actual Results:
Volume setting is ignored.

Expected Results:
Celluloid should respect the mpv.conf volume setting (or CLI option).

Version:
0.20

Additional Information:
Mentioned in #477 (comment) an option to ignore the stored volume was suggested, but dismissed by the issuer. I would really like to see this setting, as I always want to have a specific volume set whenever Celluloid is started (but not reset between files in a playlist!).

@p3lim
Copy link
Author

p3lim commented Jan 22, 2024

Temporary workaround in a script:

local config = os.getenv('HOME') .. '/.config/mpv/mpv.conf'
local fh = io.open(config, 'r')
if fh then
  fh.close()

  for line in io.lines(config) do
    local volume = line:match('^volume%s*=%s*(%d+)$')
    if volume then
      mp.set_property('volume', volume)
      break
    end
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant