Working With the Video Field

The transcoding process that is initiated when you create a video content item results in changes to the content of the video field. All the information returned from Viz One Publisher about the transcoded variants and keyframe images that have been generated is added to the video field. In case of the example used in the previous sections, the initial information written to the video field:

{ "master" : { uri" : "http://my-video-server/video1.mpeg", "mime-type" : "video/mpeg" } }

might be expanded to:

{ "status-uri":"http://ip-address/rest/digitalItem/status/146", "thumbnails":[ {"uri":"http://ip-address/diactus/unrestricted/imageOutput/thumbs/1297_2.png","mime-type":"image/png","width":0,"height":0}, {"uri":"http://ip-address/diactus/unrestricted/imageOutput/thumbs/1297_3.png","mime-type":"image/png","width":0,"height":0}, {"uri":"http://ip-address/diactus/unrestricted/imageOutput/thumbs/1297_4.png","mime-type":"image/png","width":0,"height":0}, {"uri":"http://ip-address/diactus/unrestricted/imageOutput/thumbs/1297_5.png","mime-type":"image/png","width":0,"height":0}], "video":[{"uri":"http://ip-address/diactus/unrestricted/published/1297.mp4","mime-type":"video/mp4","width":0,"height":0}], "master" : { uri" : "http://my-video-server/video1.mpeg", "mime-type" : "video/mpeg" } }

The status-uri value contains the URI of a Viz One Publisher document containing information about the transcoded variants. Your application can therefore obtain additional information about the generated variants from this file.

If the source video is stored in a Viz One system then the video field will contain one additional key-value pair, called mos-root. It contains metadata about the source video in the form of an 'escaped' XML document:

{ "mos-root": "<?xml version="\&quot;1.0\&quot;?"?> <!DOCTYPE mosRoot> <mosRoot> <mos> <mosID /> <mosItemBrowserProgID> VCPAxFiller.VCPTemplateFiller&lt;\/mosItemBrowserProgID&gt; <mosItemEditorProgID> VCPAxFiller.VCPTemplateFiller&lt;\/mosItemEditorProgID&gt; <mosAbstract>foo&lt;\/mosAbstract&gt; ..... <mosExternalMetadata> .... <mosPayload> .... </mosPayload></mosSchema></mosScope> </mosExternalMetadata></description></changed></createdBy></objDur></objRev></objTB></objType></objSlug></objID></mosAbstract></mosItemEditorProgID></mosItemBrowserProgID> </mos> </mosRoot>", "status-uri":"http://ip-address/rest/digitalItem/status/146", "thumbnails":[ {"uri":"http://ip-address/diactus/unrestricted/imageOutput/thumbs/1297_2.png","mime-type":"image/png","width":0,"height":0}, {"uri":"http://ip-address/diactus/unrestricted/imageOutput/thumbs/1297_3.png","mime-type":"image/png","width":0,"height":0}, {"uri":"http://ip-address/diactus/unrestricted/imageOutput/thumbs/1297_4.png","mime-type":"image/png","width":0,"height":0}, {"uri":"http://ip-address/diactus/unrestricted/imageOutput/thumbs/1297_5.png","mime-type":"image/png","width":0,"height":0}], "video":[{"uri":"http://ip-address/diactus/unrestricted/published/1297.mp4","mime-type":"video/mp4","width":0,"height":0}], "master" : { uri" : "http://my-video-server/video1.mpeg", "mime-type" : "video/mpeg" } }

You can use the video field to store additional metadata of your own by adding add other name-value pairs to the JSON structure. You must not, however, change or remove any of the standard name-value pairs described above.