Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8015 closed defect (fixed)

hls muxer crash

Reported by: Jun Zhao Owned by: Steven Liu
Priority: normal Component: avformat
Version: git-master Keywords: hls crash
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Used the command as follow:

./ffmpeg -f lavfi -re -i testsrc=s=720x480:r=25:d=100 -vcodec libx264 -r 25 -preset medium -keyint_min 25 -g 25 -f hls -hls_flags +program_date_time -hls_segment_type fmp4 -hls_fmp4_init_filename now.mp4 -use_localtime 1 -hls_list_size 0 -hls_time 6 -hls_segment_filename %Y-%m-%d_%H-%M-%S.m4s now-data.m3u8

will crash with the message like:

[hls @ 0x559ea8797000] Opening '2019-07-13_15-27-41.m4s' for writinged=0.775x
[hls @ 0x559ea8797000] Opening 'now-data.m3u8.tmp' for writing
[hls @ 0x559ea8797000] Opening '2019-07-13_15-27-49.m4s' for writinged=0.871x
av_interleaved_write_frame(): Invalid argument
[hls @ 0x559ea8797000] Opening '2019-07-13_15-27-49.m4s' for writinged=0.877x
Segmentation fault (core dumped)

Change History (6)

comment:1 by Jun Zhao, 5 years ago

full log:

./ffmpeg -f lavfi -re -i testsrc=s=720x480:r=25:d=100 -vcodec libx264 -r 25 -preset medium -keyint_min 25 -g 25 -f hls -hls_flags +program_date_time -hls_segment_type fmp4 -hls_fmp4_init_filename now.mp4 -use_localtime 1 -hls_list_size 0 -hls_time 6 -hls_segment_filename %Y-%m-%d_%H-%M-%S.m4s now-data.m3u8
ffmpeg version N-94277-g7c2a25a4da Copyright (c) 2000-2019 the FFmpeg developers

built with gcc 8 (Ubuntu 8.3.0-6ubuntu1)
configuration: --enable-libxavs2 --enable-gpl --enable-libx264 --enable-libx265 --enable-openssl --enable-nonfree --extra-cflags='-I/home/barry/Sources/FFmpeg/ffmpeg_build/include -mavx2 -mfma -gdwarf-2 -g3' --samples=../fate-suite --enable-libdavs2 --enable-libxavs2 --enable-libzimg --enable-libmp3lame --enable-libass --enable-libfreetype --enable-frei0r --extra-libs='-lGLEW -lGLU -lGL -lEGL ' --enable-libfreetype --enable-libfontconfig --enable-libfribidi --enable-opengl --enable-libfdk-aac --enable-opencl --enable-random --extra-ldflags=-L/home/barry/Sources/FFmpeg/ffmpeg_build/lib --enable-liblensfun --enable-version3 --enable-libopus --enable-libsoxr --disable-optimizations
libavutil 56. 30.100 / 56. 30.100
libavcodec 58. 53.101 / 58. 53.101
libavformat 58. 28.102 / 58. 28.102
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 56.101 / 7. 56.101
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100

Input #0, lavfi, from 'testsrc=s=720x480:r=25:d=100':

Duration: N/A, start: 0.000000, bitrate: N/A

Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 720x480 [SAR 1:1 DAR 3:2], 25 tbr, 25 tbn, 25 tbc

Stream mapping:

Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))

Press [q] to stop, ? for help
[libx264 @ 0x55ee102b5380] using SAR=1/1
[libx264 @ 0x55ee102b5380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55ee102b5380] profile High 4:4:4 Predictive, level 3.0, 4:4:4 8-bit
[libx264 @ 0x55ee102b5380] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 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=25 keyint_min=13 scenecut=40 intra_refresh=0 rc_lookahead=25 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[hls @ 0x55ee102b2000] Opening 'now.mp4' for writing
Output #0, hls, to 'now-data.m3u8':

Metadata:

encoder : Lavf58.28.102
Stream #0:0: Video: h264 (libx264), yuv444p, 720x480 [SAR 1:1 DAR 3:2], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:

encoder : Lavc58.53.101 libx264

Side data:

cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1

[hls @ 0x55ee102b2000] Opening '2019-07-13_15-49-40.m4s' for writinged=0.774x
[hls @ 0x55ee102b2000] Opening 'now-data.m3u8.tmp' for writing
[hls @ 0x55ee102b2000] Opening '2019-07-13_15-49-48.m4s' for writinged=0.874x
av_interleaved_write_frame(): Invalid argument
[hls @ 0x55ee102b2000] Opening '2019-07-13_15-49-48.m4s' for writing
Segmentation fault (core dumped)

comment:2 by Steven Liu, 5 years ago

Keywords: hls added
Owner: set to Steven Liu
Status: newopen

comment:4 by Jun Zhao, 5 years ago

Thanks the quick respond, tested and verified, now it's ok with this patch.

comment:5 by Steven Liu, 5 years ago

Resolution: fixed
Status: openclosed

comment:6 by Carl Eugen Hoyos, 5 years ago

Keywords: crash added
Note: See TracTickets for help on using tickets.