Copyright © 2011 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
I am uploading videos using the API via the PHP libraries.
The video shows up on our content tab on the kaltura website and is placed into the CDN. However, the video will not play, either when selected from the content tab or via our own player. I can download the video from the CDN (and the downloaded copy plays fine) and can see the thumb in the CDN.
Here is my code:
$ext = "wmv";
$fname = basename ($_FILES['video']['tmp_name']);
move_uploaded_file ( $_FILES['video']['tmp_name'] , $config['app_path'].$config['video']['tempdir'].$fname.$ext );
$url = $config['app_url'].$config['video']['tempdir'].$fname.$ext;
$partnerUserID = $user_id;
//define constants
$client_video_id = add_video();
define("KALTURA_PARTNER_ID", $config['kaltura']['partner_id']);
define("KALTURA_PARTNER_WEB_SERVICE_SECRET", $config['kaltura']['admin_secret']);
define("SUB_KALTURA_PARTNER_ID", $config['kaltura']['sub_partner_id']);
$conf = new KalturaConfiguration(KALTURA_PARTNER_ID);
$client = new KalturaClient($conf);
$ks = $client->session->start(KALTURA_PARTNER_WEB_SERVICE_SECRET, $partnerUserID, KalturaSessionType::ADMIN);
$client->setKs($ks);
$file = $_FILES['video']['tmp_name'].$ext;
$mediaEntry = new KalturaMediaEntry;
$mediaEntry->mediaType = 1;
$mediaEntry->name = $_FILES['video']['name'];
$mediaEntry->partnerId = KALTURA_PARTNER_ID;
$mediaEntry->userId = $partnerUserID;
$mediaEntry->tags = $_FILES['video']['name'];
$mediaEntry->groupId = 1;
$mediaEntry->partnerData = $client_video_id;
$mediaEntry->moderationStatus = 2;
$mediaEntry->type = -1;
$mediaEntry->licenseType = 0;
$mediaEntry->durationType = "notavailable";
$me = $client->media->addFromUrl($mediaEntry, $url);
This is the mediaEntry I get returned:
mediaType => 1
conversionQuality =>
sourceType => 5
searchProviderType =>
searchProviderId =>
creditUserName =>
creditUrl =>
mediaDate =>
dataUrl => change this to http etc:cdn.kaltura.com/p/47322/sp/4732200/flvclipper/entry_id/0_rt22rpj4/version/0
plays => 0
views => 0
width =>
height =>
duration => 0
id => 0_rt22rpj4
name => Windows Movie Maker Sample File.wmv description =>
partnerId => 47322
userId => 41550ee8-9f13-c24b-c9d8-4a7aef573e36
tags => windows movie maker sample fil
adminTags => status => 0
type => -1
createdAt => 1277477312
rank => 0
totalRank => 0
votes => 0
groupId => 0
partnerData => 680b4dba-62c1-dbea-1fc0-4c24c02d7f93
downloadUrl => change this to http etc:cdn.kaltura.com/p/47322/sp/4732200/raw/entry_id/0_rt22rpj4/version/0
searchText => Windows Movie Maker Sample File.wmv windows movie maker sample fil
licenseType => 0 version => 0
thumbnailUrl => change this to http etc:cdn.kaltura.com/p/47322/sp/4732200/thumbnail/entry_id/0_rt22rpj4/version/0
flavorParamsIds =>
msDuration => 0
durationType =>
categories =>
moderationStatus => 6
moderationCount => 0
accessControlId => 38787
startDate =>
endDate => )
I cannot figure out why the video will not play. Can anyone see what I am missing?
Thanks
GG