Open ya5huk opened 2 years ago
Could you please reveal the values you are using to produce this effect?
I have tried adapting a version your code to try and get the same but got errors:
node:events:368
throw er; // Unhandled 'error' event
^
Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
Conversion failed!
The code I used:
let command = ffmpeg()
.input( filepath )
.input( filePathOverlayImage )
.complexFilter([
{ filter: "format", options: "rgba" },
{
filter: "lutrgb",
options: {
g: `minval`,
b: `minval`,
r: `minval`,
a: `minval`,
},
inputs: "[1:v]",
outputs: "lut1",
},
{
filter: "overlay",
options: { x: '(main_w/2-text_w/2)', y: 200, alpha: 'premultiplied' },
inputs: ["[0:v]", "lut1"],
},
])
.output( outpath )
.on( 'end', function() {
console.log( 'finished text overlay and opacity' )
})
Version information
Code to reproduce
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
A video with an overlay image on top (at the given x, y, opacity). It works, but only in the windows video player![image](https://user-images.githubusercontent.com/60485245/131248044-667bab19-83a5-44b5-a956-6f023b29658e.png)
Observed results
If I try to upload it to google photos or just display it in the web the tweet will disappear:
Maybe the file format does not support alpha channels or something like that?