Getting the status whether the transcoding has been completed or not

I want to know if kaltura provides any way to check if the processing for the uploaded video has been finished or not ?
Else is there any other way to determine that video the transcoding has been finished and ready to publish.

Hello @Arpit1596,

See https://github.com/kaltura/server/blob/Propus-16.2.0/alpha/lib/enums/entryStatus.php#L6
Every object that inherits from KalturaBaseEntry has a status member.
You can call baseEntry.get() to get the entry object and check its status.

Thanks for the response

I am try to upload the video by dividing it into chunks, but if the chunk upload fails I retry the upload for that chunk.

I get these logs -


20:10:59.369: error - chunk[4] upload failed, retrying again!! Retry attempt [2]

20:10:59.370: error - com.kaltura.client.types.APIException: java.net.SocketTimeoutException: timeout

20:11:04.372: debug - request [3bf0b414-fa74-4118-a65e-586977150f7a::uploadtoken.upload] url: http://cdnapi.kaltura.com/api_v3/service/uploadtoken/action/upload
body:
{“uploadTokenId”:“1_ac3d8beaab5b3f2630c64bf597d79867”,“resume”:true,“finalChunk”:false,“resumeAt”:1507200.0,“ignoreNull”:true,“format”:1,“clientTag”:“java:20-02-03”,“apiVersion”:“15.16.0”,“ks”:""}

20:13:52.821: debug - response [3bf0b414-fa74-4118-a65e-586977150f7a::uploadtoken.upload] body:
{“code”:“MISSING_MANDATORY_PARAMETER”,“message”:“Missing parameter “fileData””,“objectType”:“KalturaAPIException”,“args”:{“PARAM_NAME”:“fileData”}}

20:13:52.828: error - chunk[4] upload failed, retrying again!! Retry attempt [3]

20:13:52.828: error - com.kaltura.client.types.APIException: Missing parameter “fileData”

20:13:57.830: debug - request [7545dddc-4fb3-499d-9382-148e911b1f8d::uploadtoken.upload] url: http://cdnapi.kaltura.com/api_v3/service/uploadtoken/action/upload
body:
{“uploadTokenId”:“1_ac3d8beaab5b3f2630c64bf597d79867”,“resume”:true,“finalChunk”:false,“resumeAt”:1507200.0,“ignoreNull”:true,“format”:1,“clientTag”:“java:20-02-03”,“apiVersion”:“15.16.0”,“ks”:""}

20:16:47.560: debug - response [7545dddc-4fb3-499d-9382-148e911b1f8d::uploadtoken.upload] body:
{“code”:“MISSING_MANDATORY_PARAMETER”,“message”:“Missing parameter “fileData””,“objectType”:“KalturaAPIException”,“args”:{“PARAM_NAME”:“fileData”}}

20:16:47.561: error - chunk[4] upload failed, retrying again!! Retry attempt [4]

20:16:47.562: error - com.kaltura.client.types.APIException: Missing parameter “fileData”

20:16:52.563: debug - request [78b4c15d-0ee4-4ace-91ac-2c2f4a49c634::uploadtoken.upload] url:
body:
{“uploadTokenId”:“1_ac3d8beaab5b3f2630c64bf597d79867”,“resume”:true,“finalChunk”:false,“resumeAt”:1507200.0,“ignoreNull”:true,“format”:1,“clientTag”:“java:20-02-03”,“apiVersion”:“15.16.0”,“ks”:""}


First time it gives me socket timeout exception but from next time it starts giving me filedata parameter not found

I don’t know why this is giving this issue … on every retry I am passing the same stream and stream size.

UploadTokenService.UploadUploadTokenBuilder requestBuilder = UploadTokenService.upload(uploadTokenId, stream,
“application/octet-stream”, fileName, streamSize, resume, finalChunk, resumeAt);

Hello @Arpit1596,

First of all, you should never post your KS anywhere public. I removed it from your message.
Secondly, are you using this code? https://github.com/kaltura/kaltura-chunked-upload-test

If so, the last argument should be the path to your media file, not a stream.

Hi,
Thanks for your help and update, I will take care of it in the future.

I am taking file path from the user and converting it into FileInputstream and passing to kaltura api which takes in Inputstream, I don’t want to load full file into memory while uploading, so when I pass the stream reference and if it uploads successfully then it’s fine but if it fails even one time it starts giving filedata not found error.

This is what my request builder looks like:

UploadTokenService.UploadUploadTokenBuilder requestBuilder = UploadTokenService.upload(uploadTokenId, stream,
“application/octet-stream”, fileName, streamSize, resume, finalChunk, resumeAt);

here stream is the stream to filepath that I want to upload.

Thanks for your help.

Hi,
According to this code https://github.com/kaltura/kaltura-chunked-upload-test whenever the chunk is uploaded uploadedFileSize contains the value equal to the complete size of the file but it’s value should be number_of_chunks_uploaded*chunkSize

This means there is no effect of passing stream size here in the below function:

UploadTokenService.UploadUploadTokenBuilder requestBuilder = UploadTokenService.upload(uploadTokenId, stream,
“application/octet-stream”, fileName, streamSize, resume, finalChunk, resumeAt);

Is there anything that I am doing in a wrong way?