尝试从 webp 转换为 mp4 时找不到图像数据

dot*_*mer 4 mp4 ffmpeg

更新:

尝试从 Neckbeard 推荐的命令:

ffmpeg -analyzeduration 10M -probesize 10M -i Webpfile.webp -c:v libx264 output.mp4
Run Code Online (Sandbox Code Playgroud)

这是输出(广义的文件路径):

User-macbookpro:~ User$ ffmpeg -analyzeduration 10M -probesize 10M -i Webpfile.webp -c:v libx264 output.mp4
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.38)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopenh264 --enable-libopus --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[webp @ 0x7f9920811000] skipping unsupported chunk: ANIM
[webp @ 0x7f9920811000] skipping unsupported chunk: ANMF
    Last message repeated 14 times
[webp @ 0x7f9920811000] image data not found
[webp_pipe @ 0x7f9920000e00] decoding for stream 0 failed
[webp_pipe @ 0x7f9920000e00] Could not find codec parameters for stream 0 (Video: webp, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, webp_pipe, from 'webpfile.webp':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: webp, none, 25 tbr, 25 tbn, 25 tbc
File 'output.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (webp (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[webp @ 0x7f9920005e00] skipping unsupported chunk: ANIM
[webp @ 0x7f9920005e00] skipping unsupported chunk: ANMF
    Last message repeated 14 times
[webp @ 0x7f9920005e00] image data not found
Error while decoding stream #0:0: Invalid data found when processing input
Finishing stream 0:0 without any data written to it.
Nothing was written into output file 0 (output.mp4), because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Conversion failed!
Run Code Online (Sandbox Code Playgroud)

目前我正在尝试将 webp 转换回 mp4,但出现错误:

Nothing was written into output file 0 (output.mp4), because at least one of its streams received no packets.

这是我一直在使用但没有成功的当前命令:

ffmpeg -i webpfile.webp -c:v libx264 output.mp4
Run Code Online (Sandbox Code Playgroud)

我注意到在处理过程中还有其他错误,调用

Skipping unsupported chunk: ANIM

Skipping unsupported chunk: ANMF

Could not find codec parameters for stream 0 (Video: webp, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Run Code Online (Sandbox Code Playgroud)

我在这里做错了什么?我认为这就像我将电影转换为 webp 一样简单,但相反的方式似乎更微妙。

pru*_*nge 8

根据此 FFmpeg 票证,尚不支持解码动画 webp 文件。

https://trac.ffmpeg.org/ticket/4907

目前FFmpeg可以编码动画WebP,但不能解码,给用户带来不便。

由于“不支持的块”,现在解码动画 WebP 会生成“未找到图像数据错误”:https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/webp.c#L1504

当前票证状态:开放增强