Reputation: 10242
I'm working on a project where users can upload some private videos. I'm uploading them directly to S3 and distributing them via CloudFront. All is well and working but I've read that transcoding files would be also good because it can create smaller files, adapted for various user devices which also may lead to lower costs in delivering the content.
My question is the following. I decided to only allow users to upload mp4 since I don't know all formats and we need a fast alpha launched anyways. If they upload mp4 files would a transcoding job make sense or should I serve the original file regardless of the device used?
If a transcoder would make sense in this scenario, what would be the best presets for a transcoding job?
Honestly I'm perfectly fine with serving the original mp4 file to my users and I'm not really convinced that the extra S3 space taken by the transcoded files plus the transcoding price added would save me anything at all but I'm more about the user experience than saving a few extra bucks.
I've ran a test transcoder on a file with a mobile preset (iphone 4s) and created a (much)bigger file (3.2Gb vs 680Mb) so I really have no clue what am I doing.
Upvotes: 1
Views: 144
Reputation: 4083
The reasons for transcoding are:
Why do you care?
1) The original file may or may not work for users. People may upload a format or codec that is not widely supported. By transcoding (even into a simple mp4 as you suggested) you at least normalize the long tail of formats.
2) ABS formats such as HLS or Smooth may have 2 benefits. To the user, it means you are not forcing everyone to the lowest (or highest) common denominator of quality. If you choose a too high of a quality for your MP4 file, and serve that, users on low bandwidth or under-powered devices will get buffering and jittery experience. If you generate only a low bitrate/resolution version, users with great connections watching on their HD TV will see a bad quality video. ABS lets you generate several quality points and than in real time, the client adjusts to its actual conditions and chooses the best quality that it can play.
For you, ABS means that unlike progressive download UX (which you get with MP4), you only pay for the bandwidth that a user actually uses to watch your video, potentially saving you delivery cost. This is more important the longer your content is. For 60s videos, it will have less of an impact than for 90m of course. When playing an MP4 file,the client may end up downloading the entire file while the user stops watching 10% into the video. With HLS/Smooth, the client only buffers several chunks (~6-30 seconds worth).
3, Even if you are ok with MP4 (progressive DL UX), transcoding will let you control the size of the file. Just using the input file may produce very poor experience in several cases. Imagine I upload my GoPro 4K video, but I try to play that on my 4.0.0 Android device over 3g network... Transcoding to more reasonable bitrate/res will let you reach more users and provide better UX.
Upvotes: 2