Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
/ encode-video Public archive

A Redis-driven ffmpeg based batch video transcoder using S3-like APIs.

Notifications You must be signed in to change notification settings

ystv/encode-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

encode-video

A go service, with both worker / server configurations available that handles batch video transcoding. Currently just a test project.

Dependencies

  • Redis (global)
  • ffmpeg (worker)
  • s3-like endpoint (worker)

Server

go run main.go server

Runs a HTTP server listening on port 8082 accepting json encoded video encode requests at endpoint /encode_video.

Worker

go run main.go worker

Will process video encode requests then copy the file over to the CDN.

In action

Currently there is just the aforementioned HTTP endpoint to provide encode requests. For giving this project a whirl you can have an instance of a server and worker running, Redis and something S3-like, store a video file on it like what is in the example and run this curl command to operate:

curl -d @single.json -X POST http://localhost:8082/encode_video

There is also the option to do encode multiple files in one request with this query:

curl -d @single.json -X POST http://localhost:8082/encode/multi

Endpoints

  • [POST] /encode/single create a video encode request. Accepts payload object json and returns task UUID.
  • [POST] /encode/multi create multiple encode requests. Accepts payload array json and returns first task UUID.
  • [GET] /pending view jobs that haven't been accepted by a worker.
  • [GET] /status?uuid=[task uuid] view task status.

About

A Redis-driven ffmpeg based batch video transcoder using S3-like APIs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages