Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diego3g/gcloud-node-video-transcoding
📹🔥 Transcode Google Cloud Storage video files with Node.js and FFmpeg
https://github.com/diego3g/gcloud-node-video-transcoding
Last synced: 8 days ago
JSON representation
📹🔥 Transcode Google Cloud Storage video files with Node.js and FFmpeg
- Host: GitHub
- URL: https://github.com/diego3g/gcloud-node-video-transcoding
- Owner: diego3g
- Created: 2019-12-27T15:47:16.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T01:02:07.000Z (almost 2 years ago)
- Last Synced: 2024-10-23T07:52:13.437Z (16 days ago)
- Language: TypeScript
- Homepage:
- Size: 1.24 MB
- Stars: 113
- Watchers: 7
- Forks: 36
- Open Issues: 43
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-video - diego3g/gcloud-node-video-transcoding - 📹🔥 Transcode Google Cloud Storage video files with Node.js and FFmpeg - diego3g/gcloud-node-video-transcoding (Encoding / Talks Presentations Podcasts)
README
Google Cloud Node.js video transcoderUse 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
```
- Install GCloud CLI following https://cloud.google.com/sdk/docs/quickstarts?hl=pt-br
- Authenticate to Google Cloud:
```
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
```
- Update destination bucket name inside (https://github.com/diego3g/gcloud-node-video-transcoding/blob/master/packages/worker/src/services/transcode.ts#L26)
```
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](LICENSE.md) for more details.