ここにあります:input1.avi
- サウンドを含むビデオ。 input2.avi
- サウンドが含まれていないビデオ。 music.mp3 - オーディオファイル。FFMpeg - 既にサウンドが入っているビデオにサウンドを追加してください。
バックグラウンドミュージック(music.mp3ファイル)をビデオに追加します。
C:¥input1.avi -i C:¥music.mp3 -shortest -c:vコピー-c:コピーC:\ output1.avi 次にoutput1.aviは入力1と同じですしかし、私は他のファイル(音なし動画)を使用しようとすると、バックグラウンドミュージック(music.mp3という)
なし:
C:\ input2.avi -i C:\ music.mp3という-shortest -c :vコピー-c:コピーC:\ output2.avi そして、output2.aviはinput2と同じ+バックグラウンド・ミュージックを持っています。
私もこれを実行しようとしました:
C:\ffmpeg\bin>ffmpeg -i C:\input.avi -i C:\music.mp3 -shortest -c:v copy -filter_ complex "[1]volume=1.5[1a];[0][1a]amerge[a]" -map 0:v -map "[a]" -ac 2 C:\output1.avi
が、次のエラーmesssageました:INPUT1は、バックグラウンドミュージックが含まれていませんだから、なぜ
ffmpeg version N-78949-g6f5048f Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopenc
ore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --ena
ble-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable
-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --ena
ble-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx
264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable
-lzma --enable-decklink --enable-zlib
libavutil 55. 19.100/55. 19.100
libavcodec 57. 27.101/57. 27.101
libavformat 57. 28.100/57. 28.100
libavdevice 57. 0.101/57. 0.101
libavfilter 6. 39.100/6. 39.100
libswscale 4. 0.100/4. 0.100
libswresample 2. 0.101/2. 0.101
libpostproc 54. 0.100/54. 0.100
Input #0, avi, from 'C:\output1.avi':
Metadata:
encoder : Lavf57.28.100
Duration: 00:02:05.76, start: 0.000000, bitrate: 450 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (XVID/0x44495658), yuv420p, 720
x480 [SAR 1:1 DAR 3:2], 440 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0]/0x0055), 44100 Hz, stereo, s16p, 128 k
b/s
[mp3 @ 00000000005abc20] Skipping 0 bytes of junk at 32370.
Input #1, mp3, from 'C:\music.mp3':
Metadata:
title : Broadcast News Package - News Intro
artist : After Effects News Template
Duration: 00:01:57.89, start: 0.025057, bitrate: 194 kb/s
Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
Metadata:
encoder : Lavc56.26
[Parsed_amerge_1 @ 0000000000610200] No channel layout for input 1
[Parsed_amerge_1 @ 0000000000610200] No channel layout for input 2
[AVFilterGraph @ 00000000005ddfe0] The following filters could not choose their
formats: Parsed_amerge_1
Consider inserting the (a)format filter near their input or output.
Error configuring complex filters.
I/O error
を?どのようにしてmusic.mp3ファイルの容量を増減できますか?
可能な複製(http://stackoverflow.com/questions/36105501/ffmpeg-add-background-music) – halfer
コピーして前日からのご質問のペースト? – halfer