【发布时间】:2021-06-10 04:34:02
【问题描述】:
我正在尝试将 Sr = 16000 和比特率 = 256 的 Wav 文件转换为 Sr = 8000 和比特率 = 128 的单声道音频,但输出文件仍然是 16000。
我使用的命令是:
for file in audio_files: # Iterate over the audio files.
name , ext = os.path.splitext (file) # Splitting the name and extention
nm = os.path.basename(name) # Getting file's base name
sc = wav_audio + "\{0}.wav".format ( nm )
fl = subprocess.call(['ffmpeg' , '-i', file,'-r', '8000', sc])
【问题讨论】:
-
查看这个[link]stackoverflow.com/questions/30619740/…
标签: python audio ffmpeg subprocess wave