-
Start an EC2 machine
- OS: Amazon Linux
- Type:
t3.small
(or similar) - Instance Details: Default
- Disc: SSD GP2 30GB
- Security group
- Inbound
- 1935 0.0.0.0/0 TCP/UDP (SRT)
- 22 0.0.0.0/0 TCP (SSH)
- Outbound
- ALL 0.0.0.0/0
- Inbound
-
SSH into that machine:
ssh -i yourKey.pem ec2-user@EC2-IP`
- (optional) Install tmux
sudo yum install -y tmux
- Install
ffmpeg
in EC2
sudo yum -y update
sudo yum -y install git
git clone https://github.com/jordicenzano/ffmpeg-compile-centos-amazon-linux.git
cd ffmpeg-compile-centos-amazon-linux
./compile-ffmpeg.sh
- Install go
sudo yum install -y golang
- Install & Compile
go-ts-segmenter
cd ~
go get github.com/jordicenzano/go-ts-segmenter
cd go/src/github.com/jordicenzano/go-ts-segmenter
go get
make
Note: Next steps require to have en S3 bucket already configured. Strongly recommended use a bucket in the same region the EC2 machine is
- (Optional) From your laptop, upload some test media
scp -i ~/.ssh/KEY.pem test.mp4 ec2-user@IP:/home/ec2-user/test.mp4
- (Optional) Test with file
cd ~/go/src/github.com/jordicenzano/go-ts-segmenter/scripts
./transmuxed-file-to-s3.sh ~/test.mp4 S3BUCKET S3REGION
- (Optional) Test with srt
cd ~/go/src/github.com/jordicenzano/go-ts-segmenter/scripts
./transmuxed-srt-to-s3.sh live-dist-test us-east-1