Uploading large files to the Cinebody cloud faster
1. Why multipart?
Smartphones now have high-quality cameras that film massive clips. That means users are trying to send massive files over a not-so-massive connection. This causes reliability issues because clips may fail part-way through. Multipart improves reliability for clips by breaking them into chunks that can be sent individually and packaged back into a single clip in the cloud.
2. How does multipart work?
1. Film clip in Cinebody app OR Upload manually from camera roll
2. App makes API call for a signed multipart URL. (/projects/:projectId/Upload)
3. API responds with chunk size in Bytes and the URLs that each chunk will be uploaded to
4. App breaks original file into chunks (via our custom-built clip handler)
5. App begins uploading chunks & calls API when finished (/projects/:projectId/clipCompleteUpload)
6. API packages clips into a single clip, transcodes, & stores in S3
NOTE: The manual upload workflow contains an extra step where the clip must be exported from the user's camera roll into a Cinebody folder locally on the user's phone. This step often takes longer than the entire upload & chunking process
3. What are the technical limitations & things users should know?
Users need ample storage: iPhone video files are larger than you think. EX: a 10-minute 4K @ 60FPS clip is 4.26GB. Users can check storage at Settings > General > iPhone Storage. Note: if a user goes past their storage amount during clip filming, it will register the full storage of the clip they were filming.
Battery Life: Operating the camera takes the most processing power of any iPhone operation. Make sure that if you are filming a long clip that you have full battery. If you hit 20% or 10% battery warning, your clip will stop filming.
Clip prep: There is a period of prep time when the app saves a large clip and breaks the files into chunks. For small files, this is nearly unnoticeable. For large files, especially when filmed in app, users will see the gray arrow icon on the clip being prepped.
4. Clip Icons & Feedback
Gray arrow - your clip is in the queue for upload
Blue arrow - your clip is currently being broken up for multipart upload
Blue square - your clip is currently uploading
Green checkmark- your clip has successfully uploaded.
Orange arrow - your clip lost connection during finalization, tap to retry when you have a stronger connection
Red exclamation point - your clip upload failed, likely due to corruption during filming. Tap to retry.
4. Example upload times (ongoing)
Total time: 7 minutes
- Multipart breakup time: <1 min
- Time to upload from app: 2 mins
- Time to transcode for preview: 5 mins
Web (339 Mbps up):
2.72GB // clip from desktop | Total time: 4 mins
App WIFI (340 Mbps up) CELLULAR (24 Mbps up):
1GB // 4k @ 30FPS // Upload // WiFi (iPhone 12 Mini) | Total time: 7 minutes,
1GB // 4k @ 30FPS // Filmed // Cellular (iPhone 13 Pro) | Total time: 2 mins
1GB // 4k @ 30FPS // Upload // Cellular (iPhone 13 Pro) | Total time: 18 mins
Enhancements:
Version 3.9.0