Artur Carter

0 %
Zak Abdel-Illah
Automation Enthusiast
  • 📍 Location
    🇬🇧 London
Certifications
  • AWS Solutions Architect - Associate
Languages
  • Python
  • Go
Technologies
  • Ansible
  • Linux
  • Terraform
  • Kubernetes

Streaming a bike riders’ journey with AWS MediaLive

November 25, 2024

I want to showcase my bike journeys with live content from my GoPro and an overlay of my rough location on the stream. I’d like to use multiple GoPros mounted in different locations on my bike, with a ‘remote’ to switch between the main on-stream view with minimal effort.

Practical Considerations

When designing an approach, I had to consider:

  • Streaming over a mobile connection meant that there could be dead zones
    • I’d need to ensure that the stream runs consistently in the event of any outage, such as providing a “waiting for connection” loop footage
  • The battery life of all equipment could mean I need to carry a lot of backup power
  • Risk of theft and too much weight if I carried too much equipment.
  • Determining whether 4G was enough or if I required 5G.
    • Taking a look at what the bitrate of the GoPro in streaming mode is
  • Having a portable network that supports IPSec or OpenVPN to work with AWS-offered VPNs.
    • By adopting cloud computing, I don’t need to carry a computer with me or need to maintain a machine’s uptime for processing the video streams

AWS Components

  • Site-to-site or client VPN from the network that the GoPro is connected to into a VPC in AWS.
    • The VPC is located in the closest region to me to reduce latency.
    • As RTMP is unsecured, I need an alternative method to protect the stream in transit
  • Stream the GoPro footage into Elemental MediaLive RTMP Inputs
  • Send GPS updates from my mobile phone to API Gateway
    • AWS Batch or EC2 will generate overlay images
  • API Gateway and Lambda expose functions for my “remote” to control the stream.

The Technical Journey I’ll Undergo

Choosing the right equipment for the job

To start, I’ll be looking at the bigger picture and choosing the right physical equipment that covers my needs of a long lasting battery life, portable networking while having the least weight on the bike.

Exploring Configuration for IPSec & OpenVPN

I will explore the configuration of IPSec and OpenVPN for getting my GoPros into the AWS network.

Exploring MediaLive and the Elemental Suite

I’ll be investigating what MediaLive and the Elemental suite has to offer when it comes to streaming for my use-case and designing the optimal streaming pipeline for my rides.

Developing APIs for MediaLive and Exploring API Gateway

I will develop APIs for MediaLive and explore API Gateway for controlling the stream on the road. I’ll have to define the API specification and decide on the appropriate language to write the Lambda functions in.

Exploring AWS Batch or EC2 for On-Demand Element Rendering

To render overlay elements on the fly, I will explore AWS Batch or EC2. As the elemental suite doesn’t cover this specific case of on-screen graphics (to the customization level I want it), I’d need to explore the best tool for the job that scales well.

Determining Which Codecs to Adopt and Where to Stream To

Investigation into the best way to distribute my stream, in addition to conforming my MediaLive channel pipeline into the target

Storing All Configuration as Code

To ensure that the setup is reproducible and easy to maintain, I will store all the configuration as code using Terraform and Ansible.

I’ll also be travelling on a creative journey during the process, such as designing the graphics, choosing the best shots for the stream and improving the experience for the user.

Posted in AWS, CloudTags:
© 2020. All rights reserved
© 2024 All Rights Reserved. me@zai.dev