ttezel / twit

Twitter API Client for node (REST & Streaming API)
4.31k stars 568 forks source link

Twitter API allows for video to be max 512mb/140s but Twit limits to 15mb/30s #461

Open pthieu opened 6 years ago

pthieu commented 6 years ago

Looking up the API specs: https://developer.twitter.com/en/docs/media/upload-media/uploading-media/media-best-practices.html

It states:

Video files must meet all of the following criteria:

Duration should be between 0.5 seconds and 30 seconds (sync) / 140 seconds (async)
File size should not exceed 15 mb (sync) / 512 mb (async)
Dimensions should be between 32x32 and 1280x1024
...

According to https://github.com/ttezel/twit/blob/master/lib/file_uploader.js#L6, Twit is limiting to 15mb.

Wondering if I'm just looking at the wrong file, but I'd like to use T.postMediaChunked to tweet videos as high as 512mb/140s.

Can @ttezel or anyone advise on a solution?

pietrop commented 6 years ago

@ttezel thanks for the great library!

And thanks @pthieu for raising this,

+1 @ttezel let me know is there's something we can help with in implementing this.

pthieu commented 6 years ago

@pietrop: I have a PR here https://github.com/ttezel/twit/issues/465

pietrop commented 6 years ago

ah, that's great! thanks @pthieu, fingers crossed @ttezel does not have strong objections, it seems like a pretty straightforward change :)