![ffmpeg 总是询问我是否要替换输入文件](https://linux22.com/image/1446618/ffmpeg%20%E6%80%BB%E6%98%AF%E8%AF%A2%E9%97%AE%E6%88%91%E6%98%AF%E5%90%A6%E8%A6%81%E6%9B%BF%E6%8D%A2%E8%BE%93%E5%85%A5%E6%96%87%E4%BB%B6.png)
我正在尝试使用 zeranoe 的最新 ffmpeg 版本将视频源和音频文件合并到最短标志上,但它所做的只是询问我是否要替换音频或视频文件(添加损坏的空文件)。输出最终也会损坏或丢失其中一个文件。
C:\Users\Apps\ffmpeg\bin>ffmpeg -i audio.ogg video.webm -c copy -shortest new.web
m
ffmpeg version N-69835-g03adafb Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.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-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-lib
gsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencor
e-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enabl
e-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-l
ibtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-
libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-l
ibwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --ena
ble-lzma --enable-decklink --enable-zlib
libavutil 54. 18.100 / 54. 18.100
libavcodec 56. 22.100 / 56. 22.100
libavformat 56. 22.100 / 56. 22.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.100 / 5. 11.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, ogg, from 'audio.ogg':
Duration: 00:00:26.02, start: 0.000000, bitrate: 84 kb/s
Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 112 kb/s
Metadata:
TITLE : SpikexTwilight.wmv
ENCODER : Lavf56.22.100
File 'video.webm' already exists. Overwrite ? [y/N] n
答案1
您忘记了-i
:
ffmpeg -i audio.ogg -i video.webm …
^
|
|