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

Normalize files #57

Closed
Ducke1001 opened this issue Dec 13, 2024 · 5 comments
Closed

Normalize files #57

Ducke1001 opened this issue Dec 13, 2024 · 5 comments

Comments

@Ducke1001
Copy link

In your wiki there is the option -gain to change the volume of a file. But it looks like this option is not implemented, right?

phiola "Deep House Special Mix.mp3" -gain 6 -o test.mp3
#3012 ERROR unknown option '-gain'. Use '-h' for usage info.

It would be great to be able to use this option to normalize the files.

@stsaz
Copy link
Owner

stsaz commented Dec 14, 2024

There are several mistakes here:

  • you shoud use convert command when converting files -- by default phiola starts in playback mode
  • MP3 encoding is disabled, so -gain with -o .mp3 won't work

So you should use something like this:

phiola convert "Deep House Special Mix.mp3" -gain 6 -o test.ogg

@Ducke1001
Copy link
Author

Sorry, I must have mixed that up.
Is it possible to combine gain with convert -copy and overwrite the file?

@stsaz
Copy link
Owner

stsaz commented Dec 14, 2024

Is it possible to combine gain with convert -copy and overwrite the file?

No, because -gain (i.e. changing the volume level of audio samples) must be applied to uncompressed (decoded) audio while -copy switch can only copy compressed (encoded) data. So either you just copy MP3 frames without changing volume, or you decode, apply volume, and then encode again. But keep in mind that re-encoding compressed audio files will slightly decrease original audio quality.

Another approach is to use some ID3v2 tags (e.g. replay gain) that will instruct the decoder to apply volume at runtime. But currently phiola doesn't support that.

@Ducke1001
Copy link
Author

Ah, OK. That might be a great feature for the future.

@stsaz
Copy link
Owner

stsaz commented Dec 21, 2024

Support for replay-gain is mentioned in #31, closing this.

@stsaz stsaz closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2024
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

2 participants