[FFmpeg-user] Issue timelapse fps slowing down until reach 0 fps - thread_queue_size

Ivan Junckes Filho ivanjunckes at gmail.com
Sat Nov 23 21:31:48 EET 2019


Another output after removing -r 20

ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg
developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1
--build-suffix=-ffmpeg --toolchain=hardened
--libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
--cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping
--disable-decoder=libopenjpeg --disable-decoder=libschroedinger
--enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libflite --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm
--enable-libmodplug --enable-libmp3lame --enable-libopenjpeg
--enable-libopus --enable-libpulse --enable-librtmp
--enable-libschroedinger --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi
--enable-openal --enable-opengl --enable-x11grab --enable-libdc1394
--enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264
--enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[mjpeg @ 0x2406a40] Changeing bps to 8
Input #0, image2, from
'/home/timelapse/clientes/ctech_live/camera1/fotos/convert/frame%04d.jpg':
  Duration: 00:00:24.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1280x720 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, png_pipe, from
'/home/timelapse/clientes/ctech_live/config/logo.png':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Video: png, rgba(pc), 320x230, 25 fps, 25 tbr, 25 tbn, 25
tbc
Guessed Channel Layout for  Input Stream #2.0 : stereo
Input #2, wav, from '/home/timelapse/config/audios/audio2.wav':
  Metadata:
    encoded_by      : Logic Pro X
    date            : 2017-08-26
    creation_time   : 10:42:17
    time_reference  : 165931199
    umid            :
0x000000000000000000000000000000000000000000000000000000008A00CE09FFCF0FBD2055AE52FF7F000040CE6D0E01000000004EAE52FF7F0000ECCE03CC
    coding_history  :
  Duration: 00:02:32.20, bitrate: 1411 kb/s
    Stream #2:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2
channels, s16, 1411 kb/s
[swscaler @ 0x257a0a0] deprecated pixel format used, make sure you did set
range correctly
[libx264 @ 0x2457980] using SAR=1/1
[libx264 @ 0x2457980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX XOP FMA4 LZCNT
[libx264 @ 0x2457980] profile High, level 3.1
[libx264 @ 0x2457980] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec
- Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1
ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1
weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to
'/home/timelapse/clientes/ctech_live/camera1/timelapse/timelapse23-11-2019-17-29-59.mp4':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc56.60.100 libx264
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo,
fltp, 128 kb/s
    Metadata:
      encoder         : Lavc56.60.100 aac
Stream mapping:
  Stream #0:0 (mjpeg) -> overlay:main (graph 0)
  Stream #1:0 (png) -> fade (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)
  Stream #2:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[image2 @ 0x24058c0] Thread message queue blocking; consider raising the
thread_queue_size option (current value: 8)
Input stream #0:0 frame changed from size:1280x720 fmt:yuvj444p to
size:1280x720 fmt:yuvj420p
[swscaler @ 0x35a2160] deprecated pixel format used, make sure you did set
range correctly
Past duration 0.999992 too large   21716kB time=00:00:21.52
bitrate=8266.8kbits/s
frame=  602 fps=7.1 q=28.0 size=   21964kB time=00:00:21.76
bitrate=8269.0kbits/s dup=0 drop=16293

On Sat, Nov 23, 2019 at 5:20 PM Ivan Junckes Filho <ivanjunckes at gmail.com>
wrote:

> The idea behind this is: From a list of photos I generate a timelapse add
> a logo in the first few seconds and fade out. Also I have a audio fading in
> in the beginning of the video and out in the end.
>
> I already added thread_queue_size 512 but didn't work. I will try to check
> your rules Moritz, if you could give an example within the command would be
> great. Thanks
>
> This is the full output:
> ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg
> developers
>   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
>   configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1
> --build-suffix=-ffmpeg --toolchain=hardened
> --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
> --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping
> --disable-decoder=libopenjpeg --disable-decoder=libschroedinger
> --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
> --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
> --enable-libcdio --enable-libflite --enable-libfontconfig
> --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm
> --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg
> --enable-libopus --enable-libpulse --enable-librtmp
> --enable-libschroedinger --enable-libshine --enable-libsnappy
> --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
> --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack
> --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi
> --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394
> --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264
> --enable-libopencv
>   libavutil      54. 31.100 / 54. 31.100
>   libavcodec     56. 60.100 / 56. 60.100
>   libavformat    56. 40.101 / 56. 40.101
>   libavdevice    56.  4.100 / 56.  4.100
>   libavfilter     5. 40.101 /  5. 40.101
>   libavresample   2.  1.  0 /  2.  1.  0
>   libswscale      3.  1.101 /  3.  1.101
>   libswresample   1.  2.101 /  1.  2.101
>   libpostproc    53.  3.100 / 53.  3.100
> [mjpeg @ 0x776a40] Changeing bps to 8
> Input #0, image2, from
> '/home/timelapse/clientes/ctech_live/camera1/fotos/convert/frame%04d.jpg':
>   Duration: 00:00:24.00, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
> 1280x720 [SAR 72:72 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
> Input #1, png_pipe, from
> '/home/timelapse/clientes/ctech_live/config/logo.png':
>   Duration: N/A, bitrate: N/A
>     Stream #1:0: Video: png, rgba(pc), 320x230, 25 fps, 25 tbr, 25 tbn, 25
> tbc
> Guessed Channel Layout for  Input Stream #2.0 : stereo
> Input #2, wav, from '/home/timelapse/config/audios/audio2.wav':
>   Metadata:
>     encoded_by      : Logic Pro X
>     date            : 2017-08-26
>     creation_time   : 10:42:17
>     time_reference  : 165931199
>     umid            :
> 0x000000000000000000000000000000000000000000000000000000008A00CE09FFCF0FBD2055AE52FF7F000040CE6D0E01000000004EAE52FF7F0000ECCE03CC
>     coding_history  :
>   Duration: 00:02:32.20, bitrate: 1411 kb/s
>     Stream #2:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2
> channels, s16, 1411 kb/s
> [swscaler @ 0x8ea0a0] deprecated pixel format used, make sure you did set
> range correctly
> [libx264 @ 0x7c7980] using SAR=1/1
> [libx264 @ 0x7c7980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
> AVX XOP FMA4 LZCNT
> [libx264 @ 0x7c7980] profile High, level 3.1
> [libx264 @ 0x7c7980] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec
> - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options:
> cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
> psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
> cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12
> lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
> bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
> b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=20
> scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
> qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
> Output #0, mp4, to
> '/home/timelapse/clientes/ctech_live/camera1/timelapse/timelapse23-11-2019-17-14-42.mp4':
>   Metadata:
>     encoder         : Lavf56.40.101
>     Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p,
> 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 20 fps, 10240 tbn, 20 tbc (default)
>     Metadata:
>       encoder         : Lavc56.60.100 libx264
>     Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo,
> fltp, 128 kb/s
>     Metadata:
>       encoder         : Lavc56.60.100 aac
> Stream mapping:
>   Stream #0:0 (mjpeg) -> overlay:main (graph 0)
>   Stream #1:0 (png) -> fade (graph 0)
>   overlay (graph 0) -> Stream #0:0 (libx264)
>   Stream #2:0 -> #0:1 (pcm_s16le (native) -> aac (native))
> Press [q] to stop, [?] for help
> [image2 @ 0x7758c0] Thread message queue blocking; consider raising the
> thread_queue_size option (current value: 8)
> Input stream #0:0 frame changed from size:1280x720 fmt:yuvj444p to
> size:1280x720 fmt:yuvj420p
> [swscaler @ 0x935ee0] deprecated pixel format used, make sure you did set
> range correctly
> frame=  388 fps=2.8 q=28.0 size=   13822kB time=00:00:16.50
> bitrate=6862.2kbits/s dup=0 drop=29442
>
> On Sat, Nov 23, 2019 at 6:05 PM Moritz Barsnick <barsnick at gmx.net> wrote:
>
>> On Fri, Nov 22, 2019 at 21:53:29 -0200, Ivan Junckes Filho wrote:
>> > Hi guys, I am generating a timelapse of images, with a logo at the start
>> > and audio.
>> >
>> > I am having an issue with fps going down to almost 0 and not finishing
>> the
>> > processing. I also get this message:
>> >
>> > [image2 @ 0x1cc28c0] Thread message queue blocking; consider raising the
>> > thread_queue_size option (current value: 8)
>> > frame=  388 fps=0.8 q=28.0 size=   13819kB time=00:00:16.50
>> > bitrate=6860.9kbits/s dup=0 drop=142365
>>
>> Kindly always show us the complete, uncut console output of your ffmpeg
>> command.
>>
>> > The command I use is:
>> > ffmpeg -r 20 -i
>> > /home/timelapse/clientes/ctech_live/camera1/fotos/convert/frame%04d.jpg
>> >  -framerate 20000/1001  -loop 1 -i
>> > /home/timelapse/clientes/ctech_live/config/logo.png -i
>>
>> I'm too lazy to reproduce[*], but would like to know why you give your
>> overlay logo a different framerate than the image sequence.
>>
>> Also, "-r 20" doesn't work in the first input, as far as I can tell.
>> You ffmpeg console output should indicate 25fps.
>>
>> > /home/timelapse/config/audios/audio2.wav  -filter_complex "[1:v]
>> > fade=out:st=3:d=1:alpha=1 [ov]; [0:v][ov]
>> > overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2 [v]" -map "[v]"
>> >  -filter:a "[2:a] afade=t=in:ss=0:d=5, afade=t=out:st=25:d=5" -map 2:a
>> >  -strict -2 -t 30
>> >
>> /home/timelapse/clientes/ctech_live/camera1/timelapse/timelapse22-11-2019-21-44-57.mp4
>>
>> You can't use both "-filter_complex" and "-filter". You can integrate
>> the audio filter expression into the "-filter_complex" expression
>> though, by adding another filter chain after a ';'.
>>
>> Moritz
>>
>> [*] I did try to reproduce, but since I don't have your input, I'm not
>> seeing any issues.
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
>


More information about the ffmpeg-user mailing list