Opened 7 weeks ago
Last modified 7 weeks ago
#9010 new defect
ffmpeg built with schannel freezes when outputting HLS with http_persistent
Reported by: | r1ch | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | git-master | Keywords: | hls schannel regression |
Cc: | RytoEX@gmail.com, dillon@vodbox.io, matt@wizardcm.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
When outputting HLS to a HTTPS URL using http_persistent, if ffmpeg is built with the schannel TLS backend (Windows), it will freeze as it writes the first segment. Switching the TLS backend to gnutls allows this to work as expected.
How to reproduce (Windows only):
Build ffmpeg with --enable-schannel. Stream some input file to Youtube with the HLS ingest endpoint (or any HLS server of your choice). You must use -http_persistent 1 to reproduce the issue.
% ffmpeg -i "bbb_sunflower_1080p_60fps_normal.mp4" -acodec aac -vcodec libx264 -vb 2.5M -f hls -hls_time 4 -http_persistent 1 "https://a.upload.youtube.com/http_upload_hls?cid=VALID_YOUTUBE_STREAM_KEY©=0&file=01.ts" ffmpeg version N-100057-g76a99b2da0-ffmpeg-windows-build-helpers Copyright (c) 2000-2020 the FFmpeg developers built with gcc 10.1.0 (GCC) configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/r1ch/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-schannel --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-liblensfun --enable-libvmaf --enable-libsrt --enable-libaribb24 --enable-demuxer=dash --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-libaom --enable-libvpx --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-frei0r --enable-filter=frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-libdavs2 --enable-libxavs2 --enable-libxavs --enable-avresample --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-shared --disable-static --prefix=/home/r1ch/ffmpeg-windows-build-helpers/sandbox/win64/ffmpeg_git_shared libavutil 56. 61.100 / 56. 61.100 libavcodec 58.113.100 / 58.113.100 libavformat 58. 64.100 / 58. 64.100 libavdevice 58. 11.103 / 58. 11.103 libavfilter 7. 90.100 / 7. 90.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb_sunflower_1080p_60fps_normal.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 creation_time : 2013-12-16T17:59:32.000000Z title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation composer : Sacha Goedegebure Duration: 00:10:34.53, start: 0.000000, bitrate: 4486 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4001 kb/s, 60 fps, 60 tbr, 60k tbn, 120 tbc (default) Metadata: creation_time : 2013-12-16T17:59:32.000000Z handler_name : GPAC ISO Video Handler Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default) Metadata: creation_time : 2013-12-16T17:59:37.000000Z handler_name : GPAC ISO Audio Handler Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default) Metadata: creation_time : 2013-12-16T17:59:37.000000Z handler_name : GPAC ISO Audio Handler Side data: audio service type: main Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:2 -> #0:1 (ac3 (native) -> aac (native)) Press [q] to stop, [?] for help [libx264 @ 000001c1ed118680] using SAR=1/1 [libx264 @ 000001c1ed118680] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 000001c1ed118680] profile High, level 4.2, 4:2:0, 8-bit [libx264 @ 000001c1ed118680] 264 - core 161 r3020M d198931 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=34 lookahead_threads=5 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=abr mbtree=1 bitrate=2500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 [aac @ 000001c1edec98c0] Using a PCE to encode channel layout "5.1(side)" [hls muxer @ 000001c1ed116000] No HTTP method set, hls muxer defaulting to method PUT. Output #0, hls, to 'https://a.upload.youtube.com/http_upload_hls?cid=xxxx©=0&file=01.ts': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 composer : Sacha Goedegebure title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation encoder : Lavf58.64.100 Stream #0:0(und): Video: h264 (libx264), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 2500 kb/s, 60 fps, 90k tbn, 60 tbc (default) Metadata: creation_time : 2013-12-16T17:59:32.000000Z handler_name : GPAC ISO Video Handler encoder : Lavc58.113.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/2500000 buffer size: 0 vbv_delay: N/A Stream #0:1(und): Audio: aac (LC), 48000 Hz, 5.1(side), fltp, 394 kb/s (default) Metadata: creation_time : 2013-12-16T17:59:37.000000Z handler_name : GPAC ISO Audio Handler encoder : Lavc58.113.100 aac Side data: audio service type: main [hls @ 000001c1ed985800] Opening 'https://a.upload.youtube.com/http_upload_hls?cid=xxxx©=0&file=010.ts' for writing (ffmpeg becomes frozen at this point)
Change History (5)
comment:1 Changed 7 weeks ago by OBSJim
comment:2 Changed 7 weeks ago by RytoEX
- Cc RytoEX@gmail.com added
comment:3 Changed 7 weeks ago by VodBox
- Cc dillon@vodbox.io added
comment:4 Changed 7 weeks ago by WizardCM
- Cc matt@wizardcm.com added
comment:5 Changed 7 weeks ago by cehoyos
- Keywords regression added; http_persistent removed
- Priority changed from normal to important
Note: See
TracTickets for help on using
tickets.
I've bisected the bug to commit f267a2ac9c740c77cee2f2c5fd2bd9bc048768b1 in the FFmpeg repository, related to #7975.