FFMPEG Concat过滤器-输出视频跳过第二个文件

时间:2018-10-15 23:10:17

标签: ffmpeg mp4 h.264 concat

我正在使用ffmpeg concat过滤器来加入视频文件。我知道文件必须完全相同,格式才能在不进行编码的情况下起作用。但是,这两个文件的输出并不是很完美。切换到第二个视频文件时,视频将停止。

这是两个视频文件的输出。

SKYbum:~ Aspvik$ ffmpeg -i /Users/Aspvik/Desktop/newIntro.mp4 -i /Users/Aspvik/Downloads/wetransfer-008789/Middle.mp4 
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Aspvik/Desktop/newIntro.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.12.100
  Duration: 00:00:08.87, start: 0.000000, bitrate: 7160 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 7159 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Aspvik/Downloads/wetransfer-008789/Middle.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Netcam Studio 1.6.1.0
    encoder         : Lavf57.71.100
  Duration: 00:00:19.47, start: 0.033008, bitrate: 676 kb/s
    Stream #1:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 674 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler

我用于concat的命令是:

ffmpeg -f concat -safe 0 -i /Users/Aspvik/Desktop/files.txt -codec copy -y /Users/Aspvik/Desktop/video.mp4

谁能看到可能出什么问题了?

0 个答案:

没有答案