mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 02:12:30 +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:
parent
7962e174e6
commit
653d6b9936
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user