Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

What algorithm does YouTube follow to convert between different formats? Does YouTube store different videos (for different formats) on disk or store only 1 and convert from this to appropriate format as requested?

share|improve this question
    
Your title and your question are different. Are you specifically asking about resampling (i.e. downscaling/upscaling) algorithms, or transcoding (converting from whatever format you uploaded to whatever format they then serve)? –  user1118321 Aug 24 at 20:14

1 Answer 1

Youtube stores whatever you upload and transcodes to other formats using their own versions of multiple compression formats including h.264 and webm. All transcodes go from the same original file that you upload and are stored after transcoding. Youtube may change the options used from time to time and save new encodes of the video. Encodes are generally pre-rendered upon upload and then used from disk as far as I can tell.

share|improve this answer
    
They are always pre-rendered. On-demand renderings costs way too much, processing time costs a lot of money in server terms. Disk space is very cheap. –  Professor Sparkles Aug 22 at 21:47
    
@ProfessorSparkles - they could still theoretically on-demand encode a version when first used and then save it. I don't believe they do this, but they also don't publish a lot of their process from anything I've seen. –  AJ Henderson Aug 22 at 23:26
    
Well it would take up considerably more resources if you take into account that this would have to happen millions of times per day essentially making YouTube one huge ass live streaming site for mostly a single viewer per stream that also streams in a lot of different formats which aren't all that suited for this task. Encoding them in the background with unused resources is much much more cost effective. But yes in theory its something that would be possible but I highly doubt it happens in practice, its just costs too much money to make sense. –  Professor Sparkles Aug 22 at 23:41
    
@ProfessorSparkles - I don't want to stray in to a discussion, but that's just it, until someone views a video, you don't know what they want to view. You can either encode up front for something that someone may or may not ever need or you can encode the first time someone uses it. It doesn't cost any more to encode it the first time it is used than it does to encode it before someone uses it as long as you are running preemptive encodings whenever the encoders aren't busy. It would be much more complex to build something to allocate the processing, but it would be more efficient. –  AJ Henderson Aug 23 at 0:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.