Getting video Duration using PHP library

Hi All,
I am uploading the video using the PHP Library. Video is uploading success, but i am not receiving the Video Duration . It is showing 0. Response result is given below.
Can we get the video duration using the Entry ID or any other way ? Please provide me any other solution

KalturaMediaEntry Object
(
[mediaType] => 1
[conversionQuality] => 9
[sourceType] => 1
[searchProviderType] =>
[searchProviderId] =>
[creditUserName] =>
[creditUrl] =>
[mediaDate] =>
[dataUrl] => http://xyz.com/p/101/sp/10100/playManifest/entryId/0_418igi6a/format/url/protocol/http
[plays] => 0
[views] => 0
[width] =>
[height] =>
[thumbnailUrl] => http://xyz.com/p/101/sp/10100/thumbnail/entry_id/0_418igi6a/version/0
[duration] => 0
[id] => 0_418igi6a
[name] => Testing
[description] => Kaltura Testing
[partnerId] => 101
[userId] => Alex
[tags] => testing
[adminTags] =>
[status] => 1
[type] => 1
[createdAt] => 1510903706
[rank] => 0
[totalRank] => 0
[votes] => 0
[groupId] =>
[partnerData] =>
[downloadUrl] => http://xyz.com/p/101/sp/10100/playManifest/entryId/0_418igi6a/format/download/protocol/http/flavorParamIds/0
[searchText] => PAR_ONLY 101 _MEDIA_TYPE_1| Testing testing Kaltura Testing
[licenseType] => -1
[version] => 0
[msDuration] => 0
[creatorId] => Alex
[categories] => video_category
[categoriesIds] => 9
[moderationStatus] => 6
[moderationCount] => 0
[updatedAt] => 1510903707
[replacementStatus] => 0
[partnerSortValue] => 0
[conversionProfileId] => 9
[rootEntryId] => 0_418igi6a
[operationAttributes] => Array
(
)

[entitledUsersEdit] => 
[entitledUsersPublish] => 
[entitledUsersView] => 
[capabilities] => 
[displayInSearch] => 1

)

Thanks

Hello @mahesh_kumar,

What version of CE are you using? If it’s an old one, please see:

Best approach would be to upgrade the entire platform but my reply there explains how you can upgrade only the mediainfo package to remedy this particular issue.

Hi Sir,
Is there any solution without updating the entire platform?
Is there any API for getting the Video duration using the Entry ID.
Only I want to get the Video Duration ,Please provide me any Rest Api or another solution to receive the Video Duration.

Thanks

The problem is not with the API. As you can see, the KalturaMediaEntry object does have a member called duration.
It is set to zero because of the mediainfo problem. Please read the post I linked to, it has all the answers and an explanation on how to upgrade.