Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 1.19 KB

README.md

File metadata and controls

23 lines (14 loc) · 1.19 KB

Demo of using ffmpeg from Go

Build and Test

This demo specifically shows how we can supply input and obtain output via using input and output pipes to ffmpeg.

This demo has been verified to be able to create a thumbnail of an image on MacOS, Linux and Windows Server 2019 and 2022. See the GitHub workflow runs if you want to learn more.

Implementation

See thumbnail.go for the execution of ffmpeg.

The need for a separate goroutine to write data to the standard input

Improvements

  • Use context to ensure that we don't wait for ever for ffmpeg to complete. See this commit for one way to do so. I removed the change to simply this demo itself.
  • Update test to verify the dimensions of the thumbnail to be created