繁体   English   中英

FFMPEG hwaccel 将 WEBM 转换为 MP4 视频失败:找不到编解码器参数

[英]FFMPEG hwaccel convert WEBM to MP4 video failed: could not find codec parameters

我使用 FFMPEG 使用 Nvidia GPU GeoForce GTX 1660 卡在 Windows 10 上使用 Nvidia Z52F9EC21735243AD9917GTX 1660 卡将 webm 视频转换为 mp4 格式。

[h264 @ 0000013d8b5eee00] missing picture in access unit with size 431
[extract_extradata @ 0000013d8b6aef40] No start code is found.
big-buck-bunny-trailer.webm: could not find codec parameters

FFMPEG版本和英伟达驱动版本和之前一样,只是一夜之间死机,毫无头绪。 我尝试谷歌搜索并更新到最新的 ffmpeg 版本以及 Nvidia 驱动程序版本,但它仍然没有帮助。 如果我使用 libx264 切换到 CPU 解码器(没有 hwaccel arg),它就可以正常工作。

环境 Windows 10 64bit | ffmpeg 版本 git-2020-04-15-51db0a4 (最新) | Nvidia GeForce GTX 1660,-Geoforce Game Ready 驱动程序版本:445.87 发布日期 2020 年 4 月 15 日

 ffmpeg -y -vsync 0 -hwaccel cuvid -c:v h264_cuvid -i big-buck-bunny-trailer.webm -c:v h264_nvenc output.mp4

ffmpeg version git-2020-04-15-51db0a4 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200328
  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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.102 / 58. 78.102
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[h264 @ 0000013d8b5eee00] missing picture in access unit with size 431
[extract_extradata @ 0000013d8b6aef40] No start code is found.
big-buck-bunny-trailer.webm: could not find codec parameters
WARNING: defaulting hwaccel_output_format to cuda for compatibility with old commandlines. This behaviour is DEPRECATED and will be removed in the future. Please explicitly set "-hwaccel_output_format cuda".
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, matroska,webm, from 'big-buck-bunny-trailer.webm':
  Metadata:
    encoder         : http://sourceforge.net/projects/yamka
    creation_time   : 2010-05-20T08:21:12.000000Z
  Duration: 00:00:32.48, bitrate: N/A
    Stream #0:0(eng): Video: h264, none, 640x360, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn (default)
    Stream #0:1(eng): Audio: vorbis, 44100 Hz, mono (default)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (vorbis (native) -> aac (native))
Press [q] to stop, [?] for help
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 66
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1339
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1415
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1908
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2123
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2504
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2294
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2684
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2468
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2622
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2867
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2737
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 3017
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2556
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 7811
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1880
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1722
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2309
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1215
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2080
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1775
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2247
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1782
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1945
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1529
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1807
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2015
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1568
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2159
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1861
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2397
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1627
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2364
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1821
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2282
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2068
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1699
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2129
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2268
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2197
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1981
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2169
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2888
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1600
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2958
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1518
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2738
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2319
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2421
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2841
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 1949
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2422
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2288
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2559
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2332
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2403
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2257
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2573
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2320
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2231
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2408
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2415
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2194
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2697
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2480
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2256
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2245
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2519
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2203
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2332
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2341
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2439
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2201
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2882
[NULL @ 0000013d8b5eee00] missing picture in access unit with size 2467
Too many packets buffered for output stream 0:1.
[aac @ 0000013d8b6bf5c0] Qavg: 115.929
[aac @ 0000013d8b6bf5c0] 2 frames left in the queue on closing
Conversion failed!

有谁知道如何解决它,我被卡住了几天? 非常感激!

尝试:

ffmpeg -y -vsync 0 -hwaccel cuvid -c:v vp8_cuvid -i big-buck-bunny-trailer.webm -c:v h264_nvenc output.mp4

或者

ffmpeg -y -vsync 0 -hwaccel cuvid -c:v vp9_cuvid -i big-buck-bunny-trailer.webm -c:v h264_nvenc output.mp4

nvidia的视频编解码器sdk需要先指定源,这种情况下需要将h264解码器换成vp8或vp9解码器。

我确实设法通过将libvpx指定为解码器来修复它

ffmpeg -y -vsync 0 -hwaccel cuvid -c:v libvpx -i big-buck-bunny-trailer.webm -c:v h264_nvenc output.mp4

这是有道理的,因为 libvpx 肯定能够解码 webm 视频。 只是想知道为什么 h264_cuvid 不能再做这项工作了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM