You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i tried to set an fade in and fade audio out to the main audio track. Without a smooth fadeout and when the audio track is longer then the generated one, the cut is really hard without a fading.
It seems that there is no such kind of filter yet. I experiment with ffmpeg and was able to set in and out´s without having the excatly duration of the generated clip.
The filtercomplex i used was: ffmpeg -i firevideo.mp4 -vcodec copy -filter_complex "aevalsrc=0:d=3.6 [a_silence]; [0:a:0] [a_silence] acrossfade=d=3.6" output.mp4
The value 3.6 fades the audio out at the durationtotal-3.6 seconds.
I would like to add this in audio.js in the filter complex section
When i insert the ffmpeg synthax i got that the filter can´t implement so many audio tracks. Currently a hot fix is to add this in the index.ts when everything is ready to copy the videotrack and re-encode the main audiotrack.
Is there a way to implement it in the audio.js part?
The text was updated successfully, but these errors were encountered:
I've taken another approach where I pass in the total length of clips to the mixArbitraryAudio function and do the following:
let filterComplex = streams.map(({ start, cutFrom, cutTo, fadeOut }, i) => {
const cutToArg = (cutTo != null ? `:end=${cutTo}` : '');
const apadArg = i > 0 ? ',apad' : ''; // Don't pad the first track (audio from video clips with correct duration)
const fadeOutArg = (fadeOut != null ? `,afade=type=out:duration=${fadeOut}:start_time=${clipsDuration - fadeOut}` : '');
return `[${i}]atrim=start=${cutFrom || 0}${cutToArg},adelay=delays=${Math.floor((start || 0) * 1000)}:all=1${apadArg}${fadeOutArg}[a${i}]`;
}).join(';');
As you can see I've added a fadeOutArg (since I only need fadeout, not fadein) to the args list and apply that after the pad argument. In the main audio tracks list I can then set a defined length of fadeOut which will be applied at the very end of the video, also if the audio track is longer than the video itself
HI,
i tried to set an fade in and fade audio out to the main audio track. Without a smooth fadeout and when the audio track is longer then the generated one, the cut is really hard without a fading.
{
outPath: './firevideo.mp4',
audioFilePath: 'assets/audiot1.aac',
keepSourceAudio:true,
...
It seems that there is no such kind of filter yet. I experiment with ffmpeg and was able to set in and out´s without having the excatly duration of the generated clip.
The filtercomplex i used was:
ffmpeg -i firevideo.mp4 -vcodec copy -filter_complex "aevalsrc=0:d=3.6 [a_silence]; [0:a:0] [a_silence] acrossfade=d=3.6" output.mp4
The value 3.6 fades the audio out at the durationtotal-3.6 seconds.
I would like to add this in audio.js in the filter complex section
When i insert the ffmpeg synthax i got that the filter can´t implement so many audio tracks. Currently a hot fix is to add this in the index.ts when everything is ready to copy the videotrack and re-encode the main audiotrack.
Is there a way to implement it in the audio.js part?
The text was updated successfully, but these errors were encountered: