SlideShare ist ein Scribd-Unternehmen logo
1 von 180
Video Transcoding
at Scale for ABC iview
Daphne Chong
@daphnechong
metro
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
What changes
are we making?
High speed
Medium speed
Low speed
Standard
Encoding
H.264 MP4
Transcoding
Example
Step 1: Prepare watermark
Step 1: Prepare watermark
Step 1: Prepare watermark
Step 2: Input video (GXF)
Step 3: Asymmetrical cropping
Step 4: Scale and set aspect ratio
Step 5: Apply watermark
Step 6: Ready to stream
1500k
other rendition sizes
1000k
650k
500k
220k
audio only
Original file audio track
Previous transcoder audio track
After audio normalisation
That’s a lot of
changes...
Transcoding
Profiles
GXF, ABC1
Profile:
- Renditions (6)
- Crop
- Normalise audio
- Adjust ratio
- Add watermark
- GXF to MP4
GXF, ABC1
GXF, ABC1
MOV, Arts
Profile:
- Renditions (6)
- Adjust ratio
- ProRes MOV to MP4
GXF, ABC1
MOV, Arts
What is this
“Magic Video Software”
you speak of?
./ffmpeg -i utopia.gxf utopia.mp4
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
./ffmpeg -i INPUT -c:v libx264 -filter_complex
"[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma
in], [1:v]scale=54:-1[ovrl],
[main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44
" -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p
-profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a
libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1]
amerge=inputs=2,
dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar
44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart
-threads 0 -y OUTPUT
In reality, it looks like this
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
Cost
Scale
Flexibility
Cost
Scale
Flexibility
thesupercarkids.com
mini-me.com
Cost
Scale
Flexibility
“The Cloud”
Cost
Scale
Flexibility
Cost
Scale
Flexibility
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
Source
Queue
Process
Transfer
Notify
8 minutes 27 seconds
Original
length
Time to produce rendition
60 min
7 min
42 min
Lowest
(audio)
Highest
(1500k)
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
Languages:
Node.js
Go
Node.js
Existing team experience
Rapid development for APIs
Untyped. Sadface.
Go
Typed and compiled
Cross-platform
Easy deployment
Learning curve
Infrastructure:
EC2, SQS, S3, SNS,
Dynamo / RDS,
Cloudformation
AWS - EC2
Autoscaling
AWS - SQS
Simple Queuing
System
SQS
First in first out (FIFO)
Single consumer per message
Message has “visibility timeout”
Adjustable visibility timeout
AWS - S3
File Storage
AWS - DynamoDB
AWS - DynamoDB
AWS - DynamoDB
AWS - MySQL on RDS
DynamoDB
NoSQL
Key-value pair storage
Pay for number of records/sec read
DynamoDB
Our use case was not optimal
Manual aggregations
Higher cost than expected
Doesn’t scale automatically
MySQL
Switched to MySQL on RDS
Managed hosting
Aggregations!
Data structure ported as-is
AWS Cloudformation
"ExampleLoadBalancer" : {
"Type" : "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties" : {
"AvailabilityZones" : [ "us-east-1a", "us-east-1b" ],
"Listeners" : [ {
"LoadBalancerPort" : "80",
"InstancePort" : "8081",
"Protocol" : "HTTP"
} ]
}
}
Node.js + Go
AWS Infrastructure
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
When should
you scale?
Scaling Considerations
Hourly billing
Instance size: Cost vs Speed
Content priority
Ad-hoc requests
Varied content length
Scaling Considerations:
AWS limitations
AWS scaling metrics can be slow
No automatic off switch
Can’t choose instances to scale down
(Instance protection now available)
MVP:
Don’t make things wait
too long
MVP:
Supply enough
capacity at all times
MVP:
Driven by drop folders
GXF, ABC1
Profile:
- Renditions (2)
- Crop
- Normalise audio
- Adjust ratio
- Add watermark
- GXF to MP4
var autoscaling = new AWS.AutoScaling(...);
var params = {
AutoScalingGroupName: groupName,
DesiredCapacity: capacity
Some white text
};
autoscaling.setDesiredCapacity(params, ...);
var autoscaling = new AWS.AutoScaling(...);
var params = {
AutoScalingGroupName: groupName,
DesiredCapacity: capacity
Some white text
};
autoscaling.setDesiredCapacity(params, ...);
Amazon Machine
Images (AMIs)
Which instance size?
Time vs Cost
for 1 hour of content
Time Cost
?
Winner:
c4.xlarge
Up: step scaling
Down: stop everything
An interesting puzzle :)
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
24 hours in
Transcoding
(10am - 10am)
$57.22
$42.86
US Dollars
EC2 Instances: $34.31
EC2 (other): $ 4.24
RDS: $ 2.66
S3: $ 1.65
SQS: $ 0.00
Total (USD): $42.86
Transcoding costs: 24 hrs
Next 24 hours
Approx 70% of the volume
$34.63
Australian Dollars
One year’s costs?
$16.5k
Australian Dollars
$12.5k
US Dollars
This is a BIG deal!
thesupercarkids.com
bikesandbeyond.ca
8 minutes 27 seconds
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
AWS & throughput
optimisations
Transcoding in
chunks/segments
Introspection &
Validation
GXF, ABC1
Profile:
- Crop
- Normalise audio
- Adjust ratio
- Add watermark
- GXF to MP4
ffprobe
1. What is Transcoding?
2. Why build our own system?
3. Architecture
4. Technology choices
5. Autoscaling transcoders
6. Costs
7. Future roadmap
Summary
8 minutes 27 seconds
@daphnechong
Thanks!
Q&A

Weitere ähnliche Inhalte

Was ist angesagt?

Compare Performance-power of Arm Cortex vs RISC-V for AI applications_oct_2021
Compare Performance-power of Arm Cortex vs RISC-V for AI applications_oct_2021Compare Performance-power of Arm Cortex vs RISC-V for AI applications_oct_2021
Compare Performance-power of Arm Cortex vs RISC-V for AI applications_oct_2021
Deepak Shankar
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
Sasha Goldshtein
 
Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF Superpowers
Brendan Gregg
 

Was ist angesagt? (19)

Compare Performance-power of Arm Cortex vs RISC-V for AI applications_oct_2021
Compare Performance-power of Arm Cortex vs RISC-V for AI applications_oct_2021Compare Performance-power of Arm Cortex vs RISC-V for AI applications_oct_2021
Compare Performance-power of Arm Cortex vs RISC-V for AI applications_oct_2021
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
 
Early Results of OpenMP 4.5 Portability on NVIDIA GPUs & CPUs
Early Results of OpenMP 4.5 Portability on NVIDIA GPUs & CPUsEarly Results of OpenMP 4.5 Portability on NVIDIA GPUs & CPUs
Early Results of OpenMP 4.5 Portability on NVIDIA GPUs & CPUs
 
Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
 
The Joy of Server Side Swift Development
The Joy  of Server Side Swift DevelopmentThe Joy  of Server Side Swift Development
The Joy of Server Side Swift Development
 
OpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel ComputingOpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel Computing
 
Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF Superpowers
 
Odsc workshop - Distributed Tensorflow on Hops
Odsc workshop - Distributed Tensorflow on HopsOdsc workshop - Distributed Tensorflow on Hops
Odsc workshop - Distributed Tensorflow on Hops
 
JavaOne 2015 Java Mixed-Mode Flame Graphs
JavaOne 2015 Java Mixed-Mode Flame GraphsJavaOne 2015 Java Mixed-Mode Flame Graphs
JavaOne 2015 Java Mixed-Mode Flame Graphs
 
Atlanta Spark User Meetup 09 22 2016
Atlanta Spark User Meetup 09 22 2016Atlanta Spark User Meetup 09 22 2016
Atlanta Spark User Meetup 09 22 2016
 
Onnc intro
Onnc introOnnc intro
Onnc intro
 
November 2014 HUG: Apache Pig 0.14
November 2014 HUG: Apache Pig 0.14 November 2014 HUG: Apache Pig 0.14
November 2014 HUG: Apache Pig 0.14
 
計算機性能の限界点とその考え方
計算機性能の限界点とその考え方計算機性能の限界点とその考え方
計算機性能の限界点とその考え方
 
DockerCon EU '17 - Dockerizing Aurea
DockerCon EU '17 - Dockerizing AureaDockerCon EU '17 - Dockerizing Aurea
DockerCon EU '17 - Dockerizing Aurea
 
Scaling TensorFlow with Hops, Global AI Conference Santa Clara
Scaling TensorFlow with Hops, Global AI Conference Santa ClaraScaling TensorFlow with Hops, Global AI Conference Santa Clara
Scaling TensorFlow with Hops, Global AI Conference Santa Clara
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUsScaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
 
Fluency - Yet another fluent logger
Fluency - Yet another fluent loggerFluency - Yet another fluent logger
Fluency - Yet another fluent logger
 
Introduction to SLURM
Introduction to SLURMIntroduction to SLURM
Introduction to SLURM
 

Ähnlich wie Video Transcoding at Scale for ABC iview (NDC Sydney)

Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
Ontico
 
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Naoki (Neo) SATO
 
Streaming ML on Spark: Deprecated, experimental and internal ap is galore!
Streaming ML on Spark: Deprecated, experimental and internal ap is galore!Streaming ML on Spark: Deprecated, experimental and internal ap is galore!
Streaming ML on Spark: Deprecated, experimental and internal ap is galore!
Holden Karau
 

Ähnlich wie Video Transcoding at Scale for ABC iview (NDC Sydney) (20)

What’s new in Visual C++
What’s new in Visual C++What’s new in Visual C++
What’s new in Visual C++
 
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them AllScylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
 
Nodejs性能分析优化和分布式设计探讨
Nodejs性能分析优化和分布式设计探讨Nodejs性能分析优化和分布式设计探讨
Nodejs性能分析优化和分布式设计探讨
 
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation CenterDUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
 
IxVM on CML
IxVM on CMLIxVM on CML
IxVM on CML
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 
XDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @CloudflareXDP in Practice: DDoS Mitigation @Cloudflare
XDP in Practice: DDoS Mitigation @Cloudflare
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGI
 
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
Deep Learning, Microsoft Cognitive Toolkit (CNTK) and Azure Machine Learning ...
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
 
Dpdk performance
Dpdk performanceDpdk performance
Dpdk performance
 
Node.js - Advanced Basics
Node.js - Advanced BasicsNode.js - Advanced Basics
Node.js - Advanced Basics
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
 
Load testing with Blitz
Load testing with BlitzLoad testing with Blitz
Load testing with Blitz
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
 
Streaming ML on Spark: Deprecated, experimental and internal ap is galore!
Streaming ML on Spark: Deprecated, experimental and internal ap is galore!Streaming ML on Spark: Deprecated, experimental and internal ap is galore!
Streaming ML on Spark: Deprecated, experimental and internal ap is galore!
 
Doing QoS Before Ceph Cluster QoS is available - David Byte, Alex Lau
Doing QoS Before Ceph Cluster QoS is available - David Byte, Alex LauDoing QoS Before Ceph Cluster QoS is available - David Byte, Alex Lau
Doing QoS Before Ceph Cluster QoS is available - David Byte, Alex Lau
 
Quic illustrated
Quic illustratedQuic illustrated
Quic illustrated
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Video Transcoding at Scale for ABC iview (NDC Sydney)

  • 1. Video Transcoding at Scale for ABC iview Daphne Chong @daphnechong
  • 2.
  • 3.
  • 4.
  • 6. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 7. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 8.
  • 10.
  • 11.
  • 15. Step 1: Prepare watermark
  • 16. Step 1: Prepare watermark
  • 17. Step 1: Prepare watermark
  • 18. Step 2: Input video (GXF)
  • 20. Step 4: Scale and set aspect ratio
  • 21. Step 5: Apply watermark
  • 22. Step 6: Ready to stream 1500k
  • 27. That’s a lot of changes...
  • 29. GXF, ABC1 Profile: - Renditions (6) - Crop - Normalise audio - Adjust ratio - Add watermark - GXF to MP4
  • 31. GXF, ABC1 MOV, Arts Profile: - Renditions (6) - Adjust ratio - ProRes MOV to MP4
  • 33. What is this “Magic Video Software” you speak of?
  • 34.
  • 36. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 37. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 38. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 39. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 40. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 41. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 42. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 43. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 44. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 45. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 46. ./ffmpeg -i INPUT -c:v libx264 -filter_complex "[0:v]crop=720:576:0:32,yadif,scale=1024x576,setdar=16/9[ma in], [1:v]scale=54:-1[ovrl], [main][ovrl]overlay=main_w-overlay_w-47:main_h-overlay_h-44 " -crf 22 -maxrate 1404k -bufsize 1500k -pix_fmt yuv420p -profile:v high -level 4.0 -refs 3 -r 25 -g 50 -c:a libfdk_aac -b:a 96k -filter_complex "[0:a:0][0:a:1] amerge=inputs=2, dynaudnorm=f=500:g=31:p=0.82:m=30.0:r=0.0:s=0.0 [aout]" -ar 44100 -ac 2 -map 0:0 -map "[aout]" -movflags +faststart -threads 0 -y OUTPUT In reality, it looks like this
  • 47.
  • 48. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 49. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 52.
  • 53.
  • 57.
  • 60.
  • 62. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 63. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80. 8 minutes 27 seconds
  • 81. Original length Time to produce rendition 60 min 7 min 42 min Lowest (audio) Highest (1500k)
  • 82.
  • 83. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 84. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 86.
  • 87.
  • 88. Node.js Existing team experience Rapid development for APIs Untyped. Sadface.
  • 89.
  • 90. Go Typed and compiled Cross-platform Easy deployment Learning curve
  • 91. Infrastructure: EC2, SQS, S3, SNS, Dynamo / RDS, Cloudformation
  • 93.
  • 94.
  • 95. AWS - SQS Simple Queuing System
  • 96.
  • 97. SQS First in first out (FIFO) Single consumer per message Message has “visibility timeout” Adjustable visibility timeout
  • 98. AWS - S3 File Storage
  • 99.
  • 102. AWS - DynamoDB AWS - MySQL on RDS
  • 103.
  • 104. DynamoDB NoSQL Key-value pair storage Pay for number of records/sec read
  • 105. DynamoDB Our use case was not optimal Manual aggregations Higher cost than expected Doesn’t scale automatically
  • 106. MySQL Switched to MySQL on RDS Managed hosting Aggregations! Data structure ported as-is
  • 108.
  • 109. "ExampleLoadBalancer" : { "Type" : "AWS::ElasticLoadBalancing::LoadBalancer", "Properties" : { "AvailabilityZones" : [ "us-east-1a", "us-east-1b" ], "Listeners" : [ { "LoadBalancerPort" : "80", "InstancePort" : "8081", "Protocol" : "HTTP" } ] } }
  • 110.
  • 111. Node.js + Go AWS Infrastructure
  • 112. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 113. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 114.
  • 116. Scaling Considerations Hourly billing Instance size: Cost vs Speed Content priority Ad-hoc requests Varied content length
  • 117. Scaling Considerations: AWS limitations AWS scaling metrics can be slow No automatic off switch Can’t choose instances to scale down (Instance protection now available)
  • 118.
  • 119. MVP: Don’t make things wait too long
  • 122. GXF, ABC1 Profile: - Renditions (2) - Crop - Normalise audio - Adjust ratio - Add watermark - GXF to MP4
  • 123.
  • 124.
  • 125.
  • 126.
  • 127.
  • 128. var autoscaling = new AWS.AutoScaling(...); var params = { AutoScalingGroupName: groupName, DesiredCapacity: capacity Some white text }; autoscaling.setDesiredCapacity(params, ...);
  • 129. var autoscaling = new AWS.AutoScaling(...); var params = { AutoScalingGroupName: groupName, DesiredCapacity: capacity Some white text }; autoscaling.setDesiredCapacity(params, ...);
  • 132. Time vs Cost for 1 hour of content Time Cost ?
  • 134. Up: step scaling Down: stop everything
  • 135.
  • 136.
  • 137.
  • 138.
  • 139.
  • 141. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 142. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 145. $57.22
  • 147. EC2 Instances: $34.31 EC2 (other): $ 4.24 RDS: $ 2.66 S3: $ 1.65 SQS: $ 0.00 Total (USD): $42.86 Transcoding costs: 24 hrs
  • 148. Next 24 hours Approx 70% of the volume
  • 153. This is a BIG deal!
  • 156. 8 minutes 27 seconds
  • 157.
  • 158. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 159. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 161.
  • 162.
  • 164.
  • 166. GXF, ABC1 Profile: - Crop - Normalise audio - Adjust ratio - Add watermark - GXF to MP4
  • 168.
  • 169.
  • 170.
  • 171. 1. What is Transcoding? 2. Why build our own system? 3. Architecture 4. Technology choices 5. Autoscaling transcoders 6. Costs 7. Future roadmap
  • 173.
  • 174.
  • 175.
  • 176.
  • 177. 8 minutes 27 seconds
  • 178.
  • 180. Q&A