audio - 修改一些代码以将ffmpeg/concat不同的音频格式转换为1个长WAV文件

标签 audio ffmpeg concat opus

我有一个我不完全了解的脚本。它使我可以提取几个不同的文件(M4A和WEBM),并将它们与FFMPEG结合在一起,并创建所有音频的长WAV。
我需要更改它以添加第三种格式(OPUS)
基本上,我希望它将所有OPUS,m4A和WEBM音频文件放在一个目录中,并将它们合并为一个长WAV。
有人能帮我一下吗

#!/bin/bash

for f in *\ *; do mv "$f" "${f// /_}"; done


INP="ffmpeg -hide_banner"
FCT=-1
FIL="-filter_complex "
for f in /media/jnono/sata_500gb_dump/working_dir_for_yt_grinding/*.{webm,m4a}; do
  INP+=" -i ${f}"
  ((FCT+=1))
  FIL+="[${FCT}:a:0]"
done
((FCT+=1))
INP+=" ${FIL}concat=n=${FCT}:v=0:a=1[a] -map [a] waveoutput.wav"
echo $INP
$INP

最佳答案

更改for f in /media/jnono/sata_500gb_dump/working_dir_for_yt_grinding/*.{webm,m4a}; dofor f in /media/jnono/sata_500gb_dump/working_dir_for_yt_grinding/*.{webm,m4a,opus}; do

关于audio - 修改一些代码以将ffmpeg/concat不同的音频格式转换为1个长WAV文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64619078/

相关文章:

python - 在python中计算.wav文件的频谱图

ios - 将音频样本从流附加到AVAssetWriter

Flutter_ffmpeg : how to get video and audio from url or storage

mysql - 使用 sql 查询将文本添加到字段

Javascript:Concat boolean 函数

mysql - Group Concat 结果截止

python - 如何接收 “icecast”网络广播流以使用Python立即播放?

linux - (Linux)火狐浏览器: audio not working but my system audio works properly

python - 守护程序中的ffmpeg错误

audio - "Amix"和 "adelay"组合导致 "Error while filtering: Cannot allocate memory"