bipbop-frag-cenc.xml (2197B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 3 <!-- 4 This XML file describes the encryption applied to |bipbop-cenc*|. To 5 generate the bipbop-cenc files, run the following commands: 6 7 Encrypt bipbop-no-edts.mp4 with the keys specified in this file, 8 and output to |bipbop-cenc-{video,audio}.mp4| 9 MP4Box -crypt bipbop-frag-cenc.xml -rem 2 -out bipbop-cenc-video.mp4 bipbop-no-edts.mp4 10 MP4Box -crypt bipbop-frag-cenc.xml -rem 1 -out bipbop-cenc-audio.mp4 bipbop-no-edts.mp4 11 12 Fragment |bipbop-cenc-*.mp4| into 500ms segments: 13 MP4Box -dash 500 -rap -segment-name bipbop-cenc-video -subsegs-per-sidx 5 bipbop-cenc-video.mp4 14 MP4Box -dash 500 -rap -segment-name bipbop-cenc-audio -subsegs-per-sidx 5 bipbop-cenc-audio.mp4 15 16 The above command will generate a set of fragments in |bipbop-cenc-{video,audio}*.m4s 17 and |bipbop-cenc-{video,audio}init.mp4| containing just the init segment. 18 19 To cut down the duration, we throw out all but the first 3 audio & 2 video segments: 20 rm bipbop-cenc-audio{[^123],[123][^.]}.m4s 21 rm bipbop-cenc-video{[^12],[12][^.]}.m4s 22 23 MP4Box will also have generated some *.mpd files we don't need: 24 rm bipbop-cenc-*.mpd 25 26 Delete intermediate encrypted files: 27 rm bipbop-cenc-{audio,video}.mp4 28 --> 29 30 <GPACDRM type="CENC AES-CTR"> 31 32 <DRMInfo type="pssh" version="1"> 33 <!-- 34 SystemID specified in 35 https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/cenc-format.html 36 --> 37 <BS ID128="1077efecc0b24d02ace33c1e52e2fb4b" /> 38 <!-- Number of KeyIDs = 2 --> 39 <BS bits="32" value="2" /> 40 <!-- KeyID --> 41 <BS ID128="0x7e571d037e571d037e571d037e571d03" /> 42 <BS ID128="0x7e571d047e571d047e571d047e571d04" /> 43 </DRMInfo> 44 45 <CrypTrack trackID="1" isEncrypted="1" IV_size="16" saiSavedBox="senc" 46 first_IV="0x00000000000000000000000000000000"> 47 <key KID="0x7e571d037e571d037e571d037e571d03" 48 value="0x7e5733337e5733337e5733337e573333" /> 49 </CrypTrack> 50 51 <CrypTrack trackID="2" isEncrypted="1" IV_size="16" saiSavedBox="senc" 52 first_IV="0x00000000000000000000000000000000"> 53 <key KID="0x7e571d047e571d047e571d047e571d04" 54 value="0x7e5744447e5744447e5744447e574444" /> 55 </CrypTrack> 56 57 </GPACDRM>