WIP
Inspired by Goffmpeg package
- OS X
- Linux
- Windows
go get github.com/Nks/go-gcs-ffmpeg
or run
./gcs-transcoder -source=test/example.mp4 -output=test/stream -storage=your-bucket-name
Check main.go
for the examples.
- 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
- 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 bevideo/mp2t