0.0.16 • Published 3 years ago

@storyfox/worker v0.0.16

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
3 years ago

@storyfox/worker

How to install

$ yarn global add @storyfox/worker

How to run server / worker

See .env file and add before storyfox-worker start all env variables required

$ BULLMQ_QUEUE="ae_render@0.0.1" storyfox-worker start

Environnement

You can edit configuration into .env file

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

  • Socket Io Emitter

socketio/socket.io-emitter

  • BullMQ worker

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

  • Emit progress to socket io
  • Build JOB structure
  • Share is state (to auto scaler)
  • Download / Replace assets / datas to After Effect Screen
  • 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

{
  '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',
            },
          },
        ],
      },
    }
  ],
}