Quantcast
Channel: API and App Developers Support - Kaltura
Viewing all 1035 articles
Browse latest View live

File upload using C# not working....help!

$
0
0

@dohsoft wrote:

Hi all,

I'm new to using Kaltura but not to using APIs to achieve things in C# so I was hopeful of being able to get up to speed quite quickly. However I'm hitting an issue when I try and upload a video. I've based my code on these examples:

http://knowledge.kaltura.com/how-start-kaltura-session-using-testme-console
http://knowledge.kaltura.com/uploading-media-using-kaltura-api-console

When I then check the KMC I see an entry but the status of the file is "uploading" and not running time etc. is held against the video.

I've posted below my code, I'm sure I can't be a million miles away from getting it right as I don't get any error messages so any help would be very gratefully received,

=========CODE START===========
KalturaConfiguration config = new KalturaConfiguration(Convert.ToInt16(ConfigurationManager.AppSettings["PARTNER_ID"]));
config.ServiceUrl = ConfigurationManager.AppSettings["SERVICE_URL"];
KalturaClient client = new KalturaClient(config);
String secret = ConfigurationManager.AppSettings["ADMIN_SECRET"];
String userId = null;
KalturaSessionType type = KalturaSessionType.ADMIN;
int partnerId = Convert.ToInt16(ConfigurationManager.AppSettings["PARTNER_ID"]);
int expiry = 86400;
String privileges = null;
Object result = client.SessionService.Start(secret, userId, type, partnerId, expiry, privileges);

                client.KS = result.ToString();
                KalturaUploadToken uploadToken = new KalturaUploadToken();

                KalturaUploadToken result2 = client.UploadTokenService.Add(uploadToken);
                
                string uploadTokenID = result2.Id;
                uploadToken.Id = uploadTokenID;


                FileStream fileData = File.Create(context.Server.MapPath("~") + "//CourseUploadTemp//" + fileName);
                bool resume = false;
                bool finalChunk = false;
                float resumeAt = 0;
                KalturaUploadToken resultUp = client.UploadTokenService.Upload(uploadTokenID, fileData, resume, finalChunk, resumeAt);

                string fName = resultUp.FileName;

                KalturaMediaEntry entry = new KalturaMediaEntry();
                entry.MediaType = KalturaMediaType.VIDEO;
                KalturaMediaEntry resultFE = client.MediaService.Add(entry);

                string entryID = resultFE.Id;

                
                KalturaUploadedFileTokenResource resource = new KalturaUploadedFileTokenResource();
                resource.Token = uploadTokenID;
                Object resultTR = client.MediaService.AddContent(entryID, resource);

=========CODE ENDED============

Many thanks,
Steve

Posts: 12

Participants: 2

Read full topic


kalturaCategory add with custom metadata values

Is it possible to have two media entries point to the same under lying media files using the API?

$
0
0

@cbwilkes wrote:

My end goal is to have two entries with two different AccessControl profiles point to the same media. I don't want to add the media twice since it would double my storage requirements.

I know that when ever you add a partner it adds default videos without requiring full copies of the media. Is it possible for me to do this?

Thanks

Posts: 2

Participants: 2

Read full topic

Upload a video and get it's Embed code

$
0
0

@aman06 wrote:

Hi All,

i am new on kaltura. I want to upload video through Api and want to get embed code. please help

Posts: 3

Participants: 3

Read full topic

Add watermark to custom flavors

$
0
0

@benny_1 wrote:

Hi

I have managed to add a watermark in custom flavorparams which I have created using the API.

The problem is that the size of the watermark is constant and if the source video resolution is 1920x1080 than the watermark comes out very small.

If the source video resolution is 640x360 it comes out ok.

Is it possible to set the watermark scale using percentage?

I couldn't find out how.

Thanks

Posts: 2

Participants: 2

Read full topic

Google/smart TV SDK

Video.js as player of Kaltura content

$
0
0

@cesar_mantilla wrote:

Currently I use video.js as player from different sources (hosted videos, youtube, CDN). Now, I want to use Kaltura content as a new kind of source. The idea is more or less the same way that Viewbix can include it.
Is it possible?

Posts: 2

Participants: 2

Read full topic

Delete Video using c# asp.net

$
0
0

@vikas_pawar wrote:

I want to delete video from kaltura using c# Asp.net. Please let me know the API which will provides this functionality.

Posts: 5

Participants: 2

Read full topic


How to list all categories that have some Privacy Context?

$
0
0

@kshp wrote:

Hello,
I'm trying to list all categories using test API console. But in the list's result I can't see categories with entitlements settings (it means that some Privacy Context is assigned to the category).
For example in the KMC - Settings - Integration Settings - Entitlement Settings, setting some category as Root Category automatically assigns a Privacy Context to it. But this root category is not in the category.list response.

So, my question is how to pass Private Context name within request (category.list) or during session creation? Or how to list all categories for partnerId despite Privacy Context?

My main goal is to manage entitlement settings of channels/categories and users permissions using Kaltura API (Java client).

Posts: 5

Participants: 2

Read full topic

Verify integrity of an upload

Play Video at specific time

$
0
0

@pratik_padhiar wrote:

Hi,

Can anyone guide how to start a video from specific time interval.
Checked this link from one of the post - http://player.kaltura.com/docs/index.php?path=StartEndPreview

The problem here is, it seeks to specified time i.e it buffers video till 30 sec and then starts playing.

I require video to directly start from the particular location. That if specified 30 sec, then it jumps to 30 directly and plays.Rather starting from 0..seeks till 30 and play.

Any help would highly appreciated.

Thanks.

Posts: 3

Participants: 2

Read full topic

Unable to get Kaltura Developer "Upload a Video" code to work - PHP

$
0
0

@jwilson67 wrote:

Good morning everyone. I'm currently working as a student worker at the University that I'm attending and I've been given a project. We are wanting to upload videos to our Kaltura library but I'm hitting a wall. I've been looking at the php files that are provided by Kaltura using the Kaltura Developer tool but I can't get it to actually upload. I'm able to choose a file to upload but when I click the "Upload" button it does nothing. I have everything going through my www folder using WAMP.

I'm pretty green when it comes to PHP and using WAMP so I thought I'd see if I could get some pointers through this forum.

https://developer.kaltura.org/recipes/upload

Thanks,

Josh

Posts: 11

Participants: 2

Read full topic

Unable to retrieve Catagories via the API

$
0
0

@avrono wrote:

I am getting back a response from the API containing my video asset, however "catagorization" is missing.
I am using the Node.js lib

and get back a response ... with this included:

"status" : 2,
     "votes" : 0,
     "categories" : "",
     "name" : "BLAH",
     "plays" : 0,

The code is as follows:

var id = req.params.id;
var mycb = function (success, results) {
if (!success) {
  //console.log("failed:" + results);
  res.json(success);
} else {
  //console.log("passed:" + require('util').inspect(success, false, null));
  res.json(success);
}

};

  if(!id) {
    res.json("{error: no id supplied}");
  } else {
    var config = new Kaltura.KalturaConfiguration(1111111);
    config.serviceUrl = SERVICE_URL;
var client = new Kaltura.KalturaClient(config);
client.session.start(function (ks) {
      if (ks.code && ks.message) {
        //console.log('Error starting session', success, ks);
      } else {
        client.setKs(ks);
        var type = require('kaltura/KalturaVO');
        var filter = new type.KalturaMediaEntryFilter();
        var pager = new type.KalturaFilterPager();
        //var filter = new Filter();
        filter.referenceIdEqual = id;

        //console.log("Success: " + require('util').inspect(client, false, null));
        var res = client.media.listAction(mycb, filter, pager);
        //console.log("result is " + res);

      }
    }, "9c06b188bfb571ae1111111",
    "avron@1111111.com",
    Kaltura.enums.KalturaSessionType.ADMIN,
    1111111);

I have also set the entitlements via the KMC to have no restrictions

Any ideas ?

Posts: 8

Participants: 2

Read full topic

Compare local file with uploaded file

$
0
0

@jwilson67 wrote:

I'm currently working on putting in a check to make sure the uploaded video has the same file size as the source video. I've been looking in the API documentation and can't seem to find a "filesize" function using media:get.

Am I just looking in the wrong spot?

Thanks,

Josh

Posts: 6

Participants: 3

Read full topic

Java Example Code doesn't match API Download

$
0
0

@greatjava wrote:

I've tried to use the code from the test me console but it's Java doesn't compile and the API calls are not implemented by the current Java download.

Few things ... 1) code to set the partner id is declared below where it is used, 2) ints are being set to null, but those things I can easily change. 3) The setter methods on the config object doesn't exists, looks like the API maybe takes a map of strings now? 4) Method for login with those parameters doesn't exist either (compile error). Was hoping to use this code so didn't have dig into the details of API but so far it's not helpful. I grabbed the latest java download and put in eclipse project, put my code in another project and setup build path.

package com.kaltura.code.example;
import com.kaltura.client.enums.*;
import com.kaltura.client.types.*;
import com.kaltura.client.services.*;
import com.kaltura.client.KalturaApiException;
import com.kaltura.client.KalturaClient;
import com.kaltura.client.KalturaConfiguration;
class CodeExample{
public static void main(String[] args){
try{
KalturaConfiguration config = new KalturaConfiguration();
config.setPartnerId(partnerId);
config.setEndpoint("https://www.kaltura.com/");
KalturaClient client = new KalturaClient(config);
String loginId = "userlogin";
String password = "password!";
int partnerId = 9999999;
int expiry = null;
String privileges = null;
Object result = client.getUserService().loginbyloginid(loginId, password, partnerId, expiry, privileges);
}catch(KalturaApiException e){
e.printStackTrace();

Posts: 1

Participants: 1

Read full topic


Test console upload api not functioning properly

$
0
0

@prakhar_oodles wrote:

Hi All,

I am facing a bad issue, I tried installing kaltura version 11.5, 11.2, and many more but facing a issue that i am able to upload a file from publisher console and is able to list the content. but whenever i try uploading file from test console API it uploads in /opt/kaltura/web/content/uploads but i can't see it in content list from publisher GUI.

Posts: 2

Participants: 2

Read full topic

Exception existing connection is forcibly closed using python

$
0
0

@petrosemg wrote:

Since Yesterday I get the following error when I am running my python scripts accessing the API. The error will happen randomly during the script execution. I am blocked since the scripts are updating important meta data for my application. We use the SaaS solution.

File "C:\Python27\lib\site-packages\KalturaClient\Plugins\Core.py", line 52627, in list
resultNode = self.client.doQueue()
File "C:\Python27\lib\site-packages\KalturaClient\Client.py", line 324, in doQueue
postResult = self.doHttpRequest(url, params, files)
File "C:\Python27\lib\site-packages\KalturaClient\Client.py", line 274, in doHttpRequest
f = self.openRequestUrl(url, params, files, self.requestHeaders)
File "C:\Python27\lib\site-packages\KalturaClient\Client.py", line 237, in openRequestUrl
raise KalturaClientException(e, KalturaClientException.ERROR_CONNECTION_FAILED)
KalturaClient.Base.KalturaClientException: [Errno 10054] An existing connection was forcibly closed by the remote host (-4)

Posts: 5

Participants: 2

Read full topic

Create playlist on the fly

$
0
0

@KillMeGerty wrote:

Hello everyone!
I need to dynamically create playlist , using array if media_id's. I don't want to save playlist on media server - just create on the page player with selected media's (in playlist).
Please answer me , can I do it or not? If can - please give a example how to do it.

Also I found in API documentatin method, playlist:executefromcontent - it gives me list of media's metadata . Can I use this somehow?
Thank you

Posts: 1

Participants: 1

Read full topic

Deletelocalcontent does nothing

$
0
0

@benny_1 wrote:

Hi

I have a remote storage configured and I want to delete some entries local content using the API.

I use flavorAsset->deletelocalcontent($assetId), get no error but the local file is still there, not deleted.

any ideas?

It's Kaltura 11.4-03

Posts: 5

Participants: 2

Read full topic

How can I change adTagUrl using API?

$
0
0

@jimyu wrote:

We can set adTagUrl when we construct the video player. How can I change it afterwards. Like after one video finishes playing, it rolls to another, instead of playing the same video ad tag, I want to play a different one. How can I change adTagUrl using API functions?

Thanks!

Jim

Posts: 3

Participants: 2

Read full topic

Viewing all 1035 articles
Browse latest View live