[FFmpeg-trac] #8651(avformat:new): hls_fmp4_init_resend doesn't work when sending to a http output

FFmpeg trac at avcodec.org
Sun May 3 13:20:18 EEST 2020

#8651: hls_fmp4_init_resend doesn't work when sending to a http output
             Reporter:  matclayton  |                     Type:  defect
               Status:  new         |                 Priority:  normal
            Component:  avformat    |                  Version:  git-master
             Keywords:  hls         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
 Tested on master (0d81edcbba5149e46b11d447790f3a57a6eaa635) , the
 hls_fmp4_init_resend flag on the hls mux module seems to only work on file
 based output, this doesn't appear to work when a http based output it

 We used the following configuration.

  /opt/ffmpeg/bin/ffmpeg -i rtmp://${INPUT_STREAM_NAME} \
         -map 0 \
         -tune zerolatency -preset veryfast \
         -sws_flags bilinear \
         -framerate 30 -g 30 -keyint_min 30 -force_key_frames
 "expr:gte(t,n_forced*1)" -sc_threshold 0 -b_strategy 0 \
         -c:v:0 libx264 -b:v:0 2000k -maxrate:v:0 2200k -bufsize:v:0 3000k
 -s:v:0 1280x720 -aspect:v:0 16\:9 -profile:v:0 main -crf:v:0 25 \
         -c:a libfdk_aac \
         -b:a:0 320k -maxrate:a:0 480k -bufsize:a:0 320k \
         -hls_time $TARGET_SEGMENT_LENGTH \
         -hls_list_size $MANIFEST_LIST_SIZE \
         -hls_segment_type fmp4 \
         -hls_start_number_source epoch_us \
         -var_stream_map "v:0,a:0,name:720p" \
         -master_pl_name "master.m3u8" \
         -master_pl_publish_rate 1 \
         -hls_flags +program_date_time-temp_file \
         -hls_fmp4_init_resend 1 \
         -hls_fmp4_init_filename "init.mp4" \
         -ignore_io_errors 1 \
         -f hls -method PUT http://localhost:8001/publish/index-%v.m3u8```

 This doesn't resend the init file as expected, however when swaping to a
 file based output it works as described.

 Also the docs relating to hls_fmp4_init_resend (https://ffmpeg.org/ffmpeg-
 formats.html#hls-2)  appear to have been inserted in the middle of the the
 docs related to hls_fmp4_init_filename causing some confusion.

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

More information about the FFmpeg-trac mailing list