[MPlayer-users] Detect Sound in File

Rashkae rashkae at tigershaunt.com
Sat Sep 11 03:14:31 CEST 2010

Paul Huwe wrote:
> Hello,
> Is it possible to detect when audio is being produced (above a certain threshold, say) in mplayer?
> For example, is it possible to detect when someone is speaking in a commentary track mp3, then do something based on that (say, tell a different mplayer process playing the dvd to lower its volume).

Probably not something easy to do without allot of programming.. but 
assuming the goal is to play a movie with a rifftrack, I would do it thusly:

rip the movie with your favourite movie rip application (handbrake?) 
convert audio to vorbis.  Extract the audio from the ripped file, use 
audacity to combine the movie audio with the riff track, and also using 
audacity select those areas of the original sound track where you can 
see active waveform on the riff and lower the volume.  Merge the two 
sound tracks and export to vorbis.  Mux it back into the ripped movie 
with mkvmerge.  Now you'll have one audio track that includes both the 
movie audio and the commentary track.

More information about the MPlayer-users mailing list