FairPlay Content Packaging Using mediafilesegmenter tool

New to FairPlay implementation. Following Apple's "FairPlay Streaming Programming Guide", to transcoded & encrypted a MP4 file using command -

mediafilesegmenter --stream-encrypt --streaming-key-delivery --encrypt-key-file=./key_iv.bin --encrypt-key-url="skd://example/key" ./input-content.mp4

key_iv.bin is the file which contains Encryption Key and Initialisation Vector.

It is generating HLS's playlist, index and segment files.

To test the encryption and the decryption precess, I am taking one segment file(which is generated by mediafilesegmenter, say fileSequence125.ts) and trying to decrypt(algorithm is "AES/CBC/NOPADDING") it using the same Encryption Key and Initialisation Vector, then I am getting bellow errors -

Input length not multiple of 16 bytes

So, does it means the length/size of each segment(.ts) file, which is generated by the mediafilesegmenter, should be a multiple of 16 bytes?

FairPlay Content Packaging Using mediafilesegmenter tool
 
 
Q