Skip to content

Nks/go-gcs-ffmpeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIP

GCSFfmpeg

Inspired by Goffmpeg package

Dependencies

Supported platforms

  • OS X
  • Linux
  • Windows

Getting started

go get github.com/Nks/go-gcs-ffmpeg

or run

./gcs-transcoder -source=test/example.mp4 -output=test/stream -storage=your-bucket-name

Examples

Check main.go for the examples.

FAQ

  1. CORS settings for GCS:

Create cors.json file:

[
  {
    "origin": [
      "https://example.com"
    ],
    "responseHeader": [
      "Content-Type"
    ],
    "method": [
      "GET",
      "HEAD",
      "DELETE"
    ],
    "maxAgeSeconds": 3600
  }
]

Run command: gsutil cors set cors.json gs://your-gcs-bucket

  1. Why HLS files downloading instead of playing?
  • Check Content-Type for your files. You should set content type for the m3u8 and ts files. .m3u8 files should be application/vnd.apple.mpegurl and .ts files should be video/mp2t

About

Pure FFMPEG wrapper written in GO with support GCS upload

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages