Copyright © 2012 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
In an application i am building i had the need to build my own kaltura mixes manually.
Here's an outline of how i did it and some of the pitfalls i encountered along the way
To build the mix initially i used the createMix api function
//create the mix
$mixEntryId = $kalturaClient->mixing->add($mixEntry);
mixEntryId is the id of the mix entry created, Then i added entries to the mix, using the appendMediaEantry function.
So far so good this created a mix with the desired media entries, the difficulties came when i tried to apply the clipping. There is a member variable in the KalturaMixEntry Object called dataContent. This is the xml which contains the information about the mix. Here we can implement our own clipping.
The dataContent xml is split into 5 parts Metadata, VideoAssets, AudioAssets, VoiceAssets and Plugins. I'll only be talking about VideoAssets and Plugins here.
VideoAssets contain vidasset tags and each one of these represents a video in your mix. Here's an example
This video has been edited so that it will play from the third to the eighth second
the important parts are:
start_time Clipped_Start
this is where the video will start from
len_time, Clipped _Len
these indicate how long you want it to play for
start_byte, end_byte, total_bytes, and real_seek_time must all be set to -1, the kaltura server will assign the correct values
the url should be set as follows(not sure if this is necessary)
http:///flvclipper/entry_id/0_3udppugi/clip_from/3000/clip_to/8000/flavo...
where 3000 and 8000 are the start and end points in milliseconds
I set all these values by reading in the mix and parsing the data out with simplexml.
The last thing of note is that when i tried to save the mix dataContent out using apiV3 calls the mix that returned would not play on the kdp. I got a black screen. I had to use the setMetaData function from partnerservices2 to achieve this. There seems to be a bug here.
To explore and get information on partnerservices2 go to http:///index.php/partnerservices2/testme and you'll be able to try out a test console.
I hope this is of use to someone, it kept me up till the early hours. If you're interested I can post on how to get transitions in there as well
Hi,
I am creating mix manually as well. The mix I created is having issue with playing sound track. I think there must be something wrong in the section of the mix XML. I am wondering if you can help me on this . Many thanks for your help.
Stephen