All Projects → diego3g → gcloud-node-video-transcoding

diego3g / gcloud-node-video-transcoding

Licence: other
📹🔥 Transcode Google Cloud Storage video files with Node.js and FFmpeg

Programming Languages

typescript
32286 projects
Dockerfile
14818 projects

Google Cloud Node.js video transcoder

Use Google Cloud Storage, Pub/Sub and App Engine to transcode videos to many resolutions.

🔥 Setup

  • Clone the app:
git clone https://github.com/diego3g/gcloud-node-video-transcoding.git
  • Install all dependencies:
yarn
yarn lerna bootstrap
gcloud auth login
  • Setup a Google Cloud Project;
  • Setup GOOGLE_APPLICATION_CREDENTIALS environment variable following https://cloud.google.com/docs/authentication/getting-started?hl=pt-br
  • Create origin and destination bucket inside Google Cloud Storage;
  • Create a topic inside Pub/Sub called jupiter;
  • Setup Google Cloud Storage notification to new topic, so every file uploaded to bucket will publish a message to the queue:
gsutil notification create -t jupiter -f json -e OBJECT_FINALIZE gs://ORIGIN_BUCKET_NAME

Replace ORIGIN_BUCKET_NAME with your origin bucket name :)

  • To see all the notifications:
gsutil notification list gs://ORIGIN_BUCET_NAME
const destinationBucket = storage.bucket('DESTINATION_BUCKET_NAME');
  • Run main application:
yarn dev:main
  • Run worker application (in another terminal):
yarn dev:worker
  • Upload .mp4 file to ORIGIN bucket and monitor logs via:
gcloud app logs tail -s default
gcloud app logs tail -s worker

📝 License

This project lives under MIT License. See LICENSE for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].