连接 Windows 抛出 "Invalid data found when processing input" 而它在 Mac 和 Linux 上工作

Concatenating on Windows throws "Invalid data found when processing input" while it works on Mac and Linux

我需要 运行 使用每晚构建的 FFMPEG 的命令来报告 concat 协议上的错误。我发现很难在 Linux 上使用 libx264 支持从源代码进行编译,并且我想节省我的 Mac 计算机,所以我在 Windows 上使用 Zeranoe 上的夜间构建。

我调用这个命令来连接文件:

ffmpeg -safe 0 concat -i files_to_combine -vcodec libx264 show.mp4

其中 files_to_combine 是:

file ./short_DSC_0013.MOV
file ./short_DSC_0014.MOV
file ./short_DSC_0015.MOV
file ./short_DSC_0016.MOV
file ./short_DSC_0017.MOV
file ./short_DSC_0018.MOV
file ./short_DSC_0019.MOV

我从包含视频文件和 files_to_combine 的目录中调用此命令。

在 Windows 每晚构建时,我收到错误:

files_to_combine: Invalid data found when processing input

我将 file ./DSC_0013.MOV 更改为这些选项,都出现相同的错误:

file 'short_DSC_0013.MOV'
file '.\short_DSC_0013.MOV'
file 'F:\short_DSC_0013.MOV'

如何调试此错误,或者在 Windows 上与夜间构建连接的语法是什么?

更新日志级别 48

我 运行 与 -v 48 相同的命令并得到:

F:\brain squids>C:\Users\migue\Desktop\ffmpeg-20200211-f15007a-win64-static\bin\ffmpeg.exe -v 48 -i files_to_combine -vcodec libx264 show.mp4
ffmpeg version git-2020-02-11-f15007a Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 39.100 / 56. 39.100
  libavcodec     58. 68.102 / 58. 68.102
  libavformat    58. 38.100 / 58. 38.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 75.100 /  7. 75.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '48'.
Reading option '-i' ... matched as input url with argument 'files_to_combine'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option 'show.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 48.
Successfully parsed a group of options.
Parsing a group of options: input url files_to_combine.
Successfully parsed a group of options.
Opening an input file: files_to_combine.
[NULL @ 0000021c781784c0] Opening 'files_to_combine' for reading
[file @ 0000021c78179580] Setting default whitelist 'file,crypto,data'
[AVIOContext @ 0000021c781817c0] Statistics: 182 bytes read, 0 seeks
files_to_combine: Invalid data found when processing input

files_to_combine的内容是:

file 'short_DSC_0013.MOV'
file 'short_DSC_0014.MOV'
file 'short_DSC_0015.MOV'
file 'short_DSC_0016.MOV'
file 'short_DSC_0017.MOV'
file 'short_DSC_0018.MOV'
file 'short_DSC_0019.MOV'

命令错误更新

我输错了命令。正确的命令在 concat 前面有一个 -f,这是我发现的,因为接受的答案能够使命令在类似的环境中工作:

ffmpeg -safe 0 -f concat -i files_to_combine -vcodec libx264 show.mp4

我在 Windows 10:

测试成功

(ffmpeg 版本 N-95216-ge6625ca41f)

  1. 视频 01.mp402.mp4.txtC:\Users\drake7\Desktop\
  2. files_to_combine.txt的内容:

_

file 'C:\Users\drake7\Desktop.mp4'
file 'C:\Users\drake7\Desktop.mp4'

注:02.mp401.mp4的翻版。对于这个快速测试,我想让它非常简单。

.txt 创建于 right-click > New > Text Document

(使用我的 windows 命令提示符我在 C:\Users\drake7\Desktop\ffmpeg\bin

"ffmpeg.exe" -f concat -safe 0 -i "C:\Users\drake7\Desktop\files_to_combine.txt" -vcodec libx264 "C:\Users\drake7\Desktop\show.mp4"