View previous topic :: View next topic |
Author |
Message |
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sun May 18, 2008 2:00 am Post subject: Is there any video player that can normalize the sound? |
|
|
Hello,
Don't you all hate when the volume of a given film grows suddenly making the entire edifice tumble? I do. So, I am searching for a video player (preferably xine or mplayer based) which can normalize the sound stream of a video file, so, the whole film is played with the same level of loudness. I could use the normalize command line tools, but then I would need to modify the video files, which I don't want to do if it can be helped.
I don't know if xine or mplayer could do this. Or if there's any way around it at all. This feature shouldn't be difficult to add to any existing project, so if I can't find a solution, maybe I will try to do my own.
So, feel free to share any ideas.
Thanks beforehand.
EDITED: It seems that mplayer has support for LADSPA plugins, but the feature is not too well documented, which is a pity. Also, the LADSPA docs only tell you what the purpose of each plugin is, but they don't tell you the syntax they use. You can tell mplayer to use a plugin this way:
Code: |
mplayer -af ladspa=filename:plugin:x:y:z:etc:etc videofile.avi
|
For example:
Code: |
mplayer -af ladspa=cmt:compress_rms:whatever videofile.avi
|
The problem now is that I can't figure out the meaning of this extra parameters and I don't know how many of these there are. I suppose that you can set a max db level, the attack and release timings and such things but I will have to test and try because the ladspa docs just suck. I suppose I will have to review the sources.
Both the filename and plugin parameters can be seen on the list that this command outputs:
I still accept suggestions if you have one to share |
|
Back to top |
|
|
yngwin Retired Dev
Joined: 19 Dec 2002 Posts: 4572 Location: Suzhou, China
|
Posted: Sun May 18, 2008 11:38 am Post subject: |
|
|
`mplayer -af volnorm` _________________ "Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sun May 18, 2008 12:04 pm Post subject: |
|
|
yngwin wrote: | `mplayer -af volnorm` |
Thank you. I will try it this afternoon while seeing some random film. I am bored of having alsamixer on one monitor while I watch something in the second head. If this plugin works then I will not need ladspa. |
|
Back to top |
|
|
SeaTiger l33t
Joined: 22 Nov 2007 Posts: 603 Location: Toronto, Ontario, Canada
|
Posted: Mon May 19, 2008 6:55 am Post subject: |
|
|
smplayer (gui for mplayer) support that option. |
|
Back to top |
|
|
pappy_mcfae Watchman
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Mon May 19, 2008 8:01 am Post subject: |
|
|
If you add 'a52' to your USE flags, and emerge media-libs/a52dec, gxine allows you to use dynamic range compression, which is what stops the effect you're noticing. I'm sure mplayer works with the a52 USE flag as well, but I'm not really into mplayer, so someone who knows it better will have to say whether or not you can use a52 dynamic compression.
Blessed be!
Pappy _________________ This space left intentionally blank, except for these ASCII symbols. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Mon May 19, 2008 8:10 am Post subject: |
|
|
Nice information.
Thanks a lot to everyone, I will be checking all these possibilities. Probably I will be using an mplayer based one because mplayer is what I use most of the time, unless for DVD's and series (I use kaffeine for that).
Thanks again |
|
Back to top |
|
|
pappy_mcfae Watchman
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Wed May 21, 2008 6:41 pm Post subject: |
|
|
You're welcome.
Blessed be!
Pappy _________________ This space left intentionally blank, except for these ASCII symbols. |
|
Back to top |
|
|
i4dnf Apprentice
Joined: 18 Sep 2005 Posts: 271 Location: Bucharest, Romania
|
Posted: Thu May 22, 2008 7:51 am Post subject: |
|
|
Kaffeine has access to the xine filters. Press "x" when playing and you get a filters dialog, in the sound category you can choose volnorm, which has two methods for normalising sound. _________________ "The only difference between me and a madman is that I am not MAD" (SALVATOR DALI) |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Thu May 29, 2008 3:35 pm Post subject: |
|
|
Volume normalization works but efectively is not what I was wanting.
pappy_mcfae wrote: | If you add 'a52' to your USE flags, and emerge media-libs/a52dec, gxine allows you to use dynamic range compression, which is what stops the effect you're noticing. I'm sure mplayer works with the a52 USE flag as well, but I'm not really into mplayer, so someone who knows it better will have to say whether or not you can use a52 dynamic compression.
Blessed be!
Pappy |
This works, but as far as I can see, only for a52 streams, which is not the case most of the time, so it doesn't work for most movies which I have encoded on regular stereo strems (in many formats). I think I will have to check ladspa plugins after all. If only they were better documented... But at least we always have the sources to look at.
Well. I'll let you know when I can find something.
Thanks again everyone. |
|
Back to top |
|
|
|