open-index/open-npm huggingface dataset:
npm package: @storyfox/worker
Description: ### How to install
Author: f19yd
Latest version: 0.0.16

# @storyfox/worker

### How to install

```jsx
$ yarn global add @storyfox/worker
```

### How to run server / worker

See `.env` file and add before `storyfox-worker start` all env variables required
```jsx
$ BULLMQ_QUEUE="ae_render@0.0.1" storyfox-worker start
```

### Environnement

You can edit configuration into `.env` file

```makefile
HOST=0.0.0.0
PORT=3001
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
BULLMQ_QUEUE=ae_render@0.0.1
```

### Stack

- After Effects
- Nexrender

[inlife/nexrender](https://github.com/inlife/nexrender)

- Socket Io Emitter

[socketio/socket.io-emitter](https://github.com/socketio/socket.io-emitter)

- BullMQ worker

[taskforcesh/bullmq](https://github.com/taskforcesh/bullmq)

### Requirements

1. Redis available
2. After Effect installed locally
3. NodeJs installed locally
4. Available internet connection
5. Authentification file to AWS / GCE storage

### Must do

- [x]  Emit progress to socket io
- [x]  Build JOB structure
- [x]  Share is state (to auto scaler)
- [x]  Download / Replace assets / datas to After Effect Screen
- [x]  Upload to AWS or GCE storage generated video

### Set GS credentials

Add this line to `.bashrc` or `.zshrc` file 
⚠️ Ask to internal administrator to get credential json file
```
export GOOGLE_APPLICATION_CREDENTIALS="ABSOLUTE_PATH/storyfox-75326806aeb5.json"
```

### Job Structure Exemple

```jsx
{
  'chanel': 'project-a1234bf4',
  'job_id': 'a1234bf4',
  'build': [
    {
      'template': {
        'src': 'gs://ae-render/screens/gary_demo/gary_demo.aep',
        'composition': 'SF_M_H',
      },
      'assets': [],
      'actions': {
        'postrender': [
          {
            'module': '@nexrender/action-encode',
            'preset': 'mp4',
            'output': 'encoded.mp4',
          },
          {
            'module': '@nexrender/action-upload',
            'input': 'encoded.mp4',
            'provider': 'gs',
            'params': {
              'bucket': 'ae-render',
              'item': 'test/gary_demo.mp4',
              'contentType': 'video/mp4',
            },
          },
        ],
      },
    }
  ],
}
```