I'm trying to encrypt a single video file that has multiple audio tracks muxed in it.  This file will be downloaded to a device, not streamed, and we are using PlayReady DRM.  After encrypting the file I am able to open the file in Chrome and play it with no problem.  Even-though mp4info says it is encrypted it still plays.  

mp4encrypt does give me this warning:
WARNING: this encryption method only applies to fragmented files

I fragment the files then use ffmpeg to combine the tracks I need.  Then I encrypt.  Any ideas?  Should I do this differently?

Here are the commands I'm doing.

#!/bin/bash

mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_720p_3000kbps_en-US.mp4    ./fragmented/A35637_EN_SP_GE_IT_720p_3000kbps_en-US.mp4
mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_de-DE.mp4 ./fragmented/A35637_EN_SP_GE_IT_de-DE.mp4
mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_en-US.mp4 ./fragmented/A35637_EN_SP_GE_IT_en-US.mp4
mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_es-ES.mp4 ./fragmented/A35637_EN_SP_GE_IT_es-ES.mp4
mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_it-IT.mp4 ./fragmented/A35637_EN_SP_GE_IT_it-IT.mp4

ffmpeg   -i ./fragmented/A35637_EN_SP_GE_IT_720p_3000kbps_en-US.mp4 \
  -i ./fragmented/A35637_EN_SP_GE_IT_en-US.mp4 \
  -i ./fragmented/A35637_EN_SP_GE_IT_de-DE.mp4  \
  -i ./fragmented/A35637_EN_SP_GE_IT_es-ES.mp4  \
  -i ./fragmented/A35637_EN_SP_GE_IT_it-IT.mp4 \
  -map 0:v:0 -map 1:a:0 -map 2:a:0 -map 3:a:0 -map 4:a:0 \
  -c copy   ./fragmented/MUXED_A33219_E2_WS_XX_XX.mp4  

python3 create-playready-header.py -kid DA8DB6CCF7BA70C970E083519623EFC8 -k FE20AE699404146A854F7B2CA39E36D8 -o ./fragmented/Playready.bin  


mp4encrypt  --method MPEG-CENC --global-option mpeg-cenc.piff-compatible:true \
--pssh 9a04f07998404286ab92e65be0885f95:./fragmented/Playready.bin \
--key 1:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 1:KID:DA8DB6CCF7BA70C970E083519623EFC8 \
--key 2:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 2:KID:DA8DB6CCF7BA70C970E083519623EFC8 \
--key 3:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 3:KID:DA8DB6CCF7BA70C970E083519623EFC8 \
--key 4:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 4:KID:DA8DB6CCF7BA70C970E083519623EFC8  \
--key 5:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 5:KID:DA8DB6CCF7BA70C970E083519623EFC8   \
./fragmented/MUXED_A33219_E2_WS_XX_XX.mp4 ./output.mp4 


video encrypted with mp4encrypt is playable in chrome.
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : video encrypted with mp4encrypt is playable in chrome.
Issue date:

--- start body ---
I'm trying to encrypt a single video file that has multiple audio tracks muxed in it.  This file will be downloaded to a device, not streamed, and we are using PlayReady DRM.  After encrypting the file I am able to open the file in Chrome and play it with no problem.  Even-though mp4info says it is encrypted it still plays.  

mp4encrypt does give me this warning:
WARNING: this encryption method only applies to fragmented files

I fragment the files then use ffmpeg to combine the tracks I need.  Then I encrypt.  Any ideas?  Should I do this differently?

Here are the commands I'm doing.

#!/bin/bash

mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_720p_3000kbps_en-US.mp4    ./fragmented/A35637_EN_SP_GE_IT_720p_3000kbps_en-US.mp4
mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_de-DE.mp4 ./fragmented/A35637_EN_SP_GE_IT_de-DE.mp4
mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_en-US.mp4 ./fragmented/A35637_EN_SP_GE_IT_en-US.mp4
mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_es-ES.mp4 ./fragmented/A35637_EN_SP_GE_IT_es-ES.mp4
mp4fragment    --fragment-duration 3000 A35637_EN_SP_GE_IT_it-IT.mp4 ./fragmented/A35637_EN_SP_GE_IT_it-IT.mp4

ffmpeg   -i ./fragmented/A35637_EN_SP_GE_IT_720p_3000kbps_en-US.mp4 \
  -i ./fragmented/A35637_EN_SP_GE_IT_en-US.mp4 \
  -i ./fragmented/A35637_EN_SP_GE_IT_de-DE.mp4  \
  -i ./fragmented/A35637_EN_SP_GE_IT_es-ES.mp4  \
  -i ./fragmented/A35637_EN_SP_GE_IT_it-IT.mp4 \
  -map 0:v:0 -map 1:a:0 -map 2:a:0 -map 3:a:0 -map 4:a:0 \
  -c copy   ./fragmented/MUXED_A33219_E2_WS_XX_XX.mp4  

python3 create-playready-header.py -kid DA8DB6CCF7BA70C970E083519623EFC8 -k FE20AE699404146A854F7B2CA39E36D8 -o ./fragmented/Playready.bin  


mp4encrypt  --method MPEG-CENC --global-option mpeg-cenc.piff-compatible:true \
--pssh 9a04f07998404286ab92e65be0885f95:./fragmented/Playready.bin \
--key 1:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 1:KID:DA8DB6CCF7BA70C970E083519623EFC8 \
--key 2:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 2:KID:DA8DB6CCF7BA70C970E083519623EFC8 \
--key 3:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 3:KID:DA8DB6CCF7BA70C970E083519623EFC8 \
--key 4:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 4:KID:DA8DB6CCF7BA70C970E083519623EFC8  \
--key 5:FE20AE699404146A854F7B2CA39E36D8:random  \
--property 5:KID:DA8DB6CCF7BA70C970E083519623EFC8   \
./fragmented/MUXED_A33219_E2_WS_XX_XX.mp4 ./output.mp4 


--- end body ---
