更改我的音频编解码器可改变我的音频级别

更改我的音频编解码器可改变我的音频级别

我遇到了 ffmpeg 压缩问题。我有几个视频剪辑(视频为 H264,容器为 .mp4,音频为 wav)。

对于特定设备上的广播,管理广播的公司必须连接视频并更改编解码器。我刚刚意识到,当他们做他们的事情时,音频音量也会改变。我让他们给我他们的代码,以便我可以看看。经过一番研究,我不明白音量如何改变。有人能帮帮我吗?这是代码:

# generate concat string with all clips
#
concatstring="concat:"
index=0
for i in $*; do
   concatstring+="final"$index".mpg|"
   let "index=index+1"
done

concatstring=${concatstring:0:-1}

#
# concat all clips in video.wmv to fit in a 15Mbytes or 30Mbytes file maximum
# $ratio contain ratio like  vga:640x480 or hd720:1280x720
# so with a 90s clip size max, we have ~1100k or ~2400k for bit rate (this is a bit less cause sound space around 200k)
#
#avconv -i "$concatstring" -c copy final.mpg

if [ $ratio = "hd720" ];
then
 avconv -y -i "$concatstring" -threads auto -vcodec wmv2 -acodec wmav2 -ac 2 -b:a 96k -b:v $compress -s:v $ratio video.wmv
 #avconv -y -i final.mpg -threads auto -vcodec wmv2 -acodec wmav2 -ac 2 -b:a 96k -b:v $compress -s:v $ratio video.wmv
fi

if [ $ratio = "vga" ];
then
 avconv -y -i "$concatstring" -threads auto -vcodec wmv2 -acodec wmav2 -ac 2  -ar 44100 -b:v 760k -minrate:v 760k  -b:a 90k  -s:v vga  -r 25 video.wmv
 #avconv -y -i final.mpg -threads auto -vcodec wmv2 -q:v 8 -acodec wmav2 -ac 2 -b:a 80k -ar 44100 -s:v $ratio -r 24 video.wmv
fi

if [ $ratio = "vgabis" ];
then
 avconv -y -i "$concatstring" -threads auto -vcodec wmv2 -acodec wmav2 -ac 2  -ar 44100 -b:v 760k -minrate:v 760k  -b:a 90k  -s:v vga  -r 25 video.wmv
 #avconv -y -i final.mpg -threads auto -vcodec wmv2 -q:v 8 -acodec wmav2 -ac 2 -b:a 80k -ar 44100 -s:v vga -r:v 24 video.wmv
fi

谢谢。

相关内容