Opened 11 years ago

Closed 11 years ago

#1992 closed enhancement (fixed)

Create thumbnail error

Reported by: bfi Owned by:
Priority: wish Component: avfilter
Version: git-master Keywords: thumbnail
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:

I have a bunch of flvs that I scale and convert to mp4, then create a thumbnail. All the mp4s are created fine, but 9 thumbnails out of 22 fail. All flvs are encoded the same, but are of different sizes.

How to reproduce:

% ffmpeg -i 78d04424cb944fe6bf8a42d88004d7f7.mp4 -vf thumbnail -frames:v 6 78d04424cb944fe6bf8a42d88004d7f7.png

ffmpeg version N-47062-g26c531c Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 25 2012 12:21:26 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52.  9.100 / 52.  9.100
  libavcodec     54. 77.100 / 54. 77.100
  libavformat    54. 37.100 / 54. 37.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 23.102 /  3. 23.102
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 17.101 /  0. 17.101
  libpostproc    52.  2.100 / 52.  2.100
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '78d04424cb944fe6bf8a42d88004d7f7.mp4':
  major_brand     : isom
  minor_version   : 512
  compatible_brands: isomiso2avc1mp41
  encoder         : Lavf54.37.100
  Duration: 00:00:01.44, start: 0.000000, bitrate: 198 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 404x320, 191 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
  handler_name    : VideoHandler
  Output #0, image2, to '78d04424cb944fe6bf8a42d88004d7f7.png':
  major_brand     : isom
  minor_version   : 512
  compatible_brands: isomiso2avc1mp41
  encoder         : Lavf54.37.100
  Stream #0:0(und): Video: png, rgb24, 404x320, q=2-31, 200 kb/s, 90k tbn, 25 tbc
  handler_name    : VideoHandler
  Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> png)
  Press [q] to stop, [?] for help
  frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=   0.0kbits/s    
  video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead nan%
  Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

Attachments (1)

78d04424cb944fe6bf8a42d88004d7f7.mp4 (34.8 KB ) - added by bfi 11 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavfilter
Keywords: thumbnail added
Resolution: invalid
Status: newclosed
Version: unspecifiedgit-master

The default batch size to analyze is 100 frames for the thumbnail filter (see, your sample contains only 36 frames, the following command line works fine:
$ ffmpeg -i 78d04424cb944fe6bf8a42d88004d7f7.mp4 -vf thumbnail=36 out%2d.png

comment:2 by Clément Bœsch, 11 years ago

You might want to re-open this ticket as an enhancement, where the flushing would force the selection of one of the frame.

Also note that using vf select with scene detection is also an alternative to this filter, with less memory usage.

comment:3 by Carl Eugen Hoyos, 11 years ago

Priority: normalwish
Resolution: invalid
Status: closedreopened
Type: defectenhancement

comment:4 by Clément Bœsch, 11 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.