Kaltura 4.0 CE api_v3 and conversionProfileId parameter

3 replies [Last post]
Joined: 08/30/2011
Points: 65

Hi guys,

It's me again :-p

I ran in some problems this week because the uploadFromUrl() function was not setting the conversion profile like I wanted.

Here a exemple of my code :

// build the upload url
$url = "myURL";
           
// Create the new mediaEntry
$mediaEntry = new KalturaMediaEntry();
$mediaEntry->sourceType = 5;
$mediaEntry->categories = "test";
$mediaEntry->name = $title;

// Audio exemple
$mediaEntry->mediaType = 3;
$mediaEntry->conversionProfileId = 6;
       
$result = $client->media->addFromUrl($mediaEntry, $url);

The problem here is that my conversionProfileId seem not to be taked by the MediaService because my new entry is always convert with the default convert profile.

Here is a screenshot of my conversion profiles : http://www.kaltura.org/sites/default/files/imagepicker/23318/Transcoding...

I looked in the source of Kaltura 4.0 CE and didn't find in KalturaBaseEntry.php the conversionProfileId parameter.
I saw that the mediaService us the conversionQuality parameter in KalturaMediaEntry. This parameter is suppose to be deprecated in the api_v3 but it seems that it still used in the Kaltura 4.0 CE api_v3.

I need some help on that plz. I did a mistake in my code? Do I need to us the conversionQuality parameter instead? Do I need to update my kaltura api?

Thanks all and sorry for the bad english

Joined: 01/05/2009
Points: 1697

Hi, did you try setting entry->conversionQuality ?

Joined: 08/30/2011
Points: 65

I tried but with no real results because I dont know what to put in the string of convertQuality.

The documentation is not really clear about this parameter exempt that is a string.

I will look in kaltura sources if I can have some clues.

Thanks for all your answers to my posts Kalturian. It's much appreciate ;-)

Joined: 08/30/2011
Points: 65

I found that I have to put the conversion profile ID in the conversionQuality parameter hehe 8-)

Now it uploads and keeps the right conversion profile put i'm with a problem where I can't read the media. It says : media not found.

I looked in the server and the entry data is there and the database also content the entry. Don't know why it keeps telling me that the media is not found???

Here is what going on in the api_v3 logs :

2011-12-07 12:13:44 [174.92.179.253] [1229044998] [API] [KalturaFrontController->getExceptionObject] ERR: exception 'KalturaAPIException' with message 'No flavors found' in /opt/kaltura/app/api_v3/services/FlavorAssetService.php:148
Stack trace:
#0 [internal function]: FlavorAssetService->getWebPlayableByEntryIdAction('0_dvd2xmru')
#1 /opt/kaltura/app/api_v3/lib/KalturaServiceReflector.php(276): call_user_func_array(Array, Array)
#2 /opt/kaltura/app/api_v3/lib/KalturaDispatcher.php(120): KalturaServiceReflector->invoke('getWebPlayableB...', Array)
#3 /opt/kaltura/app/api_v3/lib/KalturaFrontController.php(201): KalturaDispatcher->dispatch('flavorasset', 'getWebPlayableB...', Array)
#4 /opt/kaltura/app/api_v3/lib/KalturaFrontController.php(51): KalturaFrontController->handleMultiRequest()
#5 /opt/kaltura/app/api_v3/web/index.php(19): KalturaFrontController->run()
#6 {main}

So he can't find the flavor but I see the flavor of the entry in kaltura database.

Is this because I ask for the "source" flavor?

It happend only when I add new entries with the conversionProfile set to "source" only.

Here is the flavors asset of the entry that is not working. It's a .mp3 and the transcoding flavor is "source".
http://www.kaltura.org/sites/default/files/imagepicker/23318/flavors_1.p...

A little update of my problem :
All entries added with source only transcoding flavor will creat the error up there. It's like the source is not a flavor for kaltura so he can't find any flavors for the media. The download link works well though.

So the problem seem to be isolate to the fact that my kaltura installation do not take "source" has a valide flavor. There is settings or anything like that somewhere that could resolve my problem?