Skip to content

Commit

Permalink
Merge pull request #287 from sailplan/mp3-coverart
Browse files Browse the repository at this point in the history
Ignore video channel when combining arbitrary audio tracks
  • Loading branch information
bkeepers authored Jan 17, 2025
2 parents ae8a2ee + c828049 commit d28d774
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default ({ ffmpegPath, ffprobePath, enableFfmpegLog, verbose, tmpDir }) =
const cutToArg = (cutTo != null ? `:end=${cutTo}` : '');
const apadArg = i > 0 ? ',apad' : ''; // Don't pad the first track (audio from video clips with correct duration)

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

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

0 comments on commit d28d774

Please sign in to comment.