android - ffmpeg hls with aes encryption -
i trying create encrypted hls stream using ffmpeg. i've seen other questions related this. i've created video.key file following content:
12345678901234567890123456789011
i've created key_info file following contents:
http://10.10.102.223:59164/trial/video.key video.key
i have mp4 file : jellies.mp4 , trying transcode , encrypt using
ffmpeg -i jellies.mp4 -hls_time 5 -hls_key_info_file key_info playlist.m3u8
after done transcoding put folder on server , tried access on client android app.
the app contains videoview url fed. , believe decryption done automatically.
but app not working . shows following errors:
e/mediaplayer: error (1, -1007)
after tried transcoding again ,this time without encryption ,using:
ffmpeg -i jellies.mp4 -hls_time 5 playlist.m3u8
this played on app.
using packet capture i'm able see various packets sent , received .
and key being received perfectly.
then why stream not working.
is because didn't encrypt ? , how fix it?
if u have error -1007 (media_error_malformed
) check encoding on keyfile , number of symbols.
for example in utf-8 keyfile lesser or greater number of symbols 16 (128bit), error occurs on players.
Comments
Post a Comment