advplyr / img2vid Goto Github PK
View Code? Open in Web Editor NEWGenerate videos or gifs from images. Includes captions, audio, transitions and zoompan.
Generate videos or gifs from images. Includes captions, audio, transitions and zoompan.
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
Is it possible for a vif or a video to be used as a watermark or to animate the watermark
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?
Hi brother,
When I concat multi slideup loop 12, it result have breakline, check it please!
Thank bro
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.