Opened 7 years ago

Closed 7 years ago

#6353 closed defect (fixed)

Encryption Key deleted when append an HLS M3u8 Playlist

Reported by: JohnPi Owned by: Steven Liu
Priority: normal Component: avformat
Version: git-master Keywords: hls
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi,

When i append (with "-hls_flags append_list" parameter) a m3u8 playlist which is encrypted with AES-128 , the original key is deleted :

With the command : "ffmpeg -y -loglevel debug -re -i "udp://239.192.0.2:1234?fifo_size=5000000&overrun_nonfatal=1" -c:v libx264 -profile:v main -level 3.1 -preset ultrafast -s 960x540 -b:v 1500k -crf:v 25 -b:a 96k -hls_time 2 -hls_list_size 5 -hls_wrap 5 -hls_flags append_list -hls_allow_cache 0 -hls_key_info_file /var/www/HLSKEY/file2.keyinfo "/var/www/HLS/B.m3u8" "

(Before Appending the list)
#EXT-X-KEY:METHOD=AES-128,URI="http://10.11.0.101/HLSKEY/file2.key"

(After appending the list)
#EXT-X-KEY:METHOD=AES-128,URI=""

Copy of the list :

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-KEY:METHOD=AES-128,URI=""
#EXTINF:10.021333,
B1.ts
#EXTINF:10.000000,
B2.ts
#EXTINF:10.000000,
B3.ts
#EXTINF:10.000000,
B4.ts
#EXT-X-KEY:METHOD=AES-128,URI="http://10.11.0.101/HLSKEY/file2.key"
#EXT-X-DISCONTINUITY
#EXTINF:10.000000,
C8.ts
#EXTINF:10.000000,
C9.ts
#EXTINF:10.000000,
C0.ts
#EXTINF:10.000000,

i think its a bug in /libavformat/hlsenc.c .

thank you :)

Change History (4)

comment:1 by Steven Liu, 7 years ago

Owner: set to Steven Liu
Status: newopen

comment:2 by Steven Liu, 7 years ago

comment:3 by JohnPi, 7 years ago

It's working thank you for the patch .

comment:4 by Steven Liu, 7 years ago

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