Kuortti.2010-06-26Naginata Helsinki 2010-02-07 09Saaristoleiri-Uto-2008_177Kobe, Japan 2010-04-28playa06secret_552Saaristoleiri-Uto-2008_180Kobe, Japan 2010-05-01Zoo2006-10-07_043Kuortti.2010-06-26South.Africa.Roadtrip.2007-08_216Helsinki2005-10-15_16_019Osaka, Japan 2010-04-29Somero2002_02italia2005-05_131Inujima, Japan 2010-04-30Slovenia2009-04_658norge5oslo_169Vesa-Rauttu-60v_1899Oslo.Norway.2002.summer.034Shiga, Japan 2010-04-18Nanbudo_WCh2006_076Jodo-Milano.2008-09_035
Resting while studying

Kalle taking a nap.

Media Encryption with MP4Box

The MP4Box application provided in the Gpac software package support media file (such as *.mp4) encryption as stated in their manual:

MP4Box can be used to encrypt or decrypt media streams in a more or less format-agnostic manner, according to the ISMA E&A and OMA DRM 2.0 specifications. An XML language is used by MP4Box to get/set the encryption parameters.

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

Also the output of the help items of the MP4Box executable is attached for easier viewing.

kobudo-rei-uto_isma.mp4

mp4box_help.txt

Time: 21/08/2008 22:31

QR code for paazio.nanbudo.fi