Skip to content

Latest commit

 

History

History
81 lines (67 loc) · 1.87 KB

File metadata and controls

81 lines (67 loc) · 1.87 KB

Video Transcoding Service

Examples

  • Youtube
  • Udemy
  • Unacdemy
graph LR;
A[Teacher]-- Upload --> B[Video]
C[Student]-- Request <-->B
Loading
graph LR;
A[Teacher] -- Hey Lambda Function I want to upload 10 videos --> λ
λ -- Returns Signed URL Of S3 bucket -->A
Loading
  • Now Teacher If Authorised
  • Now a S3 Temporary Bucket is formed using Signed URL
graph LR; 
A[TEACHER]--Uploading 10 videos -->B[S3 Temprary Bucket]
Loading
  • An EventBridge set up is present on this Bucket
graph LR;
A[EventBridge]--Triggers a lambda function -->λ
λ-->X[Queue Jobs] 
Loading
  • Let's say Queue job has 5 video processing limit
graph LR;
A[Queue Jobs]--5 Jobs-->B[Video Processing]
Loading
  • Now Video Processing is done by Lambda Function
  • Redis Based Queue is used to store the jobs
  • Now lets say we have 5 lambda functions
  • Each lambda function can process 5 videos at a time
  • So we can process 25 videos at a time
graph LR;
A[Queue Jobs]--5 Jobs-->B[Video Processing :Consumer]
Loading
graph LR;
    A[Consumer] --> B[Redis:No. of video is processing=0]
    B -- 0 vides processing <-->A
    A-- 5 jobs from queue -->B
    X[5 AWS -ECS Containers]-- 5 jobs from queue -->X
    C1[AWS ECS Bucket 1:ubuntu running in this bucket]
    C2[AWS ECS Bucket 2:ubuntu running in this bucket]
    C3[AWS ECS Container 3:ubuntu running in this bucket]
    C4[AWS ECS Container 4:ubuntu running in this bucket]
    C5[AWS ECS Container 5:ubuntu running in this bucket]
    C1 --> Y[FFMPEG:1080,720,480,360,240,144]
    C2 --> Y    
    C3 --> Y
    C4 --> Y
    C5 --> Y
    Y -->ZZ[Storage Bucket]
Loading
  • Now temporary bucket is deleted
  • FFMPEG stands for Fast Forward Moving Picture Experts Group