scenejs-render
scenejs-render copied to clipboard
Render with a transparent background?
I want to render a video with a transparent background, to use it as an overlay on another video.
I have tried setting all backgrounds of the scene to a transparent color (the last two digits 00
specifying the opacity).
* {
background: #12345600;
}
scenejs-render produces a white background in the video output, like my Firefox does when I open the scene as a web page. No transparency is shown. The white backgrounds are already present in the .scene_cache/
, so ffmpeg is not (yet?) causing the issue.
Is there a solution already or would transparency be a new feature? In any case, thanks for making scenejs and scenejs-render such a beautiful product, already!
@mirkobunse I'm sorry. transparent is not processed yet.
I'm also thinking about this part.
Is there any idea how to embed a video in scene.js?
upvote for this feature :)
@ironyee Video and audio features are already supported by this awesome library. Here is how to do it
const mediaScene = new MediaScene();
mediaScene
.addMedia("background", "./background.mp3")
.seek(0, 40.79);
mediaScene
.addMedia("video", "./video.mp4")
.seek(0, 40.79)
.setVolume(1)
.setPlaySpeed(1)
.setDelay(startTime);
scene.setItem("video",mediaScene);
That's amazing, thanks! Indeed, your solution will solve the problem I had. :)
A transparent background, though, would allow users to overlay scenejs clips in other software, like video editors. Therefore, I suggest to keep this issue open.