我需要检测视频文件右声道中的静音。左声道是程序音频,右声道是 LTC。我需要使用 LTC 的开始时间作为背景,在编辑期间“推动”视频与主音轨对齐。
以下两次传递过程有效但效率低下,因为我调用了 ffmpeg 两次:
"C:\Program Files\ffmpeg\ffmpeg.exe" -i "C:\Video\inputfile.ts" -af "pan=mono|FC=FR" %temp%\temp.wav
"C:\Program Files\ffmpeg\ffmpeg.exe" -i "%temp%\temp.wav" -af silencedetect=noise=-18dB:d=0.5 %temp%\tempx.wav
我需要学习如何将两个音频过滤器连接在一起,以便一次性完成。
我尝试使用本文描述的技术关联但我遇到了语法问题。我实际上从视频中提取了音频并尝试了参考的示例,结果如下:
C:\Program Files\ffmpeg>ffmpeg -i %temp%\test.wav -af "pan=1c|c0=c0,silencedetect=noise=-18dB:d=.5" %temp%\temp.wav
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers built on May 22 2014 19:56:44 with gcc 4.8.2 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --ena
ble-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --e
nable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libi
lbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enabl
e-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable
-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --
enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-l
ibx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --en
able-zlib
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'C:\Users\brad\AppData\Local\Temp\test.wav':
Duration: 00:19:45.62, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16
, 1536 kb/s
[auto-inserted resampler 0 @ 006ebf40] Cannot select channel layout for the link
between filters auto-inserted resampler 0 and Parsed_silencedetect_1.
[auto-inserted resampler 0 @ 006ebf40] Unknown channel layouts not supported, tr
y specifying a channel layout using 'aformat=channel_layouts=something'.
Error opening filters!
Conversion failed!