ffmpeg 音声ファイルを連結する

there is something i want to do

音楽の長さを増やすために音楽Fileを連結したい。
連結する回数を増やせば、なが~い音楽Fileの作成も可能

Syntax

書式 ffmpeg -i input1.mp3 -i input2.mp3 -filter_complex “concat=n=2:v=0:a=1” output.mp3


Comment

Commnet -i で複数の入力を指定
-o で連結後の出力Fielを指定

2個以上のFileの結合も可能
2個以上の結合の場合には”concat=n=2:v=0:a=1”の
n=の部分に結合するFileの数を指定します。

Example

#
#
#ffmpeg -i input1.mp3 -i input2.mp3 -filter_complex "concat=n=2:v=0:a=1" output.mp3
ffmpeg version 3.4.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --dis
able-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libfribidi --enable-
libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg -
-enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-lib
vidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable
-libzimg
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mp3, from 'input1.mp3':
  Metadata:
    encoder         : Lavf57.56.101
  Duration: 00:05:00.15, start: 0.025057, bitrate: 192 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
    Metadata:
      encoder         : Lavc57.64
Input #1, mp3, from 'input2.mp3':
  Metadata:
    encoder         : Lavf57.56.101
  Duration: 00:05:00.15, start: 0.025057, bitrate: 192 kb/s
    Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
    Metadata:
      encoder         : Lavc57.64
Stream mapping:
  Stream #0:0 (mp3) -> concat:in0:a0
  Stream #1:0 (mp3) -> concat:in1:a0
  concat -> Stream #0:0 (libmp3lame)
Press [q] to stop, [?] for help
Output #0, mp3, to 'output.mp3':
  Metadata:
    TSSE            : Lavf57.83.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p (default)
    Metadata:
      encoder         : Lavc57.107.100 libmp3lame
size=    9379kB time=00:10:00.21 bitrate= 128.0kbits/s speed=8.55x
video:0kB audio:9379kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002634%
#
#

コメントを残す