Opened 12 years ago
Last modified 3 years ago
#2485 reopened defect
Can't use "-chunked_post 0" with HTTP HLS POST
Reported by: | Jeremy GARROUSTE | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | hls |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
can't disable the chunked transfert encoding POST with HLS HTTP output using the "-chunked_post 0" option. Tested with FFmpeg 1.0.6 and 2013-04-10 static build from http://ffmpeg.gusari.org/static/32bit/
How to reproduce:
% ffmpeg -v 99 -f lavfi -i 'testsrc [out0] ; aevalsrc=sin(440*2*PI*t)[out1]' -pix_fmt yuv420p -map 0 -f segment -segment_format mpegts -segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 -codec:a libfaac -codec:v libx264 -flags -global_header -b:v 700k -r:a 44k -b:a 96k -chunked_post 0 http://localhost/%d.ts ffmpeg version 1.0.6 Copyright (c) 2000-2013 the FFmpeg developers built on Mar 25 2013 16:52:47 with gcc 4.7 (Debian 4.7.2-5) configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/i386-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libdc1394 --enable-libfdk-aac --disable-altivec --disab libavutil 51. 73.101 / 51. 73.101 libavcodec 54. 59.100 / 54. 59.100 libavformat 54. 29.104 / 54. 29.104 libavdevice 54. 2.101 / 54. 2.101 libavfilter 3. 17.100 / 3. 17.100 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 [Parsed_testsrc_0 @ 0x9d57fc0] size:320x240 rate:25/1 duration:-1.000000 sar:1/1 [out1 @ 0x9d62660] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_aevalsrc_1' and the filter 'out1' [Parsed_aevalsrc_1 @ 0x9d57920] sample_rate:44100 chlayout:mono duration:-1.000000 [auto-inserted resampler 0 @ 0x9d5dd40] [SWR @ 0x9d5e4c0] Using double precision mode [auto-inserted resampler 0 @ 0x9d5dd40] chl:mono fmt:dblp r:44100Hz -> chl:mono fmt:dbl r:44100Hz [lavfi @ 0x9d61a20] All info found [lavfi @ 0x9d61a20] Estimating duration from bitrate, this may be inaccurate Input #0, lavfi, from 'testsrc [out0] ; aevalsrc=sin(440*2*PI*t)[out1]': Duration: N/A, start: 0.000000, bitrate: 2822 kb/s Stream #0:0, 1, 1/25: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 1/25, 25 tbr, 25 tbn, 25 tbc Stream #0:1, 1, 1/44100: Audio: pcm_f64le, 44100 Hz, mono, dbl, 2822 kb/s [buffer @ 0x9d47b40] Setting entry with key 'video_size' to value '320x240' [buffer @ 0x9d47b40] Setting entry with key 'pix_fmt' to value '2' [buffer @ 0x9d47b40] Setting entry with key 'time_base' to value '1/25' [buffer @ 0x9d47b40] Setting entry with key 'pixel_aspect' to value '1/1' [buffer @ 0x9d47b40] Setting entry with key 'sws_param' to value 'flags=2' [buffer @ 0x9d47b40] Setting entry with key 'frame_rate' to value '25/1' [graph 0 input from stream 0:0 @ 0x9d62200] w:320 h:240 pixfmt:rgb24 tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2 [format @ 0x9d6cde0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format' [auto-inserted scaler 0 @ 0x9d6d100] w:320 h:240 fmt:rgb24 sar:1/1 -> w:320 h:240 fmt:yuv420p sar:1/1 flags:0x4 [abuffer @ 0x9d86ec0] Setting entry with key 'time_base' to value '1/44100' [abuffer @ 0x9d86ec0] Setting entry with key 'sample_rate' to value '44100' [abuffer @ 0x9d86ec0] Setting entry with key 'sample_fmt' to value 'dbl' [abuffer @ 0x9d86ec0] Setting entry with key 'channel_layout' to value '0x4' [graph 1 input from stream 0:1 @ 0x9d95980] tb:1/44100 samplefmt:dbl samplerate:44100 chlayout:0x4 [aformat @ 0x9d942e0] Setting entry with key 'sample_fmts' to value 's16' [aformat @ 0x9d942e0] Setting entry with key 'channel_layouts' to value '0x4,0x3,0x7,0x107,0x37,0x3f' [audio format for output stream 0:1 @ 0x9d94220] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1' [auto-inserted resampler 0 @ 0x9d99560] [SWR @ 0x9d997c0] Using double precision mode [auto-inserted resampler 0 @ 0x9d99560] chl:mono fmt:dbl r:44100Hz -> chl:mono fmt:s16 r:44100Hz [libx264 @ 0x9d6c220] using mv_range_thread = 24 [libx264 @ 0x9d6c220] using SAR=1/1 [libx264 @ 0x9d6c220] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x9d6c220] profile High, level 2.0 [segment @ 0x9d6bd40] Codec for stream 0 does not use global headers but container format requires global headers [segment @ 0x9d6bd40] Codec for stream 1 does not use global headers but container format requires global headers [tcp @ 0xa527ca0] TCP connection to localhost:80 failed: Connection refused [mpegts @ 0xa528260] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts Output #0, segment, to 'http://localhost/%d.ts': Metadata: encoder : Lavf54.29.104 Stream #0:0, 0, 1/90000: Video: h264, yuv420p, 320x240 [SAR 1:1 DAR 4:3], 1/25, q=-1--1, 700 kb/s, 90k tbn, 25 tbc Stream #0:1, 0, 1/90000: Audio: aac, 44100 Hz, mono, s16, 96 kb/s Stream mapping: Stream #0:0 -> #0:0 (rawvideo -> libx264) Stream #0:1 -> #0:1 (pcm_f64le -> libfaac) Press [q] to stop, [?] for help [libx264 @ 0x9d6c220] frame= 0 QP=20.24 NAL=3 Slice:I Poc:0 I:300 P:0 SKIP:0 size=4297 bytes [libx264 @ 0x9d6c220] frame= 1 QP=20.46 NAL=2 Slice:P Poc:8 I:15 P:47 SKIP:238 size=634 bytes
HTTP headers with a simple nc :
% nc -l -p 80 | head -10 POST /0.ts HTTP/1.1 Transfer-Encoding: chunked User-Agent: Lavf54.29.104 Accept: */* Connection: close Host: localhost [...]
For information, commands with "http,:chunked_post:0::://localhost/%d.ts" on output are working well :
% ffmpeg -v 99 -f lavfi -i 'testsrc [out0] ; aevalsrc=sin(440*2*PI*t)[out1]' -pix_fmt yuv420p -map 0 -f segment -segment_format mpegts -segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 -codec:a libfaac -codec:v libx264 -flags -global_header -b:v 700k -r:a 44k -b:a 96k http,:chunked_post:0::://localhost/%d.ts
% nc -l -p 80 | head -10 POST /0.ts HTTP/1.1 User-Agent: Lavf54.29.104 Accept: */* Connection: close Host: localhost [...]
and the "-chunked_post 0" option is working well with non-HLS streams.
% ffmpeg -v 99 -f lavfi -i 'testsrc [out0] ; aevalsrc=sin(440*2*PI*t)[out1]' -chunked_post 0 http://localhost/test.ts
% nc -l -p 80 | head -10 POST /test.ts HTTP/1.1 User-Agent: Lavf54.29.104 Accept: */* Connection: close Host: localhost [...]
Change History (2)
comment:1 by , 11 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | hls added |
Resolution: | → duplicate |
Status: | new → closed |
comment:2 by , 3 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
This appears to be an issue still. I don't believe it was a duplicate of #1291, since that was related to the demuxer, and this is related to the muxer.
chunked_post option is not respected - chunked transfer encoding is used regardless.
Command line: ffmpeg -loglevel info -re -stream_loop -1 -i /bbb_sunflower_1080p_30fps_normal.mp4 -c copy -f hls -hls_time 5 -hls_flags delete_segments -hls_list_size 2 -method POST -chunked_post 0 http://127.0.0.1:8080/upload/stream.m3u8
This is a duplicate of ticket #1291: Options are not forwarded from the hls muxer to the file muxer.