Code Monkey home page Code Monkey logo

img2vid's People

Contributors

advplyr avatar dependabot[bot] avatar mcoope31 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

img2vid's Issues

Xfade

i recently had to switch systems with that after rebuilding ffmpeg , the XFADE filter was lost (again)

could you please provide a good solution to get the filter beacuse without xfade none of the transitions would run

Error initializing complex filters.

Hello! I'm trying to run this on windows, with the ffmpeg installers, code looks like this (it's in a test for now):

import { path as ffmpegPath } from '@ffmpeg-installer/ffmpeg'
import { path as ffprobePath } from '@ffprobe-installer/ffprobe'
import ffmpeg from 'fluent-ffmpeg'
import img2vid from 'img2vid'

describe('video', () => {
  it('should generate video', async () => {
    // Custom setting the path as I used the installers to make the code portable.
    ffmpeg.setFfmpegPath(ffmpegPath)
    ffmpeg.setFfprobePath(ffprobePath)

    const payload = {
      slides: range(1, 13).map((index) => ({
        path: `images/img_${index}.png`,
        duration: 2,
      })),
      width: 1280,
      height: 720,
      output: 'images/video.mp4',
      forceScale: true,
    }
    await img2vid.render(payload)
  })
})

When I run this, I get an error talking about complex filters (never used ffmpeg, no idea what it is).

  console.error node_modules/img2vid/index.js:176
    Failed to render Error: ffmpeg exited with code 1: Error initializing complex filters.
    Invalid argument
    
        at ChildProcess.<anonymous> (D:\Code\chord-charts\node_modules\fluent-ffmpeg\lib\processor.js:182:22)
        at ChildProcess.emit (events.js:315:20)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)

Also getting an ffmpeg command dump:

    FFMPEG Command: ffmpeg -loop 1 -i images/img_1.png -loop 1 -i images/img_2.png -loop 1 -i images/img_3.png -loop 1 -i images/img_4.png -loop 1 -i images/img_5.png -loop 1 -i images/img_6.png -loop 1 -i images/img_7.png -loop 1 -i images/img_8.png -loop 1 -i images/img_9.png -loop 1 -i images/img_10.png -loop 1 -i images/img_11.png -loop 1 -i images/img_12.png -f lavfi -i color=c=black:s=1280x720 -y -filter_complex [0:v]settb=AVTB,scale=1280:720[0s];[1:v]settb=AVTB,scale=1280:720[1s];[2:v]settb=AVTB,scale=1280:720[2s];[3:v]settb=AVTB,scale=1280:720[3s];[4:v]settb=AVTB,scale=1280:720[4s];[5:v]settb=AVTB,scale=1280:720[5s];[6:v]settb=AVTB,scale=1280:720[6s];[7:v]settb=AVTB,scale=1280:720[7s];[8:v]settb=AVTB,scale=1280:720[8s];[9:v]settb=AVTB,scale=1280:720[9s];[10:v]settb=AVTB,scale=1280:720[10s];[11:v]settb=AVTB,scale=1280:720[11s];[12:v]setpts=N/FRAME_RATE/TB,settb=AVTB,scale=1280:720[bgi];[0s][1s]xfade=transition=fade:duration=0:offset=2[v1];[v1][2s]xfade=transition=fade:duration=0:offset=4[v2];[v2][3s]xfade=transition=fade:duration=0:offset=6[v3];[v3][4s]xfade=transition=fade:duration=0:offset=8[v4];[v4][5s]xfade=transition=fade:duration=0:offset=10[v5];[v5][6s]xfade=transition=fade:duration=0:offset=12[v6];[v6][7s]xfade=transition=fade:duration=0:offset=14[v7];[v7][8s]xfade=transition=fade:duration=0:offset=16[v8];[v8][9s]xfade=transition=fade:duration=0:offset=18[v9];[v9][10s]xfade=transition=fade:duration=0:offset=20[v10];[v10][11s]xfade=transition=fade:duration=0:offset=22[v11];[v11][bgi]xfade=transition=fade:duration=0:offset=24[v12];[v12]format=yuv420p,scale=1280:720[v] -vcodec libx264 -map [v] -t 24 -y images/video.mp4

Any clue what this might be?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.