这是在 Windows 10 上,我在同一个文件夹中有 3 个文件,名称如下:
- 测试-0.数据
- 测试-1.数据
- 测试-2.数据
上述文件将使用 rawvideo 选项读取,然后保存为 mp4。我的 cli 命令如下:
ffmpeg -f rawvideo -pix_fmt nv21 -s 640x480 -r 15 -i test-%d.data out3.mp4
但我收到以下错误:
test-%d.data: No such file or directory
如果我尝试使用目录中的单个文件,它可以正常工作:
ffmpeg -f rawvideo -pix_fmt nv21 -s 640x480 -r 15 -i mike-1.data out4.mp4
我在这里不知所措,我可能做了一些愚蠢的事情。有人可以帮我纠正我的 cli 命令吗?
以下是完整报告:
ffmpeg started on 2016-09-12 at 23:47:56
Report written to "ffmpeg-20160912-234756.log"
Command line:
ffmpeg -f rawvideo -pix_fmt nv21 -s 640x480 -r 15 -i "test-%d.data" out3.mp4 -report
ffmpeg version N-81423-g61fac0e Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 29.100 / 55. 29.100
libavcodec 57. 54.100 / 57. 54.100
libavformat 57. 47.101 / 57. 47.101
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 52.100 / 6. 52.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with argument 'rawvideo'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'nv21'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '640x480'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '15'.
Reading option '-i' ... matched as input file with argument 'test-%d.data'.
Reading option 'out3.mp4' ... matched as output file.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file test-%d.data.
Applying option f (force format) with argument rawvideo.
Applying option pix_fmt (set pixel format) with argument nv21.
Applying option s (set frame size (WxH or abbreviation)) with argument 640x480.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 15.
Successfully parsed a group of options.
Opening an input file: test-%d.data.
[file @ 00000000006c7ae0] Setting default whitelist 'file,crypto'
test-%d.data: No such file or directory
答案1
答案2
留下双重省略号,它有特殊含义。
ffmpeg -f rawvideo -pix_fmt nv21 -s 640x480 -r 15 -i test-%d.data out3.mp4