[FFmpeg-trac] #3021(avformat:new): "Invalid block label" error while converting GIF
FFmpeg
trac at avcodec.org
Wed Oct 2 13:24:29 CEST 2013
#3021: "Invalid block label" error while converting GIF
----------------------------------+----------------------------------
Reporter: hackPNZ | Type: defect
Status: new | Priority: normal
Component: avformat | Version: 2.0.1
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+----------------------------------
Summary of the bug:
Trying to convert GIF file to webm after editing in ImageMagick library
and getting this error. Original gif file converts without errors, but if
I just open and save it with ImageMagick (or gifsicle) library it doesn't
convert with ffmpeg anymore.
In ffmpeg 1.2.1 it's okay and I found that in ffmpeg 2.0.1 some additional
error checkings were added to libavformat/gifdec.c:
{{{
if ((ret >= 0 && !frame_parsed) || ret == AVERROR_EOF) {
/* This might happen when there is no image block
* between extension blocks and GIF_TRAILER or EOF */
if (!gdc->ignore_loop && (block_label == GIF_TRAILER ||
url_feof(pb))
&& (gdc->total_iter < 0 || ++gdc->iter_count <
gdc->total_iter))
return avio_seek(pb, 0, SEEK_SET);
return AVERROR_EOF;
} else
return ret;
}}}
So, I'm trying to understand, where is the problem: on ffmpeg side or it's
ImageMagick (and other libs) GIF saving issue?
How to reproduce:
{{{
% ffmpeg -i processed.gif -b:v 600K -qmin 0 -qmax 50 -crf 5 out.webm
ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 25 2013 06:03:35 with Apple clang version 4.1
(tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
--enable-avresample --enable-libmp3lame --enable-libvorbis --enable-
libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg
--enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass
--enable-libbluray --enable-gnutls --enable-libfreetype --disable-
outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads
--cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-
postproc --enable-libx264 --enable-libxvid
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[gif @ 0x7fa121029800] invalid block label
Input #0, gif, from 'processed.gif':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: gif, bgra, 300x198, 100 tbr, 100 tbn, 100 tbc
[libvpx @ 0x7fa12102a400] v1.1.0
Output #0, webm, to 'out.webm':
Metadata:
encoder : Lavf55.12.100
Stream #0:0: Video: vp8 (libvpx), yuva420p, 300x198, q=0-50, 600 kb/s,
1k tbn, 100 tbc
Stream mapping:
Stream #0:0 -> #0:0 (gif -> libvpx)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead inf%
Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used)
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/3021>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list