Using openssl encryption for Apple's HTTP Live Streaming

后端 未结 4 899
夕颜
夕颜 2021-02-02 18:12

Has anyone had any luck getting encrypted streaming to work with Apple\'s HTTP Live Streaming using openssl? It seems I\'m almost there but my video doesn\'t play but I don\'t g

4条回答
  •  爱一瞬间的悲伤
    2021-02-02 18:55

    Combining information from three of the above (the OP, the fix for hexdump and the IV information) yielded a working solution for us. Namely:

    openssl rand 16 > static.key
    
    key_as_hex=$(cat static.key | hexdump -e '16/1 "%02x"')
    
    for i in {0..9}; do
        init_vector=`printf '%032x' $i`
        openssl aes-128-cbc -e -in video_low_$(($i+1)).ts -out video_low_enc_$(($i+1)).ts -p -nosalt -iv $init_vector -K $key_as_hex
    done
    

提交回复
热议问题