Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is there any video player that can normalize the sound?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sun May 18, 2008 2:00 am    Post subject: Is there any video player that can normalize the sound? Reply with quote

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:

Code:

listplugins


I still accept suggestions if you have one to share :)
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Sun May 18, 2008 11:38 am    Post subject: Reply with quote

`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
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sun May 18, 2008 12:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Mon May 19, 2008 6:55 am    Post subject: Reply with quote

smplayer (gui for mplayer) support that option.
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Mon May 19, 2008 8:01 am    Post subject: Reply with quote

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
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Mon May 19, 2008 8:10 am    Post subject: Reply with quote

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
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Wed May 21, 2008 6:41 pm    Post subject: Reply with quote

You're welcome.

Blessed be!
Pappy
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
i4dnf
Apprentice
Apprentice


Joined: 18 Sep 2005
Posts: 271
Location: Bucharest, Romania

PostPosted: Thu May 22, 2008 7:51 am    Post subject: Reply with quote

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
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Thu May 29, 2008 3:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum