Opened 7 years ago

Closed 6 years ago

#7160 closed defect (fixed)

hls fmp4 http upload - user agent and http method not respected for fmp4-segments

Reported by: Martini 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:
How to reproduce:

% ffmpeg -re -i bunny_1080p_30fps.mp4 -c:v libx264 -qp:v 19 -b:v 2100k -maxrate:v 3500k -c:a libfdk_aac -b:a 128k -ac 2 -ar 48000 -f hls -hls_time 6 -hls_fmp4_init_filename 'init.mp4' -hls_list_size 10 -hls_segment_type fmp4 -http_user_agent "MyEncoder" -method PUT http://ec2-52-59-204-244.eu-central-1.compute.amazonaws.com/cmaf/652174/checkme/test.m3u8

ffmpeg version git-2018-04-24-d06b01f

built on ubuntu 16.04 LTS

on Webserver-log you see, that HTTP-Method and User-Agent is respected for variant-playlist-upload but NOT for fmp4-upload, there it's POST and User-Agent "Lavf/58.13.100"

89.1.38.70 - - [24/Apr/2018:22:25:48 +0000] "PUT /cmaf/652174/checkme/test.m3u8 HTTP/1.1" 204 0 "-" "MyEncoder"
89.1.38.70 - - [24/Apr/2018:22:25:48 +0000] "POST /cmaf/652174/checkme/test1.m4s HTTP/1.1" 404 178 "-" "Lavf/58.13.100"

It's working as expected for -hls_segment_type mpegs

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (6)

comment:1 by Steven Liu, 7 years ago

try the patch please: https://patchwork.ffmpeg.org/patch/8682/

./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -c:v h264_videotoolbox -g 50 -r:v 25 -f hls -v verbose -method PUT -hls_time 2 -hls_segment_type fmp4 -hls_list_size 3 -hls_flags delete_segments http://127.0.0.1/output_test_liuqi.m3u8

in http server:

liuqideMacBook-Pro:custom_ffmpeg liuqi$ ls /usr/local/nginx/html/output_test_liuqi* /usr/local/nginx/html/*.mp4
/usr/local/nginx/html/init.mp4               /usr/local/nginx/html/output_test_liuqi.m3u8 /usr/local/nginx/html/output_test_liuqi4.m4s /usr/local/nginx/html/output_test_liuqi5.m4s /usr/local/nginx/html/output_test_liuqi6.m4s
liuqideMacBook-Pro:custom_ffmpeg liuqi$

comment:2 by Carl Eugen Hoyos, 7 years ago

Keywords: fmp4 http upload removed
Priority: importantnormal

Is this a regression?

comment:3 by Martini, 7 years ago

Resolution: worksforme
Status: newclosed

thanks!!!

seems to work now! (HEVC fmp4 HLS).
http://ec2-52-59-204-244.eu-central-1.compute.amazonaws.com/cmaf/652174/checkme/test.m3u8

89.1.38.70 - - [28/Apr/2018:19:37:02 +0000] "PUT /cmaf/652174/checkme/test.m3u8 HTTP/1.1" 204 0 "-" "MyEncoder"
89.1.38.70 - - [28/Apr/2018:19:37:02 +0000] "PUT /cmaf/652174/checkme/test36.m4s HTTP/1.1" 201 0 "-" "MyEncoder"

I'll double-check next days (recheck mpegts/fmp4) (on holiday now).
(also Akamai MSL4 ingest HLS(CMAF))

comment:4 by Martini, 7 years ago

thanks!!!

seems to work now! (HEVC fmp4 HLS).
http://ec2-52-59-204-244.eu-central-1.compute.amazonaws.com/cmaf/652174/checkme/test.m3u8

89.1.38.70 - - [28/Apr/2018:19:37:02 +0000] "PUT /cmaf/652174/checkme/test.m3u8 HTTP/1.1" 204 0 "-" "MyEncoder"
89.1.38.70 - - [28/Apr/2018:19:37:02 +0000] "PUT /cmaf/652174/checkme/test36.m4s HTTP/1.1" 201 0 "-" "MyEncoder"

I'll double-check next days (recheck mpegts/fmp4) (on holiday now).
(also Akamai MSL4 ingest HLS(CMAF))

comment:5 by Carl Eugen Hoyos, 7 years ago

Resolution: worksforme
Status: closedreopened

comment:6 by Steven Liu, 6 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.