transitive-bullshit / ffmpeg-concat

Concats a list of videos together using ffmpeg with sexy OpenGL transitions.
863 stars 113 forks source link

[NodeJs] - Failed to create OpenGL context. #119

Open safranx opened 3 years ago

safranx commented 3 years ago

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 2 years ago

try to run your script using xvfb:

# xvfb-run -s "-ac -screen 0 1280x1024x24" node concat.js
ruedasjnthn commented 2 years ago

did u already fixed this issue @Ray-P

mdelnegro-lennd commented 1 year ago

@safranx any solution on this?