I am prototyping a simple Twilio SMS workflow:
- Inbound MMS from customer (Video media is automatically stored to S3 Twilio CDN)
- Outbound MMS to client team with MediaUrl from S3.
The inbound MMS media is typically a video sent and recorded via iPhone and it's being stored automatically in S3 as <ContentType>video/3gpp</ContentType>
. The result is that when Step 2 above occurs the quality of the media is severely degraded.
I've tried testing an Inbound MMS video file sent as H.264 (knowing that H.264 is compatible in most browsers) but it seems to still be stored into S3 as a <ContentType>video/3gpp</ContentType>
.
Has anyone encountered this issue and found a solution? Hoping for one that doesn't required a 3rd party API but understand if that might not be possible.
I reached out to Twilio support and was provided the response below. Sharing in case it might be helpful to anyone else facing a similar problem.
tl;dr video files are transcoded at the handset/carrier, not by Twilio. This is currently a constraint you have to work around.
For videos received as video/3GPP Twilio unfortunately does not have the functionality to passed the files as different media types because Twilio does not transcode incoming video files. If this ever happens, it occurs at the handset and/or carrier side. Currently, the media would need to be downloaded and converted into a different file type if this is needed. Twilio automatically stores files in the 3GPP format when they are received from our carrier partners. While it is possible a phone or carrier may converts media to 3GPP before hitting our platform, if you are sending MPEG-4, then likely this is not being converted by your phone itself. If you want to send a video with a better quality, you may consider to send it with the Twilio API for WhatsApp. You can send image, videos, text and PDF files up to 5 mb in size over WhatsApp. There are however a few differences between MMS and WhatsApp media messages. You can only send media messages to WhatsApp users if you have an active messaging ‘session’ with them. Messaging sessions are created when a user responds to a template message you send them, or starts a conversation by messaging your number on WhatsApp, and stay active for 24 hours after the last message they send you. WhatsApp media messages also do not support some file types that MMS does. You can read more about file type support in the FAQs.