Opened 4 years ago
Closed 4 years ago
#8651 closed defect (fixed)
hls_fmp4_init_resend doesn't work when sending to a http output
Reported by: | Mat | Owned by: | Steven Liu |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | hls |
Cc: | liuqi05@kuaishou.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
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 used.
We used the following configuration.
`
/opt/ffmpeg/bin/ffmpeg -i rtmp://127.0.0.1/${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.
Change History (4)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Cc: | added |
---|---|
Owner: | set to |
Status: | new → open |
comment:3 by , 4 years ago
I've just tried the attached patch, and can confirm that this is refreshing the init.mp4 file on http now.
Thank you!
Mat
comment:4 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
fix by commit: 666dbe7aace54b103af09cd111a56822062528c1
Is network input required to reproduce the issue?
Please provide a simplified command line including complete, uncut console output to make this a valid ticket.