transitive-bullshit/ffmpeg-concat

[NodeJs] - Failed to create OpenGL context.

safranx opened this issue ยท 3 comments

Hello,

I am facing this issue ๐Ÿฆ— ..
image

Package.json:

  "dependencies": {
    "ffmpeg-concat": "^1.3.3",
    "node-sass": "^6.0.0",
    "nodejs-file-downloader": "^4.6.0",
    "tslib": "~2.2.0",
  },

Env:
Node version: v14.17.1
Typescript: 4.3.2
WSL: v2 Ubuntu 18.04

Code sample:

async function createVideo() {
    if (clipList.length > 1) {
      console.log('๐ŸŽž๏ธ Try to concat');
      concat({
        output: './video/final.mp4',
        videos: ['./clips/clip-0.mp4', './clips/clip-1.mp4'],
        verbose: true,
        frameFormat: 'jpg',
        concurrency: 6,
        log: console.log('progress'),
        tempDir: './video/tmp',
        transition: {
          name: 'fade',
          duration: 500
        }
      }).catch((err) => {
        console.log(err);
      })
    } else {
      console.error('โŒ Cannot proceed, no clips available');
    }
};

I checked (https://github.com/stackgl/headless-gl#supported-platforms-and-nodejs-versions) and tried a lot of think but nothing worked...

Any idea @transitive-bullshit @daniel-habib, I followed the issue #36, but nothing worked.

Thank you for your help!

ejz commented

try to run your script using xvfb:

# xvfb-run -s "-ac -screen 0 1280x1024x24" node concat.js

did u already fixed this issue @Ray-P

@safranx any solution on this?