I’m trying to upload a 3gig video with Chunk upload API written in python, But it seems that kaltura is only picking up the first chunk and transcoding it. The piece of code is mentioned below. Thanks in advance.
upload_token = KalturaUploadToken()
result = client.uploadToken.add(upload_token)
for chunkDATA in chunkfiles:
if(i <= count):
resume = False if i == 0 else True
finalChunk = True if i == count else False
resumeAt = readsum # -1 if i == count else readsum
numread=os.path.getsize(progressdir + ‘/’ + chunkDATA)
with open(progressdir + ‘/’ + chunkDATA) as uploadDATA:
upload_result = client.uploadToken.upload(str(result.id), uploadDATA, resume, finalChunk, resumeAt)
I don’t see where in your code the count var is first initialised?
Please provide a full code sample and also the version of the Python client being used.
Adding some debug prints to make sure the loop actually iterates over all chunkfiles and looking at the requests being made on the server side will also be helpful.
As reference, you can see a full implementation that uses the Java client here:
This can be run from CLI.
The more relevant code for this operation is here: