Skip to content

Commit d28d774

Browse files
authored
Merge pull request #287 from sailplan/mp3-coverart
Ignore video channel when combining arbitrary audio tracks
2 parents ae8a2ee + c828049 commit d28d774

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

audio.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export default ({ ffmpegPath, ffprobePath, enableFfmpegLog, verbose, tmpDir }) =
170170
const cutToArg = (cutTo != null ? `:end=${cutTo}` : '');
171171
const apadArg = i > 0 ? ',apad' : ''; // Don't pad the first track (audio from video clips with correct duration)
172172

173-
return `[${i}]atrim=start=${cutFrom || 0}${cutToArg},adelay=delays=${Math.floor((start || 0) * 1000)}:all=1${apadArg}[a${i}]`;
173+
return `[${i}:a]atrim=start=${cutFrom || 0}${cutToArg},adelay=delays=${Math.floor((start || 0) * 1000)}:all=1${apadArg}[a${i}]`;
174174
}).join(';');
175175

176176
const volumeArg = outputVolume != null ? `,volume=${outputVolume}` : '';
@@ -185,6 +185,7 @@ export default ({ ffmpegPath, ffprobePath, enableFfmpegLog, verbose, tmpDir }) =
185185
'-stream_loop', (loop || 0),
186186
'-i', path,
187187
]))),
188+
'-vn',
188189
'-filter_complex', filterComplex,
189190
'-c:a', 'flac',
190191
'-y',

0 commit comments

Comments
 (0)