头像
hydrabbit
帖子: 28
注册时间: 2012-12-31 8:04

【已解决】请问neroAacEnc压制aac时如何改变音量大小?

代码: 全选

@echo off
echo Video
set x264="E:\临时\direct264\x264-8bit-420.exe"
set neroaac="E:\临时\neroAacEnc.exe"
set ffmpeg="E:\临时\ffmpeg.exe"
 
for /f "delims=" %%b in ('dir /a-d/b *.rmvb') do (
 %x264% --profile main --level 3 --crf 17 --b-pyramid none --vbv-bufsize 10000 --vbv-maxrate 10000 --vf resize:480,272,,,,lanczos --output %%~nb1.mp4 %%b
 %ffmpeg% -i %%b -acodec pcm_s16le -ac 2 -f wav - |%neroaac% -q 0.35 -if - -ignorelength -of %%~nb.m4a
 %ffmpeg% -i %%~nb1.mp4 -i %%~nb.m4a -vcodec copy -acodec copy %%~nb.mp4
 del /q %%~nb.m4a
 del /q %%~nb1.mp4
)
 
echo done.
pause
这是我用来压制的批处理,我想改变音频音量的大小,比如降低到50%。请问加入何种参数可以解决问题?
上次由 hydrabbit 在 2012-12-31 15:43,总共编辑 1 次。
bakabakashi
帖子: 32
注册时间: 2011-06-01 14:09

Re: 请问neroAacEnc压制aac时如何改变音量大小?

ffmpeg里加-vol xx (256=normal)
littlepox
帖子: 116
注册时间: 2012-08-26 16:56

Re: 请问neroAacEnc压制aac时如何改变音量大小?

bakabakashi 写了:ffmpeg里加-vol xx (256=normal)
ffmpeg有这个参数么?官方的document里面我没找到的说,只找到了这个:http://ffmpeg.org/trac/ffmpeg/wiki/How% ... h%20FFmpeg
头像
hydrabbit
帖子: 28
注册时间: 2012-12-31 8:04

Re: 请问neroAacEnc压制aac时如何改变音量大小?

bakabakashi 写了:ffmpeg里加-vol xx (256=normal)
非常感谢,问题解决了。
另外同时我又在ffmpeg的官网找的解决方案:
To turn the audio volume up or down, you may use FFmpeg's Audio Filter named volume, like in the following example. If we want our volume to be half of the input volume:

代码: 全选

ffmpeg -i input.wav -af 'volume=0.5' output.wav
http://ffmpeg.org/trac/ffmpeg/wiki/How% ... h%20FFmpeg

经测试两种都有效,请问原理是一样的吗?
头像
06_taro
核心会员
核心会员
帖子: 998
注册时间: 2010-09-22 18:32
来自: United Kingdom
联系: 网站

Re: 请问neroAacEnc压制aac时如何改变音量大小?

FFmpeg原来没有这些af,都是用一些维护性很差的代码来搞的。现在Libav搞出了libavresample,FFmpeg搞出了libswresample来实现,旧的用法暂时还保留着,等这两个完全实现之后说不定会都移到af里而不再保留
つまんねー事聞くなよ!

I, personally, for me, believe (obviously sometimes) that my OS choice is right. That's me. I'm not telling you that you should believe it. Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one. (source)

Follow me: @06_taro

304——
为纪念伟大的宇宙史上最强压制304先生,联合国教科文组织决定,将每年的第304天,即平年的10月31日或者闰年的10月30日,定为世界304日。
头像
hydrabbit
帖子: 28
注册时间: 2012-12-31 8:04

Re: 请问neroAacEnc压制aac时如何改变音量大小?

06_taro 写了:FFmpeg原来没有这些af,都是用一些维护性很差的代码来搞的。现在Libav搞出了libavresample,FFmpeg搞出了libswresample来实现,旧的用法暂时还保留着,等这两个完全实现之后说不定会都移到af里而不再保留
对不起,前辈你说的我有些听不懂...Orz
cunhan
核心会员
核心会员
帖子: 214
注册时间: 2010-09-20 22:09

Re: 请问neroAacEnc压制aac时如何改变音量大小?

简单地说“ffmpeg里加-vol xx (256=normal)”是年轻时犯的错。
以后会被“-af 'volume=0.5'”代替。

回到 “音频编码器 / Audio encoder”