FFmpeg 更改音频采样率



我需要将采样率提高 10%。输入文件的采样率未知。

我找到了这个。1 个文件的示例:

ffmpeg -i xxx.mp3 -filter:a "asetrate=$(ffprobe -v error -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1 xxx.mp3)*1.1" -y xxx1.mp3

但是它不起作用并创建 0kb 文件。

.LOG:

[asetrate @ 00000000024242e0]

[Eval @ 00000000005fde80] 未定义 常量或缺少"(" 'ffprobe-verror-show_entriesstream=sample_rate-ofdefault=noprint_wrappers=1' [asetrate @ 00000000024242e0]无法解析选项值"$(ffprobe -v 错误 -show_entries 流=sample_rate -的默认值=noprint_wrappers=1" [Parsed_asetrate_0 @ 00000000000e6cb20] 找不到选项"nokey" [AVFilterGraph @ 0000000002419ca0] 错误 使用参数 '$(FFprobe -v 错误)初始化过滤器"Asetrate" -show_entries 流=sample_rate -的默认值=noprint_wrappers=1:nokey=1 xxx.mp3)*1.1' 重新初始化时出错 过滤 器!无法将帧注入过滤器网络:未找到选项 处理流 #0:0 转换的解码数据时出错 失败!

您需要转义 ffprobe 命令中的每个 ":"。

最新更新