Improve defaults for --syncTiming
This commit is contained in:
parent
b623bf7fc0
commit
8bb64a6612
1 changed files with 9 additions and 2 deletions
|
|
@ -84,7 +84,7 @@ class Merger {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const options = [
|
const options = [
|
||||||
'-t',
|
'-t',
|
||||||
'60',
|
'120',
|
||||||
'-i',
|
'-i',
|
||||||
path,
|
path,
|
||||||
'-vn',
|
'-vn',
|
||||||
|
|
@ -158,7 +158,12 @@ class Merger {
|
||||||
|
|
||||||
audios.sort((a, b) => a.totalDuration! - b.totalDuration!);
|
audios.sort((a, b) => a.totalDuration! - b.totalDuration!);
|
||||||
|
|
||||||
const synAudio = new SynAudio();
|
const synAudio = new SynAudio({
|
||||||
|
correlationSampleSize: 50000,
|
||||||
|
initialGranularity: 12,
|
||||||
|
correlationThreshold: 0.5
|
||||||
|
});
|
||||||
|
|
||||||
const audioArray = await synAudio.syncMultiple(
|
const audioArray = await synAudio.syncMultiple(
|
||||||
audios.map((audio) => {
|
audios.map((audio) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -171,6 +176,8 @@ class Merger {
|
||||||
}), os.cpus().length-1
|
}), os.cpus().length-1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//console.debug(audioArray);
|
||||||
|
|
||||||
// Find max sampleOffset value
|
// Find max sampleOffset value
|
||||||
const maxSampleOffset = Math.max(...audioArray[0].map(item => item.sampleOffset));
|
const maxSampleOffset = Math.max(...audioArray[0].map(item => item.sampleOffset));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue