[FFmpeg-trac] #3257(avcodec:new): Undesired "bitrate tolerance too small for bitrate" error for simple case

FFmpeg trac at avcodec.org
Mon Dec 30 11:41:03 CET 2013


#3257: Undesired "bitrate tolerance too small for bitrate" error for simple case
-------------------------------------+-------------------------------------
               Reporter:  ubitux     |                  Owner:
                   Type:  defect     |                 Status:  new
               Priority:  normal     |              Component:  avcodec
                Version:  git-       |               Keywords:  mjpeg
  master                             |  mjpegenc
             Blocked By:             |               Blocking:
Reproduced by developer:  0          |  Analyzed by developer:  0
-------------------------------------+-------------------------------------
 Working command:

 {{{
 ☭ ./ffmpeg -f lavfi -i testsrc=s=hd1080 -vf scale=80:40,tile=5x1 -frames:v
 1 -y out.jpg
 ffmpeg version N-59434-gd890db5 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Dec 30 2013 11:31:28 with gcc 4.8.2 (GCC) 20131219 (prerelease)
   configuration: --enable-nonfree --enable-gpl --enable-libx264 --enable-
 libmp3lame --enable-x11grab --enable-libvorbis --samples=/home/ux/fate-
 samples --enable-libvpx --cpu=native --enable-libfaac --cc='ccache cc'
 --assert-level=2
   libavutil      52. 59.100 / 52. 59.100
   libavcodec     55. 47.100 / 55. 47.100
   libavformat    55. 22.101 / 55. 22.101
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     4.  0.103 /  4.  0.103
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, lavfi, from 'testsrc=s=hd1080':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1920x1080
 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
 [swscaler @ 0x298b140] deprecated pixel format used, make sure you did set
 range correctly
 Output #0, image2, to 'out.jpg':
   Metadata:
     encoder         : Lavf55.22.101
     Stream #0:0: Video: mjpeg, yuvj444p, 400x40 [SAR 8:9 DAR 80:9],
 q=2-31, 200 kb/s, 90k tbn, 5 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> mjpeg)
 Press [q] to stop, [?] for help
 frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.20 bitrate=N/A
 video:12kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -100.184502%
 }}}

 Non-working one:

 {{{
 ☭ ./ffmpeg -f lavfi -i testsrc=s=hd1080 -vf fps=0.10,scale=80:40,tile=5x1
 -frames:v 1 -y out.jpg
 ffmpeg version N-59434-gd890db5 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Dec 30 2013 11:31:28 with gcc 4.8.2 (GCC) 20131219 (prerelease)
   configuration: --enable-nonfree --enable-gpl --enable-libx264 --enable-
 libmp3lame --enable-x11grab --enable-libvorbis --samples=/home/ux/fate-
 samples --enable-libvpx --cpu=native --enable-libfaac --cc='ccache cc'
 --assert-level=2
   libavutil      52. 59.100 / 52. 59.100
   libavcodec     55. 47.100 / 55. 47.100
   libavformat    55. 22.101 / 55. 22.101
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     4.  0.103 /  4.  0.103
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, lavfi, from 'testsrc=s=hd1080':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1920x1080
 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
 [swscaler @ 0x1b11140] deprecated pixel format used, make sure you did set
 range correctly
 [mjpeg @ 0x1b3f2c0] bitrate tolerance too small for bitrate
 [mjpeg @ 0x1b1c8e0] ff_frame_thread_encoder_init failed
 Output #0, image2, to 'out.jpg':
     Stream #0:0: Video: mjpeg, yuvj444p, 400x40 [SAR 8:9 DAR 80:9],
 q=2-31, 200 kb/s, 90k tbn, 0.02 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> mjpeg)
 Error while opening encoder for output stream #0:0 - maybe incorrect
 parameters such as bit_rate, rate, width or height
 }}}

 The bitrate out of the filtergraph should be extremely low (see the
 scale), but it seems based on the input one anyway. I have no idea why the
 {{{fps}}} filter makes a difference here.

 As a workaround, we can add {{{-q:v 0}}} to avoid the bitrate tolerance
 check.

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


More information about the FFmpeg-trac mailing list