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
hi
I am developing one application where user can upload video and images from his own machine or from other site
like youtube and flickr . I am using kaltura php 5 library for this and my apllication is working fine for user own videos
and images as well as for flickr images.
But my problem is that youtube video upload is not working.
I used following code to upload local images
//print_r($ksession);
$kclient->setKs($ksession);
$entry = new KalturaMediaEntry();
$fileData = $_FILES['fileData']['tmp_name'];
//print $fileData;
if(move_uploaded_file($_FILES['fileData']['tmp_name'],"uploads/kal_".$_FILES['fileData']['name']))
{
$rs = $kclient->media->upload("uploads/kal_".$_FILES['fileData']['name']);
unlink("uploads/kal_".$_FILES['fileData']['name']);
}
//print_r($rs);
$entry->mediaType = 2;
$entry->name = "Test by bhushan";
$rsobj = $kclient->media->addFromUploadedFile($entry,$rs);
and i used uploadFromUrl() method to upload flickr image and its working but when i used same for youtube video it is not working .
Can any one tell me why it is not working for youtube ??
Can any one help me ..
Do u have any example of uploading video from youtube and other site to kaltura??
Hi Jason ,
Thanks for your help.
My local video functionality is working fine. I don't have problem with that.
But my problem is to upload file from youtube link. Say my video link is http://www.youtube.com/watch?v=zL9xAlVLseQ and i want to upload this video as it from youtube to kaltura without downloading to my disk.
I have read somewhere that the youtube api is blocked by Kaltura but I am not sure about this.
So can you confirm it .
On kaltura's site they say that user can upload video from social sites like youtube, flickrs etc.
Can you help me for that.
Thanks
Regards Bhushan
Hi Bhushan,
A URL like http://www.youtube.com/watch?v=zL9xAlVLseQ won't work because it does not
point to a video file -- it loads an entire HTML page. If you want to use the Kaltura API for
uploading from a URL, you need a URL that references the video file directly.
J
Hi Jason,
I got you. But how can I get direct link to flv from Youtube. I think they don't provide such feature.
So is there any way to get the exact link of Youtube video file so I can upload ti to Kaltura.
Thanks,
Bhushan
There is a way to do it. Try looking at open source software that downloads Youtube files -- like this one: http://sourceforge.net/projects/ytd/files/
J
Try this sample and see if it works:
http://www.kaltura.org/kalorg/kaltura-api-clients-sample-code/php/Sample...
Here's the movie file used in the upload. You should save it to your disk before using it:
http://www.kaltura.org/kalorg/kaltura-api-clients-sample-code/php/piano....
Jason