[FFmpeg-trac] #4028(avfilter:new): Videofilter "fps" to extract images each minute starts at 30 seconds offset

FFmpeg trac at avcodec.org
Tue Oct 14 13:37:54 CEST 2014


#4028: Videofilter "fps" to extract images each minute starts at 30 seconds offset
-------------------------------------+-------------------------------------
             Reporter:  peter_b      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avfilter     |                  Version:  git-
             Keywords:  thumbnail    |  master
  images                             |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 I wanted to extract an image at exactly every minute from a video, as
 described in the wiki article "[[Create a thumbnail image every X seconds
 of the video]]".

 I expected to get images for positions 0s, 60s, 120s, etc.
 But the result is: 0s, 30s, 90s, 150s, etc.


 How to reproduce:
 '''1) Generate a testvideo with time-information (seconds) in the
 image:'''
 {{{
 ffmpeg -t 300 -f lavfi -i testsrc -an -y -c:v ffv1 test.avi
 }}}

 '''2) Extract images using the "fps" video filter:'''
 {{{
 ffmpeg_git -i test.avi -vf fps=fps=1/60 -f image2 image%03d.jpg
 }}}


 Complete, uncut console output:
 {{{
 ffmpeg version N-66851-gd58fa94 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Oct 14 2014 11:43:57 with gcc 4.4.5 (Debian 4.4.5-8)
   configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
 --enable-version3 --enable-postproc --enable-swscale --enable-avfilter
 --enable-pthreads --enable-bzlib --enable-zlib --enable-libvorbis
 --enable-libopenjpeg --enable-decoder=png --enable-encoder=png --disable-
 decoder=jpeg2000 --enable-libfreetype --enable-libschroedinger --enable-
 libx264 --enable-libfaac --enable-libmp3lame
   libavutil      54. 10.100 / 54. 10.100
   libavcodec     56.  5.100 / 56.  5.100
   libavformat    56.  9.100 / 56.  9.100
   libavdevice    56.  1.100 / 56.  1.100
   libavfilter     5.  1.105 /  5.  1.105
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  3.100 / 53.  3.100
 Input #0, avi, from 'test.avi':
   Metadata:
     encoder         : Lavf56.9.100
   Duration: 00:05:00.00, start: 0.000000, bitrate: 886 kb/s
     Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), bgr0, 320x240, 881 kb/s,
 SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 25 tbn, 25 tbc
 [swscaler @ 0x9abf040] deprecated pixel format used, make sure you did set
 range correctly
 [mjpeg @ 0x9ad5180] bitrate tolerance 4000000 too small for bitrate
 200000, overriding
 Output #0, image2, to 'image%03d.jpg':
   Metadata:
     encoder         : Lavf56.9.100
     Stream #0:0: Video: mjpeg, yuvj444p(pc), 320x240 [SAR 1:1 DAR 4:3],
 q=2-31, 200 kb/s, 0.02 fps, 0.02 tbn, 0.02 tbc
     Metadata:
       encoder         : Lavc56.5.100 mjpeg
 Stream mapping:
   Stream #0:0 -> #0:0 (ffv1 (native) -> mjpeg (native))
 Press [q] to stop, [?] for help
 frame=    6 fps=0.3 q=1.6 Lsize=N/A time=00:06:00.00 bitrate=N/A
 video:84kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}

 The images are taken from the following positions (in seconds):
 0, 30, 90, 150, 210, 270

 It ''should'' be:
 0, 60, 120, 180, 240, 300

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4028>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list