Large file cannot be finalized synchronously

media-upload

#1

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
    )

#2

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


#3

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


#4

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


#5

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

INIT

Media ID: 1066287805037330432

APPEND

4194304 of 22754848 bytes uploaded

APPEND

8388608 of 22754848 bytes uploaded

APPEND

12582912 of 22754848 bytes uploaded

APPEND

16777216 of 22754848 bytes uploaded

APPEND

20971520 of 22754848 bytes uploaded

APPEND

22754848 of 22754848 bytes uploaded

Upload chunks complete.

FINALIZE

{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

STATUS

Media processing status is failed


#6

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


#7

Hello Andy,

Thanks for quick reply and support.

This is the media like which I want to upload on Twitter : https://visibly-staging.s3.eu-west-2.amazonaws.com/pirates_com/1/Lonely+(Khiladi+786)(HQ+PC+Android+vid)-f34c88a4-255e-55ff-ea30-51bec0e1ede4.mp4


#8

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