I'm trying to decrypt a .m3u8
playlist, I followed these steps :
- create a directory
- copy the key to a key file, ie
my.key
, and place it in the dir. Note that keys can be rotated, if the playlist has multiple keys copy all of them to different files. - copy all
.ts
segments to the same dir - copy and edit the
playlist.m3u8
and use just the filename(s) for the key(s) URI(s) and segments.
and using this command to decrypt the playlist
ffmpeg -i playlist.m3u8 -c copy output.ts
but I got this error : Invalid data found when processing input
here is my m3u8 :
#EXTM3U
#EXT-X-TARGETDURATION:12
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-KEY:METHOD=AES-128,URI="my.key"
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:6.000,
s-1-v1-a1.ts
#EXTINF:6.000,
s-2-v1-a1.ts
#EXTINF:6.000,
s-3-v1-a1.ts
#EXTINF:12.000,
s-4-v1-a1.ts
#EXTINF:12.000,
s-5-v1-a1.ts
#EXTINF:6.000,
s-6-v1-a1.ts
#EXT-X-ENDLIST
- whats wrong with my command ?
- how to not convert playlist to one
.TS
file? I want to decrypt files separtly