Невозможно преобразовать форматы, поддерживаемые фильтром '...' - Ошибка повторной инициализации фильтров - PullRequest
0 голосов
/ 26 августа 2018

Я использую эту команду ffmpeg (значения для простоты удалены)

ffmpeg -hwaccel cuvid -c:v h264_cuvid -y -ss 1 -i "FILE0001.MOV" -ss 0 -i "GOPR0621.MP4" -filter_complex 
[0:v][1:v]
  midequalizer
[al];
[al]
  yadif
  lenscorrection
  scale
[vl];
[1:v]
  lenscorrection
  scale
[vr];
[vl][vr]
  hstack=shortest=1 
-an -c:v h264_nvenc -preset slow "output.mp4"

на машине с видеокартой cuda. ​​

Я получаю

ffmpeg version N-90979-g08032331ac Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --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-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 18.100 / 56. 18.100
  libavcodec     58. 19.100 / 58. 19.100
  libavformat    58. 13.101 / 58. 13.101
  libavdevice    58.  4.100 / 58.  4.100
  libavfilter     7. 21.100 /  7. 21.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000254a8afc0c0] st: 0 edit list: 1 Missing key frame while searching for timestamp: 6006
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000254a8afc0c0] st: 0 edit list 1 Cannot find an index entry before timestamp: 6006.
....
Stream mapping:
  Stream #0:0 (h264_cuvid) -> midequalizer:in0
  Stream #1:0 (h264) -> midequalizer:in1
  Stream #1:0 (h264) -> lenscorrection
  hstack -> Stream #0:0 (h264_nvenc)

Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!

Та же команда без CUDA работает, т.е.

ffmpeg -y -ss 1 -i "FILE0001.MOV" -ss 0 -i "GOPR0621.MP4" -filter_complex 
[0:v][1:v]
  midequalizer
[al];
[al]
  yadif
  lenscorrection
  scale
[vl];
[1:v]
  lenscorrection
  scale
[vr];
[vl][vr]
  hstack=shortest=1 
-an "output.mp4"

Как мне заставить ее работать на машине с Windows 10 с cuda?

... .... ... .... .... .... ... .... ... .... ... .... ... .... ... .... ... ....... .... ... .... ... .... ... .... ... .... ... .... ... ....... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ....... ... .... ... .... ... .... ... .... ... .... ... .... ....... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... ... .... .... .... ... .... ... .... ... .... ... .... ... .... ... ....... .... ... .... ... .... ... .... *

1 Ответ

0 голосов
/ 26 августа 2018

У вас нет устройства CUDA для тестирования, но оно должно быть

ffmpeg -hwaccel cuvid -c:v h264_cuvid -y -ss 1 -i "FILE0001.MOV" -ss 0 -i "GOPR0621.MP4" -filter_complex 
[0:v]hwdownload,format=nv12,format=yuv420p[0v];
[0v][1:v]
  midequalizer
[al];
[al]
  yadif
  lenscorrection
  scale
[vl];
[1:v]
  lenscorrection
  scale
[vr];
[vl][vr]
  hstack=shortest=1 
-an -c:v h264_nvenc -preset slow "output.mp4"
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...