Comments (8)
You can achieve this with ffmpeg
:
ffmpeg -i video.mkv -i audio.mp3 -map 0 -map 1:a -c:v copy -shortest output.mkv
Where video.mkv
is the video file and audio.mp3
is the audio file. You can then prepare a simple bash script to combine random videos with random audio files.
However, if you want to combine different video layers, then obviously you need some sort of alpha channel information, or a chroma key, which requires a lot more preparation on the video file side (you'd have to use the correct chroma key in your video files and then provide it to the script).
You can then use the colorkey
filter:
ffmpeg -i video.mkv -i overlay-video.mkv -filter_complex '[1:v]colorkey=0xYOUR_COLOR:YOUR_SIMILARITY_VALUE:YOUR_BLEND_VALUE[ckout];[0:v][ckout]overlay[out]' -map '[out]' output.mkv
So by combining the above you should be able to achieve what you want.
from hashlips_art_engine.
Hello, @MaciekBaron @HashLips
Is there a way to combine multiple animated GIF using the same script? The idea is to merge several animated GIF into one; resulting in an animated GIF with all the different looping sequences.
Any tip on how to get that done, please?
Thanks in advance.
TM.
from hashlips_art_engine.
If you mean merging GIFs sequentially there's Gifsicle that allows you to do it in the command line by simply doing:
gifsicle 1.gif 2.gif 3.gif > merged.gif
So all you need is a simple script that changes the order or the selection of the GIFs.
from hashlips_art_engine.
Thanks, for the feedback @MaciekBaron. Appreciate it.
I meant using GIFs with alpha channels in the art engine and combining them in layers, not sequentially.
So in this case, layer 1 will be 1.gif, layer 2 will be 2.gif and so on.
So we have 1 GIF with all the different animated GIFs on different layers.
Once again, thanks for the feedback.
from hashlips_art_engine.
I wouldn't necessarily recommend this, as GIFs have limited colour palettes and differ in frame rates.
However, you can also use ffmpeg
for that, you could look into the overlay
filter to overlay two source gifs on top of each other, similarly to what I did in the first example.
I think it could look something like this, although I haven't tried it:
ffmpeg -t DURATION_HERE -i gifone.gif -i giftwo.gif -filter_complex "[0][1]overlay=0:0" -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
It's best if you read the docs for this to get it right, but basically after -vf
you want to use those options and set the appropriate framerate you want, and after -filter_complex
you define your overlay.
from hashlips_art_engine.
Sounds Great. Thanks
from hashlips_art_engine.
I don't want videos but animated png or gifs as output. There's an issue about it #461. Do you think this solution can help around it in some way?
from hashlips_art_engine.
@PradhumnaPancholi: ffmpeg
supports both apng and gif output. See my comment above.
from hashlips_art_engine.
Related Issues (20)
- for independent art (non generative) collections
- ArtEngine generating 10000 artworks, starts on 0 (Solana) yet ends at 10000
- ..
- help me with this issue please HOT 1
- TokenID
- Cannot install Canvas on windows HOT 1
- npm run buid bug HOT 1
- Adding external url to metadata for node update_info.js HOT 2
- how to generate Giff nft collection using Giff Layers? HOT 1
- Unexpected token HOT 3
- Please help npm not install error old please help them any one HOT 7
- What is ENOENT error please help me HOT 2
- npm run generate not working (i already tried npm install) HOT 6
- SVG Support HOT 2
- npm install canvas packages couldn't install canvas :( HOT 1
- how to fix (node:15176) UnhandledPromiseRejectionWarning: Error: ENOENT, No such file or directory ' Error? HOT 1
- I got this error what should I do? HOT 2
- sbatin
- m
- Layer info
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hashlips_art_engine.