Comments (6)
I think you're going to have to draw the video into the canvas, no matter how you save the output
from whammy.
Thanks for the reply, is It possible to have an example that would be very helpful.
<div id="video_box">
<div id="video_overlays">
<canvas class="canvas" id="canvas"></canvas></div>
<div>
<video controls="true" id="video" src="video1_1.mp4"/>
</div>
</div>
My html looks like that
and the js looks like this:
function download_merge() {
var encoder = new Whammy.Video(15);
var canvas_video = document.querySelector('canvas').getContext('2d');
canvas_video.save();
console.log(canvas_video);
encoder.add(canvas_video);
console.log(encoder);
encoder.compile(false, function(output){
var url = (window.URL || window.URL).createObjectURL(output);
//var url = URL.createObjectURL(output);
console.log(url);
document.getElementById('download_link').href = url;
});
}
from whammy.
Use requestAnimationFrame
and context2d.drawImage(yourVideoElement)
from whammy.
Use
requestAnimationFrame
andcontext2d.drawImage(yourVideoElement)
Thank you,
should I apply the requestAnimationFrame on the text canvas or the video element?
from whammy.
You will need to redraw the text every time the video is drawn.
from whammy.
Thanks for the reply, please can you share an example of the code?
from whammy.
Related Issues (20)
- should be able to add a blob HOT 2
- callback is not a function line 556 HOT 4
- clock.html demo does not work in Firefox and Chromium HOT 2
- Adding text HOT 2
- a way for passing chunks
- Webgl context
- Cannot use 'in' operator to search for 'canvas' in data:image/webp;base64... HOT 2
- InvalidCharacterError: String contains an invalid character HOT 1
- Compile Error
- To people who care about this project. Recommend use ts-whammy. HOT 1
- opus packets
- Simple Block timestamp going negative when time given explicitly using add function HOT 3
- what have i do to change time duration video?
- Webm with transparency
- Webm with sound
- Whammy gives Black Screen Webm video on latest Google Chrome HOT 6
- Has anyone got Whammy to work recently? HOT 2
- Error 'Frame 2 has a different width' since Chrome version 108 HOT 1
- js is a a html tagged file HOT 1
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 whammy.