Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image data not found when trying to convert from webp to mp4

Tags:

ffmpeg

mp4

UPDATE:

Tried recommended command from Neckbeard:

ffmpeg -analyzeduration 10M -probesize 10M -i Webpfile.webp -c:v libx264 output.mp4

Here's the output (file paths generalized):

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!

Currently I'm trying to convert a webp back to an mp4, but getting the error:

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

Here is the current command I've been using without success:

ffmpeg -i webpfile.webp -c:v libx264 output.mp4

I notice that there are also other errors during processing, calling out

Skipping unsupported chunk: ANIM

Skipping unsupported chunk: ANMF

And

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

What am I doing wrong here? I thought it would be as simple as I had converted a movie to webp, but going the other way seems more nuanced.

like image 388
dotcommer Avatar asked Jan 27 '23 21:01

dotcommer


1 Answers

According to this FFmpeg ticket, decoding animated webp files is not yet supported.

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

Currently, FFmpeg can encode animated WebPs, but cannot decode them, which is inconvenient for users.

Decoding animated WebPs right now generates "image data not found error" due to "unsupported chunk": ​https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/webp.c#L1504

Current ticket status: open enhancement

like image 115
prunge Avatar answered Mar 31 '23 20:03

prunge