Command line to add the encryption data to an existing mp4 file could be like the following:

MP4Box -isma -crypt kobudo-rei-uto_ismacrypt.xml kobudo-rei-uto_isma.mp4

The XML file referred as "kobudo-rei-uto_ismacrypt.xml" has the following content:

<?xml version="1.0" encoding="UTF-8" ?>
<ISMACryp>
    <ISMACrypTrack
        trackID="1"
        key="0x180031a348c14d401143be02fe7708f5"
        salt="0xd0763edaa9d9bd2a"
        scheme_URI="urn:gpac:isma:encryption_scheme"
        kms_URI="self"
        selectiveType="5" />
</ISMACryp>

The resulting media file is attached.

Output of the command:

MP4Box -info 1 kobudo-rei-uto_isma.mp4

is the following:

Track # 1 Info - TrackID 1 - TimeScale 30000 - Duration 00:00:04.500
Media Info: Language "Undetermined" - Type "vide:encv" - 135 samples
Handler name: GPAC ISO Video Handler
MPEG-4 Config
    Visual Stream - ObjectTypeIndication 0x21
    AVC/H264 Video - Visual Size 784 x 320 - Profile High @ Level 4.1
NAL Unit length bits: 32
Pixel Aspect Ratio 1:1 - Indicated track size 784 x 320
    Decoding Buffer size 10863 - Average bitrate 873 kbps - Max Bitrate 968 kbps
    No stream dependencies for decoding
    StreamPriority 0

*Encrypted stream - ISMA scheme iAEC (version 1)
scheme location: urn:gpac:isma:encryption_scheme
KMS location: key in file
Selective Encryption: Yes
Initialization Vector size: 32 bits

Computed info from media:
    Total size 503484 bytes - Total samples duration 4500 ms
    Average rate 983 kbps - Max Rate 969 kbps

Posted by 옴팡투덜이
BLOG main image
by 옴팡투덜이

공지사항

카테고리

분류 전체보기 (59)
감상과 비평 (15)
자기 고찰 (0)
Infomation (40)
아이디어 (0)
일탈을 꿈꾸는 나의 일상 (1)

최근에 올라온 글

최근에 달린 댓글