Hello all,

I just created a special effect which shows several optical sound tracks, like in cine film. The output video is perfectly ok and has the correct length 20s. But FFmpeg doesn't stop after it has written the output file. I have to terminate it with ctrl-c, and I don't understand why.

The problem can be reproduced with some audio input files, but not with all.
This input file can be used for reproducing:

ffmpeg -f lavfi -i "sine=1k:b=2,channelmap=0|0" -t 20 -y sine.mp3

This is the command line for the special effect:

ffmpeg -i sine.mp3 -lavfi "asplit=4[a0][a1][a2][a3];[a0]asplit[b0][c0];[a1]adelay=0.05:all=1,volume='gt(t,5)':eval=frame,asplit[b1][c1];[a2]adelay=0.1:all=1,volume='gt(t,10)':eval=frame,asplit[b2][c2];[a3]adelay=0.15:all=1,volume='gt(t,15)':eval=frame,asplit[b3][c3];[b0]showwaves=mode=cline:split_channels=true:s=1080x480:colors=white[v0];[b1]showwaves=mode=cline:split_channels=true:s=1080x480:colors=white[v1];[b2]showwaves=mode=cline:split_channels=true:s=1080x480:colors=white[v2];[b3]showwaves=mode=cline:split_channels=true:s=1080x480:colors=white[v3];[v0][v1][v2][v3]vstack=4,transpose;[c0][c1][c2][c3]amix=4" -y out.mp4

The console outputs are below.

Michael



C:\Users\astro\Desktop>ffmpeg -f lavfi -i "sine=1k:b=2,channelmap=0|0" -t 20 -y sine.mp3 ffmpeg version 2021-03-09-git-c35e456f54-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      56. 67.100 / 56. 67.100
  libavcodec     58.129.100 / 58.129.100
  libavformat    58. 71.100 / 58. 71.100
  libavdevice    58. 12.100 / 58. 12.100
  libavfilter     7.109.100 /  7.109.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, lavfi, from 'sine=1k:b=2,channelmap=0|0':
  Duration: N/A, start: 0.000000, bitrate: 1411 kb/s
  Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'sine.mp3':
  Metadata:
    TSSE            : Lavf58.71.100
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p
    Metadata:
      encoder         : Lavc58.129.100 libmp3lame
size=     313kB time=00:00:19.98 bitrate= 128.4kbits/s speed= 120x
video:0kB audio:313kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.078921%

C:\Users\astro\Desktop>ffmpeg -i sine.mp3 -lavfi "asplit=4[a0][a1][a2][a3];[a0]asplit[b0][c0];[a1]adelay=0.05:all=1,volume='gt(t,5)':eval=frame,asplit[b1][c1];[a2]adelay=0.1:all=1,volume='gt(t,10)':eval=frame,asplit[b2][c2];[a3]adelay=0.15:all=1,volume='gt(t,15)':eval=frame,asplit[b3][c3];[b0]showwaves=mode=cline:split_channels=true:s=1080x480:colors=white[v0];[b1]showwaves=mode=cline:split_channels=true:s=1080x480:colors=white[v1];[b2]showwaves=mode=cline:split_channels=true:s=1080x480:colors=white[v2];[b3]showwaves=mode=cline:split_channels=true:s=1080x480:colors=white[v3];[v0][v1][v2][v3]vstack=4,transpose;[c0][c1][c2][c3]amix=4" -y out.mp4 ffmpeg version 2021-03-09-git-c35e456f54-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      56. 67.100 / 56. 67.100
  libavcodec     58.129.100 / 58.129.100
  libavformat    58. 71.100 / 58. 71.100
  libavdevice    58. 12.100 / 58. 12.100
  libavfilter     7.109.100 /  7.109.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, mp3, from 'sine.mp3':
  Metadata:
    encoder         : Lavf58.71.100
  Duration: 00:00:20.04, start: 0.025057, bitrate: 128 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.12
Stream mapping:
  Stream #0:0 (mp3float) -> asplit
  transpose -> Stream #0:0 (libx264)
  amix -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[libx264 @ 00000247f8921ac0] using SAR=1/1
[libx264 @ 00000247f8921ac0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 00000247f8921ac0] profile High 4:4:4 Predictive, level 4.0, 4:4:4, 8-bit [libx264 @ 00000247f8921ac0] 264 - core 161 r3048 b86ae3c - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - 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=4 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 'out.mp4':
  Metadata:
    encoder         : Lavf58.71.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv444p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 20.42 fps, 15680 tbn
    Metadata:
      encoder         : Lavc58.129.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.129.100 aac
frame=  408 fps= 34 q=-1.0 Lsize=   10242kB time=00:00:19.96 bitrate=4201.6kbits/s speed=1.66x video:10100kB audio:128kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.134918%
[libx264 @ 00000247f8921ac0] frame I:2     Avg QP:20.14  size: 59526
[libx264 @ 00000247f8921ac0] frame P:115   Avg QP:26.20  size: 39985
[libx264 @ 00000247f8921ac0] frame B:291   Avg QP:33.51  size: 19329
[libx264 @ 00000247f8921ac0] consecutive B-frames:  2.2%  7.8%  0.7% 89.2%
[libx264 @ 00000247f8921ac0] mb I  I16..4: 16.2% 72.5% 11.3%
[libx264 @ 00000247f8921ac0] mb P  I16..4:  0.0%  0.2%  0.3% P16..4:  6.0%  4.1%  3.4%  0.0%  0.0%    skip:86.0% [libx264 @ 00000247f8921ac0] mb B  I16..4:  0.0%  0.0%  1.1% B16..8:  5.5%  1.7%  2.1%  direct: 2.7%  skip:86.9%  L0:42.1% L1:42.0% BI:15.9%
[libx264 @ 00000247f8921ac0] 8x8 transform intra:29.6% inter:16.4%
[libx264 @ 00000247f8921ac0] coded y,u,v intra: 56.3% 0.0% 0.0% inter: 6.8% 0.0% 0.0%
[libx264 @ 00000247f8921ac0] i16 v,h,dc,p: 98%  0%  1%  0%
[libx264 @ 00000247f8921ac0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 80%  1% 19%  0%  0%  0%  0%  0%  0% [libx264 @ 00000247f8921ac0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 72% 8%  1%  1%  1%  4%  1%  5%
[libx264 @ 00000247f8921ac0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 00000247f8921ac0] ref P L0: 65.7%  8.8%  8.2% 17.2%
[libx264 @ 00000247f8921ac0] ref B L0: 94.1%  5.4%  0.4%
[libx264 @ 00000247f8921ac0] ref B L1: 97.3%  2.7%
[libx264 @ 00000247f8921ac0] kb/s:4140.21
[aac @ 00000247f8924e80] Qavg: 60535.746
Exiting normally, received signal 2.
Batchvorgang abbrechen (J/N)?


_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to