Use node-fluent-ffmpeg to do video overlayproc.addOption('-vf', '[in] pad=2*iw:ih [left0]', 'movie=' + sourceVideo + '[input0]', '[left0][input0] overlay=960:0 [out]');
A typical ffmpeg command using the same input as both sources for the overlay video filter:
ffmpeg -i input.mkv -filter_complex "[0:v]pad=iw*2:ih[bg];[bg][0:v]overlay=W/2" -codec:a copy output.mkv
0down voteaccepted
A typical ffmpeg command using the same input as both sources for the overlay video filter:
ffmpeg -i input.mkv -filter_complex "[0:v]pad=iw*2:ih[bg];[bg][0:v]overlay=W/2" -codec:a copy output.mkv
Note that if you had two different inputs you should include the
setpts filter and the shortestoption as shown in the examples in the
overlay documentation.
No need to use the
movie multimedia source filter when you use -filter_complex.
The audio is
stream copied with -codec:a copy instead of re-encoded.
This can be probably translated to your script as:
proc.addOption('-filter_complex', '[0:v]pad=iw*2:ih[bg];[bg][0:v]overlay=W/2');
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。