editly
editly copied to clipboard
[ Bug Report ] the video does not synchronize with sound when i merge with multiple videos
Version
ffmpeg v4.2
editly v0.11.1@latests
systemn window10
Steps to reproduce
await editly({
defaults: {
transition: null,
layer: { fontPath: fontPath }
},
width: config.videoConfig.short.width,
height: config.videoConfig.short.height,
outPath: this.output,
// here is multiple video clips
clips,
outputVolume: 0.5,
loopAudio: true,
keepSourceAudio: true,
fast: false
}).catch(console.error);
the clips kind of like below
this.data.map((post, index) => {
clips.push({
duration: parseInt(post.duration),
layers: [
{
left: 0,
top: 0,
width: 1,
height: 1,
type: "video",
path: post.originalPath,
resizeMode: ""
}
]
});
clips.push({
duration: 1,
layers: [
{
left: 0,
top: 0,
width: 1,
height: 1,
type: "video",
path: bPath,
resizeMode: "cover"
}
]
});
});
What is expected?
videos synchronize with sound, even with multiple videos.
What is actually happening?
the video does not synchronize with sound when i merge with multiple videos
or, maybe this bug affected by the ffmpeg?
Same problem here...
Same problem here...
u can add a filter for audio to fix this bug
put those code below in audio.js
'-map', 'a:0', '-c:a', 'flac',
// ------ start here
// add apad filter for Pad the end of an audio stream with silence.
// add loudnorm filter for loudness normalization, if u merge a couple vids , this filter pretty useful
'-filter:a', 'apad,loudnorm',
// ------- end here
'-y',
or u just can use my package (fork from editly) editly-faster
but i suggest just fork u own project from editly for more customizable
Is this problem caused by video files that have an audio duration which is shorter than the video (or vide versa)?
yep
Is this problem caused by video files that have an audio duration which is shorter than the video (or vide versa)?
Same problem here (with around 29 videos) but I do not use video with a shorter audio duration, @carl-jin solution did not help Any idea on that ?