A
A
Alexey2010-12-10 00:46:00
Audio
Alexey, 2010-12-10 00:46:00

Question about Mencoder?

After converting multi-channel audio (usually 4, 5, 6 channels) to stereo, the volume drops noticeably.
I convert video to flv format with the following command:

#!/bin/sh<br/>
<br/>
AVI=$1<br/>
FLV=`echo &quot;$AVI&quot; | sed -e 's/\.avi$//'`<br/>
NW=360<br/>
<br/>
# тут &quot;хитро&quot; вычисляются цифры с размером картинки для ее уменьшения<br/>
WI=`avinfo $AVI | grep video: | awk '{print $2}' | awk -Fx '{print $1}'`<br/>
HE=`avinfo $AVI | grep video: | awk '{print $2}' | awk -Fx '{print $2}'`<br/>
<br/>
NH=`calc &quot;print $NW * $HE / $WI&quot; | sed -e 's/^~//' | awk -F. '{print $1}'`<br/>
<br/>
# конвертация<br/>
mencoder \<br/>
$AVI \<br/>
-ofps 15 \<br/>
-o $FLV \<br/>
-of lavf \<br/>
-oac mp3lame \<br/>
-lameopts abr:br=56:mode=1:padding=1 \<br/>
-srate 44100 \<br/>
-ovc lavc \<br/>
-lavcopts vcodec=flv:keyint=25:vbitrate=320:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 \<br/>
-vf scale=$NW:$NH<br/>
<br/>
# перенос заголовков видео в начало для seek<br/>
flvmeta $FLV $FLV.flv<br/>

At the same time, if the file has more than 2 sound channels, then the sound is very quiet.
I tried to use different audio filters according to the manual (hrtf and channels), but the result is zero.
Ordinary stereo mono is converted and screams loudly.
Actually the question is what to register in the mencoder in the parameters so that the sound is mixed correctly from all channels in stereo?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2010-12-10
@alexxxst

I found the answer myself, it helped me -af hrtf=s,resample=44100:0:0,volnorm
The sound seems to have become better and louder.

M
mambet, 2010-12-10
@mambet

af volume=NN have you tried it?

A
Alexander, 2010-12-10
@bagger

I experienced a similar problem with ffmpeg. as a result, I had to apply the libavcodec_resample patch (I found it somewhere in the mail lists ... After that, channel mixing began to work fine ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question