[FFmpeg-user] ffmpeg doesn't properly terminate when using SRT -> HLS but works for SRT -> MP4

Tim Hartmann tim.hartmann at punch.zone
Mon Jun 17 01:06:45 EEST 2024


Hello,

I have been trying to encode video sent over SRT as ABR HLS. This works 
fine while the stream is running but once the sender stops sending 
(stopping normally or killing the process makes no difference) ffmpeg 
keeps encoding new segments containing just the last frame as fast as 
the CPU can handle.

Using OBS to send SRT i have configured this connection 
"srt://[server_ip]:1234?mode=caller&transtype=live".

When just receiving into a mp4 file ffmpeg exists normally:

root at Ubuntu-2204-jammy-amd64-base ~/testsrt # /root/ffmpeg -i 
"srt://0.0.0.0:1234?mode=listener" -c:v libx264 -preset fast -crf 23 
-c:a aac -b:a 128k -f mp4 srt.mp4
ffmpeg version N-70388-gaff24c1658-static 
https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2024 the FFmpeg 
developers
   built with gcc 8 (Debian 8.3.0-6)
   configuration: --enable-gpl --enable-version3 --enable-static 
--disable-debug --disable-ffplay --disable-indev=sndio 
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-gmp --enable-libgme --enable-gray 
--enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf 
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband 
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis 
--enable-libopus --enable-libtheora --enable-libvidstab 
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp 
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d 
--enable-libxvid --enable-libzvbi --enable-libzimg
   libavutil      59. 20.100 / 59. 20.100
   libavcodec     61.  5.104 / 61.  5.104
   libavformat    61.  3.104 / 61.  3.104
   libavdevice    61.  2.100 / 61.  2.100
   libavfilter    10.  2.102 / 10.  2.102
   libswscale      8.  2.100 /  8.  2.100
   libswresample   5.  2.100 /  5.  2.100
   libpostproc    58.  2.100 / 58.  2.100
Input #0, mpegts, from 'srt://0.0.0.0:1234?mode=listener':
   Duration: N/A, start: 0.000000, bitrate: N/A
   Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
   Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] 
/ 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 
16:9], 60 fps, 60 tbr, 90k tbn
   Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 
Hz, stereo, fltp, 160 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7646040] using SAR=1/1
[libx264 @ 0x7646040] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x7646040] profile High, level 4.2, 4:2:0, 8-bit
[libx264 @ 0x7646040] 264 - core 164 r3191 4613ac3 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2024 - http://www.videolan.org/x264.html - 
options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 
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=24 lookahead_threads=4 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=1 keyint=250 
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 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 'srt.mp4':
   Metadata:
     encoder         : Lavf61.3.104
   Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, 
progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 15360 tbn
       Metadata:
         encoder         : Lavc61.5.104 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), 48000 Hz, stereo, 
fltp, 128 kb/s
       Metadata:
         encoder         : Lavc61.5.104 aac
[in#0/mpegts @ 0x7615b80] Error during demuxing: Input/output 
errore=9070.2kbits/s speed=1.16x
[out#0/mp4 @ 0x76452c0] video:31687KiB audio:451KiB subtitle:0KiB other 
streams:0KiB global headers:0KiB muxing overhead: 0.103616%
frame= 1731 fps= 72 q=-1.0 Lsize=   32172KiB time=00:00:28.81 
bitrate=9145.8kbits/s speed= 1.2x
[libx264 @ 0x7646040] frame I:9     Avg QP:21.65  size:150868
[libx264 @ 0x7646040] frame P:1699  Avg QP:26.29  size: 18279
[libx264 @ 0x7646040] frame B:23    Avg QP:26.67  size:  1449
[libx264 @ 0x7646040] consecutive B-frames: 97.7%  1.2%  0.9% 0.2%
[libx264 @ 0x7646040] mb I  I16..4: 65.5% 10.7% 23.8%
[libx264 @ 0x7646040] mb P  I16..4:  4.5%  0.9%  1.0%  P16..4: 32.1%  
1.0%  0.7%  0.0%  0.0%    skip:59.8%
[libx264 @ 0x7646040] mb B  I16..4:  0.9%  1.5%  0.0%  B16..8: 2.8%  
0.2%  0.0%  direct: 0.8%  skip:93.8%  L0:26.9% L1:72.7% BI: 0.4%
[libx264 @ 0x7646040] 8x8 transform intra:14.4% inter:18.4%
[libx264 @ 0x7646040] coded y,uvDC,uvAC intra: 35.2% 56.7% 18.8% inter: 
10.2% 7.0% 0.5%
[libx264 @ 0x7646040] i16 v,h,dc,p: 20% 43% 22% 15%
[libx264 @ 0x7646040] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 28% 38% 4%  1%  
1%  2%  2%  4%
[libx264 @ 0x7646040] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 55% 13% 1%  1%  
1%  1%  1%  1%
[libx264 @ 0x7646040] i8c dc,h,v,p: 43% 35% 16%  5%
[libx264 @ 0x7646040] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7646040] ref P L0: 89.9% 10.1%
[libx264 @ 0x7646040] ref B L0: 77.2% 22.8%
[libx264 @ 0x7646040] ref B L1: 96.0%  4.0%
[libx264 @ 0x7646040] kb/s:8997.42
[aac @ 0x7770440] Qavg: 1087.464



When using ABR HLS ffmpeg does not stop automatically and has to be 
stopped manually (ctrl-C):
root at Ubuntu-2204-jammy-amd64-base ~/testsrt # /root/ffmpeg \
     -i "srt://0.0.0.0:1234?mode=listener" \
     -map 0:v:0 \
     -map 0:a:0 \
     -map 0:v:0 \
     -map 0:a:0 \
     -map 0:v:0 \
     -map 0:a:0 \
     -map 0:v:0 \
     -map 0:a:0 \
     -c:v libx264 \
     -crf 22 \
     -c:a aac \
     -ar 44100 \
     -filter:v:0 "color=c=red:s=50x50 [square1]; [0:v][square1] 
overlay=x=W-w-10:y=10, scale=w=640:h=360" \
     -maxrate:v:0 400k \
     -b:v:0 365k \
     -bufsize:v:0 600k \
     -filter:v:1 "color=c=yellow:s=50x50 [square2]; [0:v][square2] 
overlay=x=W-w-10:y=10, scale=w=960:h=540" \
     -maxrate:v:1 2200k \
     -b:v:1 2000k \
     -bufsize:v:1 3500k \
     -filter:v:2 "color=c=green:s=50x50 [square3]; [0:v][square3] 
overlay=x=W-w-10:y=10, scale=w=1280:h=720" \
     -maxrate:v:2 3300k \
     -b:v:2 3000k \
     -bufsize:v:2 4400k \
     -filter:v:3 "color=c=blue:s=50x50 [square4]; [0:v][square4] 
overlay=x=W-w-10:y=10, scale=w=1920:h=1080" \
     -maxrate:v:3 6600k \
     -b:v:3 6000k \
     -bufsize:v:3 8000k \
     -var_stream_map "v:2,a:2,name:720p v:0,a:0,name:360p 
v:1,a:1,name:540p v:3,a:3,name:1080p" \
     -preset medium \
     -hls_list_size 0 \
     -threads 0 \
     -f hls \
     -hls_time 6 \
     -g 60 \
     -sc_threshold 0 \
     -hls_flags independent_segments \
     -hls_playlist_type event \
     -hls_flags append_list \
     -master_pl_name livestream.m3u8 \
     -y "livestream-%v.m3u8"
ffmpeg version N-70388-gaff24c1658-static 
https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2024 the FFmpeg 
developers
   built with gcc 8 (Debian 8.3.0-6)
   configuration: --enable-gpl --enable-version3 --enable-static 
--disable-debug --disable-ffplay --disable-indev=sndio 
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-gmp --enable-libgme --enable-gray 
--enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf 
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband 
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis 
--enable-libopus --enable-libtheora --enable-libvidstab 
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp 
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d 
--enable-libxvid --enable-libzvbi --enable-libzimg
   libavutil      59. 20.100 / 59. 20.100
   libavcodec     61.  5.104 / 61.  5.104
   libavformat    61.  3.104 / 61.  3.104
   libavdevice    61.  2.100 / 61.  2.100
   libavfilter    10.  2.102 / 10.  2.102
   libswscale      8.  2.100 /  8.  2.100
   libswresample   5.  2.100 /  5.  2.100
   libpostproc    58.  2.100 / 58.  2.100
Input #0, mpegts, from 'srt://0.0.0.0:1234?mode=listener':
   Duration: N/A, start: 0.000000, bitrate: N/A
   Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
   Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] 
/ 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 
16:9], 60 fps, 60 tbr, 90k tbn
   Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 
Hz, stereo, fltp, 160 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
   Stream #0:0 -> #0:2 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:3 (aac (native) -> aac (native))
   Stream #0:0 -> #0:4 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:5 (aac (native) -> aac (native))
   Stream #0:0 -> #0:6 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:7 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x8b0f7c0] using SAR=1/1
[libx264 @ 0x8b0f7c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x8b0f7c0] profile High, level 4.2, 4:2:0, 8-bit
[libx264 @ 0x8b0f7c0] 264 - core 164 r3191 4613ac3 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2024 - 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=24 lookahead_threads=4 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=60 
keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 
crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=6600 
vbv_bufsize=8000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x8b09980] using SAR=1/1
[libx264 @ 0x8b09980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x8b03280] using SAR=1/1
[libx264 @ 0x8b03280] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x881fcc0] using SAR=1/1
[libx264 @ 0x881fcc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0x8b09980] profile High, level 3.2, 4:2:0, 8-bit
[libx264 @ 0x8b09980] 264 - core 164 r3191 4613ac3 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2024 - 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=22 lookahead_threads=3 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=60 
keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 
crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=3300 
vbv_bufsize=4400 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x881fcc0] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x8b03280] profile High, level 3.2, 4:2:0, 8-bit
[libx264 @ 0x881fcc0] 264 - core 164 r3191 4613ac3 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2024 - 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=11 lookahead_threads=1 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=60 
keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 
crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=400 
vbv_bufsize=600 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x8b03280] 264 - core 164 r3191 4613ac3 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2024 - 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=17 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=60 
keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 
crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2200 
vbv_bufsize=3500 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, hls, to 'livestream-%v.m3u8':
   Metadata:
     encoder         : Lavf61.3.104
   Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 640x360 
[SAR 1:1 DAR 16:9], q=2-31, 365 kb/s, 60 fps, 90k tbn (default)
       Metadata:
         encoder         : Lavc61.5.104 libx264
       Side data:
         cpb: bitrate max/min/avg: 400000/0/365000 buffer size: 600000 
vbv_delay: N/A
   Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s (default)
       Metadata:
         encoder         : Lavc61.5.104 aac
   Stream #0:2: Video: h264, yuv420p(tv, bt709, progressive), 960x540 
[SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 60 fps, 90k tbn
       Metadata:
         encoder         : Lavc61.5.104 libx264
       Side data:
         cpb: bitrate max/min/avg: 2200000/0/2000000 buffer size: 
3500000 vbv_delay: N/A
   Stream #0:3: Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s
       Metadata:
         encoder         : Lavc61.5.104 aac
   Stream #0:4: Video: h264, yuv420p(tv, bt709, progressive), 1280x720 
[SAR 1:1 DAR 16:9], q=2-31, 3000 kb/s, 60 fps, 90k tbn
       Metadata:
         encoder         : Lavc61.5.104 libx264
       Side data:
         cpb: bitrate max/min/avg: 3300000/0/3000000 buffer size: 
4400000 vbv_delay: N/A
   Stream #0:5: Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s
       Metadata:
         encoder         : Lavc61.5.104 aac
   Stream #0:6: Video: h264, yuv420p(tv, bt709, progressive), 1920x1080 
[SAR 1:1 DAR 16:9], q=2-31, 6000 kb/s, 60 fps, 90k tbn
       Metadata:
         encoder         : Lavc61.5.104 libx264
       Side data:
         cpb: bitrate max/min/avg: 6600000/0/6000000 buffer size: 
8000000 vbv_delay: N/A
   Stream #0:7: Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s
       Metadata:
         encoder         : Lavc61.5.104 aac
[hls @ 0x881b980] Opening 'livestream-360p0.ts' for 
writingme=00:00:05.41 bitrate=N/A speed=1.55x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p0.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p0.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p0.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream.m3u8' for writing
[hls @ 0x881b980] Opening 'livestream-360p1.ts' for 
writingme=00:00:11.63 bitrate=N/A speed=1.45x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p1.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p1.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p1.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p2.ts' for 
writingme=00:00:17.63 bitrate=N/A speed=1.26x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p2.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p2.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p2.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[in#0/mpegts @ 0x87f1080] Error during demuxing: Input/output 
error:19.11 bitrate=N/A speed=1.23x
[hls @ 0x881b980] Opening 'livestream-360p3.ts' for 
writingme=00:00:33.70 bitrate=N/A dup=497 drop=0 speed=1.73x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p3.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p3.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p3.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p4.ts' for 
writingme=00:00:39.55 bitrate=N/A dup=701 drop=0 speed=1.88x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p4.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p4.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p4.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p5.ts' for 
writingme=00:00:45.41 bitrate=N/A dup=907 drop=0 speed=2.02x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p5.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p5.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p5.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[vf#0:6 @ 0x8b28b80] More than 1000 frames duplicatedN/A 
time=00:00:47.40 bitrate=N/A dup=975 drop=0 speed=2.06x
[vf#0:4 @ 0x8b1a980] More than 1000 frames duplicated
[vf#0:2 @ 0x8b04180] More than 1000 frames duplicated
[vf#0:0 @ 0x8821700] More than 1000 frames duplicated
[hls @ 0x881b980] Opening 'livestream-360p6.ts' for 
writingme=00:00:51.26 bitrate=N/A dup=1110 drop=0 speed=2.14x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p6.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p6.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p6.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p7.ts' for 
writingme=00:00:57.06 bitrate=N/A dup=1314 drop=0 speed=2.24x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p7.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p7.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p7.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p8.ts' for 
writingme=00:01:02.88 bitrate=N/A dup=1517 drop=0 speed=2.33x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p8.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p8.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p8.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p9.ts' for 
writingme=00:01:08.90 bitrate=N/A dup=1729 drop=0 speed=2.42x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p9.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p9.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p9.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p10.ts' for 
writinge=00:01:14.83 bitrate=N/A dup=1936 drop=0 speed=2.49x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p10.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p10.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p10.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p11.ts' for 
writinge=00:01:20.66 bitrate=N/A dup=2140 drop=0 speed=2.56x
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p11.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p11.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p11.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p12.ts' for writing
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p12.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p12.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p12.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p13.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-720p13.ts' for writing
[hls @ 0x881b980] Opening 'livestream-720p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-360p13.ts' for writing
[hls @ 0x881b980] Opening 'livestream-360p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-540p13.ts' for writing
[hls @ 0x881b980] Opening 'livestream-540p.m3u8.tmp' for writing
[hls @ 0x881b980] Opening 'livestream-1080p14.ts' for writing
[hls @ 0x881b980] Opening 'livestream-1080p.m3u8.tmp' for writing
[out#0/hls @ 0x8988740] video:77068KiB audio:1288KiB subtitle:0KiB other 
streams:0KiB global headers:0KiB muxing overhead: unknown
frame= 5025 fps=156 q=-1.0 Lq=-1.0 q=-1.0 q=-1.0 size=N/A 
time=00:00:20.56 bitrate=N/A dup=2211 drop=0 speed=0.638x
[libx264 @ 0x881fcc0] frame I:84    Avg QP:24.04  size: 39007
[libx264 @ 0x881fcc0] frame P:1489  Avg QP:29.17  size:   489
[libx264 @ 0x881fcc0] frame B:3452  Avg QP:35.60  size:    58
[libx264 @ 0x881fcc0] consecutive B-frames:  7.5%  1.3%  4.3% 86.9%
[libx264 @ 0x881fcc0] mb I  I16..4:  4.1% 45.9% 50.1%
[libx264 @ 0x881fcc0] mb P  I16..4:  0.4%  0.9%  0.1%  P16..4: 10.8%  
1.9%  1.1%  0.0%  0.0%    skip:84.9%
[libx264 @ 0x881fcc0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 4.0%  
0.1%  0.0%  direct: 0.0%  skip:95.9%  L0:29.5% L1:69.9% BI: 0.6%
[libx264 @ 0x881fcc0] 8x8 transform intra:50.1% inter:79.2%
[libx264 @ 0x881fcc0] coded y,uvDC,uvAC intra: 75.8% 82.1% 63.6% inter: 
0.9% 1.0% 0.1%
[libx264 @ 0x881fcc0] i16 v,h,dc,p: 21% 27% 15% 37%
[libx264 @ 0x881fcc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 18% 17% 7%  7%  
7%  9%  8% 10%
[libx264 @ 0x881fcc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 18% 11% 7%  8%  
8%  9%  9%  9%
[libx264 @ 0x881fcc0] i8c dc,h,v,p: 53% 20% 17% 10%
[libx264 @ 0x881fcc0] Weighted P-Frames: Y:2.2% UV:1.9%
[libx264 @ 0x881fcc0] ref P L0: 72.1% 14.8% 10.1%  2.9%  0.2%
[libx264 @ 0x881fcc0] ref B L0: 95.1%  3.9%  1.1%
[libx264 @ 0x881fcc0] ref B L1: 97.6%  2.4%
[libx264 @ 0x881fcc0] kb/s:401.55
[aac @ 0x8f56380] Qavg: 3013.584
[libx264 @ 0x8b03280] frame I:84    Avg QP:20.24  size: 88798
[libx264 @ 0x8b03280] frame P:2066  Avg QP:26.27  size:  2398
[libx264 @ 0x8b03280] frame B:2882  Avg QP:31.42  size:    70
[libx264 @ 0x8b03280] consecutive B-frames: 22.7%  1.4%  4.1% 71.9%
[libx264 @ 0x8b03280] mb I  I16..4:  4.7% 51.2% 44.1%
[libx264 @ 0x8b03280] mb P  I16..4:  0.6%  1.5%  0.1%  P16..4: 12.3%  
5.3%  4.1%  0.0%  0.0%    skip:76.2%
[libx264 @ 0x8b03280] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8: 0.7%  
0.1%  0.0%  direct: 0.0%  skip:99.1%  L0:40.7% L1:53.9% BI: 5.4%
[libx264 @ 0x8b03280] 8x8 transform intra:57.4% inter:65.5%
[libx264 @ 0x8b03280] coded y,uvDC,uvAC intra: 74.3% 80.9% 56.9% inter: 
2.6% 2.3% 0.2%
[libx264 @ 0x8b03280] i16 v,h,dc,p: 22% 29% 20% 29%
[libx264 @ 0x8b03280] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 20% 25% 5%  5%  
6%  6%  6%  8%
[libx264 @ 0x8b03280] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 20% 10% 7%  8%  
8%  8%  8%  8%
[libx264 @ 0x8b03280] i8c dc,h,v,p: 53% 20% 19%  8%
[libx264 @ 0x8b03280] Weighted P-Frames: Y:0.8% UV:0.8%
[libx264 @ 0x8b03280] ref P L0: 79.5% 14.4%  3.9%  2.2%  0.0%
[libx264 @ 0x8b03280] ref B L0: 92.9%  5.7%  1.4%
[libx264 @ 0x8b03280] ref B L1: 98.1%  1.9%
[libx264 @ 0x8b03280] kb/s:1203.29
[aac @ 0x8b08700] Qavg: 3013.584
[libx264 @ 0x8b09980] frame I:84    Avg QP:19.53  size:144426
[libx264 @ 0x8b09980] frame P:1561  Avg QP:24.81  size:  4009
[libx264 @ 0x8b09980] frame B:3385  Avg QP:31.74  size:   363
[libx264 @ 0x8b09980] consecutive B-frames:  9.5%  0.8%  4.6% 85.1%
[libx264 @ 0x8b09980] mb I  I16..4:  3.9% 51.3% 44.8%
[libx264 @ 0x8b09980] mb P  I16..4:  0.6%  2.0%  0.1%  P16..4: 12.0%  
4.1%  2.4%  0.0%  0.0%    skip:78.8%
[libx264 @ 0x8b09980] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8: 4.8%  
0.2%  0.0%  direct: 0.1%  skip:94.7%  L0:34.2% L1:63.7% BI: 2.1%
[libx264 @ 0x8b09980] 8x8 transform intra:58.9% inter:71.6%
[libx264 @ 0x8b09980] coded y,uvDC,uvAC intra: 72.0% 78.1% 55.7% inter: 
2.1% 1.9% 0.1%
[libx264 @ 0x8b09980] i16 v,h,dc,p: 21% 27% 11% 40%
[libx264 @ 0x8b09980] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 19% 17% 6%  7%  
7%  8%  8%  9%
[libx264 @ 0x8b09980] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 21% 10% 6%  7%  
8%  7%  8%  7%
[libx264 @ 0x8b09980] i8c dc,h,v,p: 50% 21% 20%  9%
[libx264 @ 0x8b09980] Weighted P-Frames: Y:0.8% UV:0.8%
[libx264 @ 0x8b09980] ref P L0: 74.1% 16.2%  7.4%  2.2%  0.1%
[libx264 @ 0x8b09980] ref B L0: 93.2%  5.6%  1.2%
[libx264 @ 0x8b09980] ref B L1: 98.4%  1.6%
[libx264 @ 0x8b09980] kb/s:1872.19
[aac @ 0x8b0dd40] Qavg: 3013.584
[libx264 @ 0x8b0f7c0] frame I:85    Avg QP:18.90  size:315878
[libx264 @ 0x8b0f7c0] frame P:2130  Avg QP:25.04  size:  7200
[libx264 @ 0x8b0f7c0] frame B:2829  Avg QP:31.23  size:   103
[libx264 @ 0x8b0f7c0] consecutive B-frames: 24.3%  1.4%  3.9% 70.4%
[libx264 @ 0x8b0f7c0] mb I  I16..4: 16.5% 33.5% 50.0%
[libx264 @ 0x8b0f7c0] mb P  I16..4:  3.5%  1.1%  0.2%  P16..4: 14.6%  
1.0%  1.0%  0.0%  0.0%    skip:78.7%
[libx264 @ 0x8b0f7c0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 0.4%  
0.0%  0.0%  direct: 0.0%  skip:99.5%  L0:25.7% L1:74.3% BI: 0.1%
[libx264 @ 0x8b0f7c0] 8x8 transform intra:27.8% inter:50.3%
[libx264 @ 0x8b0f7c0] coded y,uvDC,uvAC intra: 45.5% 61.8% 33.4% inter: 
1.7% 1.6% 0.0%
[libx264 @ 0x8b0f7c0] i16 v,h,dc,p: 26% 25% 29% 20%
[libx264 @ 0x8b0f7c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 20% 28% 6%  4%  
4%  4%  5%  6%
[libx264 @ 0x8b0f7c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 24% 12% 5%  5%  
6%  6%  6%  6%
[libx264 @ 0x8b0f7c0] i8c dc,h,v,p: 51% 22% 20%  7%
[libx264 @ 0x8b0f7c0] Weighted P-Frames: Y:0.1% UV:0.1%
[libx264 @ 0x8b0f7c0] ref P L0: 84.8%  7.8%  5.4%  2.0%  0.0%
[libx264 @ 0x8b0f7c0] ref B L0: 46.7% 49.9%  3.4%
[libx264 @ 0x8b0f7c0] ref B L1: 87.5% 12.5%
[libx264 @ 0x8b0f7c0] kb/s:4042.27
[aac @ 0x8b29d40] Qavg: 3013.584
Exiting normally, received signal 2.


Is there an error in my command which causes the endless duplication of 
the last frame?

Thank you



More information about the ffmpeg-user mailing list