ffmpeg“不允許操作”錯誤在特定時間戳連接文件

ffmpeg“不允許操作”錯誤在特定時間戳連接文件

我在 MacOs 10.15.7 上使用 ffmpeg,使用權限設定為 755 的 txt 檔案在特定時間戳將 jpeg 連接在一起(內容如下)

file 'Walk1_pupil_00001_00.jpeg'
inpoint 00:00:00.862054
outpoint 00:00:01.722921
file 'Walk1_pupil_00002_00.jpeg'
inpoint 00:00:01.722922
outpoint 00:00:01.747019
file 'Walk1_pupil_00003_00.jpeg'
inpoint 00:00:01.747020
outpoint 00:00:01.748162
file 'Walk1_pupil_00003_00.jpeg'

我在 txt 檔案中調用的圖像所在的同一資料夾中運行了以下命令(也位於同一資料夾中):

ffmpeg -f concat -safe 0 -i myra_test.txt -loglevel debug 1088x1080 -vcodec libx264 -pix_fmt yuv420p -metadata date=2021-04-27T19:27:05.000000Z /Users/mairahmac/Dropbox/My\ Mac\ \(Myras-MacBook-Pro.local\)/Desktop/Rotations/NanthiaSuthana/SpatialNavigationTask/subWalkVideoData/Walk1/VideoOut/myra_test.mp4 

這會產生以下錯誤:

ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with argument 'concat'.
Reading option '-safe' ... matched as AVOption 'safe' with argument '0'.
Reading option '-i' ... matched as input url with argument 'myra_test.txt'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '1088x1080' ... matched as output url.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'.
Reading option '-metadata' ... matched as option 'metadata' (add metadata) with argument 'date=2021-04-27T19:27:05.000000Z'.
Reading option '/Users/mairahmac/Dropbox/My Mac (Myras-MacBook-Pro.local)/Desktop/Rotations/NanthiaSuthana/SpatialNavigationTask/subWalkVideoData/Walk1/VideoOut/myra_test.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url myra_test.txt.
Applying option f (force format) with argument concat.
Successfully parsed a group of options.
Opening an input file: myra_test.txt.
[concat @ 0x7f8e8a809800] Opening 'myra_test.txt' for reading
[file @ 0x7f8e895236c0] Setting default whitelist 'file,crypto,data'
[NULL @ 0x7f8e8a80a400] Opening 'Walk1_pupil_00001_00.jpeg' for reading
[image2 @ 0x7f8e8a80a400] Format image2 probed with size=2048 and score=50
[image2 @ 0x7f8e8a80a400] Before avformat_find_stream_info() pos: 0 bytes read:19125 seeks:0 nb_streams:1
[mjpeg @ 0x7f8e89814200] marker=d8 avail_size_in_buf=19123
[mjpeg @ 0x7f8e89814200] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f8e89814200] marker=e0 avail_size_in_buf=19121
[mjpeg @ 0x7f8e89814200] marker parser used 16 bytes (128 bits)
[mjpeg @ 0x7f8e89814200] marker=db avail_size_in_buf=19103
[mjpeg @ 0x7f8e89814200] index=0
[mjpeg @ 0x7f8e89814200] qscale[0]: 0
[mjpeg @ 0x7f8e89814200] marker parser used 67 bytes (536 bits)
[mjpeg @ 0x7f8e89814200] marker=db avail_size_in_buf=19034
[mjpeg @ 0x7f8e89814200] index=1
[mjpeg @ 0x7f8e89814200] qscale[1]: 1
[mjpeg @ 0x7f8e89814200] marker parser used 67 bytes (536 bits)
[mjpeg @ 0x7f8e89814200] marker=c0 avail_size_in_buf=18965
[mjpeg @ 0x7f8e89814200] Changing bps from 0 to 8
[mjpeg @ 0x7f8e89814200] sof0: picture: 1088x1080
[mjpeg @ 0x7f8e89814200] component 0 2:2 id: 0 quant:0
[mjpeg @ 0x7f8e89814200] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x7f8e89814200] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x7f8e89814200] pix fmt id 22111100
[mjpeg @ 0x7f8e89814200] Format yuvj420p chosen by get_format().
[mjpeg @ 0x7f8e89814200] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x7f8e89814200] marker=c4 avail_size_in_buf=18946
[mjpeg @ 0x7f8e89814200] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f8e89814200] marker=c4 avail_size_in_buf=18913
[mjpeg @ 0x7f8e89814200] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f8e89814200] marker=c4 avail_size_in_buf=18730
[mjpeg @ 0x7f8e89814200] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f8e89814200] marker=c4 avail_size_in_buf=18697
[mjpeg @ 0x7f8e89814200] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f8e89814200] escaping removed 1 bytes
[mjpeg @ 0x7f8e89814200] marker=da avail_size_in_buf=18514
[mjpeg @ 0x7f8e89814200] marker parser used 18513 bytes (148104 bits)
[mjpeg @ 0x7f8e89814200] EOI missing, emulating
[mjpeg @ 0x7f8e89814200] decode frame unused 0 bytes
[image2 @ 0x7f8e8a80a400] After avformat_find_stream_info() pos: 19125 bytes read:19125 seeks:0 frames:1
[AVIOContext @ 0x7f8e89411440] Statistics: 19125 bytes read, 0 seeks
[AVIOContext @ 0x7f8e89523880] Statistics: 278 bytes read, 0 seeks
myra_test.txt: Operation not permitted

我已經使用 jpeginfo 檢查了所有 jpeg 文件,看看它們是否已損壞,而且都很好。誰可以幫我這個事?

答案1

影像沒有持續時間,因此input不起作用outpoint。該錯誤具有誤導性,因為它不是檔案權限問題。

代替使用duration

concat 解復用器文檔和例子FFmpeg 維基:幻燈片

相關內容