What MIME types does Twitter accept for video?



Hello, I do not see this documented anywhere. What MIME types does Twitter accept in the API for video uploads?

This page doesn’t list accepted MIME types https://dev.twitter.com/rest/reference/post/media/upload-init.html


This article suggests that .mp4 and .mov (mobile only) are accepted on native Twitter (Twitter.com). Does this hold true for the API as well?

Are both .mp4 and .mov files accepted in the API?


MP4 is the primary format we support for the media upload API. MOV may work if the correct codecs and encoding is used, but this is not strictly a target format and you will generally be better using MP4 where possible.


Ok. Thank you Andy. Given that, my followup question would be, any suggestions on how to handle uploading video to the API from IOS devices then? Given that the default video format for IOS is .mov.


MOV and MP4 are in most ways the same format (MOV is basically Apple’s “custom” version of MP4). If you capture a video using the built-in camera on iOS, you should be able to upload it via API without a problem; are you having issues doing so?


Ok, thank you. No we have not tried this yet. However, this was not documented at all in API documentation. So we wanted to inquire here.

This is helpful to know. We will move forward with allowing .MOV uploads and report back if we experience any issues. Thank you.


Thanks for the feedback - I’ll make a note that we should make this more clear in the documentation.


Hijacking this for a somewhat related question (sorry), on the media upload documentation for video files, it says that some constraints might depend on the mime type of the video file.

I’m trying to upload an mp4 file, and the twitter website says it allows 1920x1080 resolution for mp4, but when I try to upload it, it’s giving me the error that the resolution is too high, and gives the max resolution listed on the media docs.

Is there any other mime type that would allow me to upload the 1920x1080 resolution video file that I could upload on the twitter website? Or any way to upload that resolution with the mp4 type?

Thanks so much!