Large file cannot be finalized synchronously



I am facing issues while uploading 21 mb size video in chunks and then trying to call FINALIZE API and I am getting “Large file cannot be finalized synchronously.”

[request] => /1.1/media/upload.json
[error] => Large file can not be finalized synchronously.
[httpstatus] => 400
[rate] => stdClass Object
        [limit] => 615
        [remaining] => 614
        [reset] => 1542701949


Can you walk through the steps you took to upload the file? I assume you’re using the INIT, APPEND, FINALIZE process?


Yes, I already process INIT, APPEND steps then I perform FINALIZE step for upload the media on twitter.


Are you able to reproduce this behaviour using our large video upload sample?


I tried large video upload sample and I got below result.


Media ID: 1066287805037330432


4194304 of 22754848 bytes uploaded


8388608 of 22754848 bytes uploaded


12582912 of 22754848 bytes uploaded


16777216 of 22754848 bytes uploaded


20971520 of 22754848 bytes uploaded


22754848 of 22754848 bytes uploaded

Upload chunks complete.


{u’media_id’: 1066287805037330432, u’processing_info’: {u’check_after_secs’: 1, u’state’: u’pending’}, u’media_id_string’: u’1066287805037330432’, u’expires_after_secs’: 86400, u’media_key’: u’7_1066287805037330432’, u’size’: 22754848}

Media processing status is pending

Checking after 1 seconds


Media processing status is failed


Sounds like the video file may not meet the specifications. Can you share a link to a copy so we can take a look?


Hello Andy,

Thanks for quick reply and support.

This is the media like which I want to upload on Twitter :


Your video does not meet the media specifications. 3 minutes 5 seconds exceeds the max duration of 2 minutes 20 seconds.