在Windows上,它在Mac和Linux上运行时抛出“处理输入时发现无效数据”

问题描述 投票:0回答:1

我需要运行一个每晚运行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:处理输入时发现无效数据

我将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:\大脑鱿鱼> C:\ Users \ migue \ Desktop \ ffmpeg-20200211-f15007a-win64-static \ bin \ ffmpeg.exe -v 48 -i files_to_combine -vcodec libx264 show.mp4ffmpeg版本git-2020-02-11-f15007a版权所有(c)2000-2020 FFmpeg开发人员内置gcc 9.2.1(GCC)20200122配置:--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-amflibavutil 56. 39.100 / 56. 39.100libavcodec 58. 68.102 / 58. 68.102libavformat 58. 38.100 / 58. 38.100libavdevice 58. 9.103 / 58. 9.103libavfilter 7. 75.100 / 7. 75.100libswscale 5. 6.100 / 5. 6.100libswresample 3. 6.100 / 3. 6.100libpostproc 55. 6.100 / 55. 6.100拆分命令行。读取选项'-v'...与参数'48'匹配为选项'v'(设置日志记录级别)。读取选项'-i'...作为输入URL与参数'files_to_combine'匹配。读取选项'-vcodec'...与参数'libx264'匹配为选项'vcodec'(强制视频编解码器('copy'复制流))。读取选项'show.mp4'...与输出URL匹配。完成拆分命令行。解析一组选项:global。对参数48应用选项v(设置日志记录级别)。成功解析了一组选项。解析一组选项:输入url files_to_combine。成功解析了一组选项。打开输入文件:files_to_combine。[NULL @ 0000021c781784c0]打开“ files_to_combine”进行读取[file @ 0000021c78179580]设置默认白名单“文件,密码,数据”[AVIOContext @ 0000021c781817c0]统计信息:读取182个字节,查找0files_to_combine:处理输入时发现无效数据

files_to_combine的内容是:

档案'short_DSC_0013.MOV'档案'short_DSC_0014.MOV'文件“ short_DSC_0015.MOV”文件“ short_DSC_0016.MOV”文件“ short_DSC_0017.MOV”文件“ short_DSC_0018.MOV”文件“ short_DSC_0019.MOV”

由于命令错误而更新

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

ffmpeg -safe 0 -f concat -i files_to_combine -vcodec libx264 show.mp4
ffmpeg concat
1个回答
1
投票

我已在Windows 10上成功测试它:

(ffmpeg版本N-95216-ge6625ca41f

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

_

file 'C:\Users\drake7\Desktop\01.mp4'
file 'C:\Users\drake7\Desktop\02.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"
© www.soinside.com 2019 - 2024. All rights reserved.