1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-25 03:33:14 +01:00

Now copies subtitles, too (#66)

The exiting version drops subtitle streams. Added flags to ffmpeg to copy subtitles (if they exist)
This commit is contained in:
rarosalion 2018-02-11 23:07:25 +11:00 committed by Mikael Finstad
parent 7962e174e6
commit 653d6b9936

View File

@ -68,7 +68,7 @@ async function cut(customOutDir, filePath, format, cutFrom, cutTo, rotation, onP
const cutFromArgs = cutFrom === 0 ? [] : ['-ss', cutFrom];
const rotationArgs = rotation !== undefined ? ['-metadata:s:v:0', `rotate=${rotation}`] : [];
const ffmpegArgs = [
'-i', filePath, '-y', '-vcodec', 'copy', '-acodec', 'copy',
'-i', filePath, '-y', '-vcodec', 'copy', '-acodec', 'copy', '-scodec', 'copy',
...cutFromArgs, '-t', cutTo - cutFrom,
'-map_metadata', '0',
...rotationArgs,