[FFmpeg-trac] #7339(avformat:new): HLS-Retry mechanism for HTTP-Upload segments

FFmpeg trac at avcodec.org
Tue Jul 31 18:56:31 EEST 2018

#7339: HLS-Retry mechanism for HTTP-Upload segments
             Reporter:  nitrat    |                     Type:  enhancement
               Status:  new       |                 Priority:  normal
            Component:  avformat  |                  Version:  git-master
             Keywords:  hls       |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
 Summary of the enhancement:
 Retry hls-segment upload once, if web server returns HTTP 500.
 How to reproduce:
 % ffmpeg -i http://wdr-1live-
 live.cast.addradio.de/wdr/1live/live/mp3/128/stream.mp3 -ar 48000 -c:a
 libfdk_aac -b:a 128k -f hls -hls_time 2 -method PUT -hls_segment_filename
 '' -master_pl_name 'master.m3u8'
 -timeout 2 '' -loglevel trace
 ffmpeg version n4.0.1
 built on ubuntu 16.04

 First I thought I can just rerun „ff_http_do_new_request“ if result shows
 failed state
 But function does NOT return any errors, if webserver returns HTTP 500.

 „ff_http_do_new_request“  refers to -> „http_open_cnx“
 I thought that I can extend handling for http_code 30x for http_code 500,
 but function „http_open_cnx_internal“ did never return this  code, though
 web server did (see 1.)

 „http_open_cnx“ refers to -> „http_open_cnx_internal“ refers to ->

 Here this function returns ALWAYS http_code 200 for posting data.

 Function „http_read_header“ will NEVER be executed.

Ticket URL: <https://trac.ffmpeg.org/ticket/7339>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list