diff --git a/package.json b/package.json index bc38a19..5b0d33b 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ }, "linux": { "extraResources": [ - "node_modules/ffmpeg-static/bin/ffmpeg", + "node_modules/ffmpeg-static/ffmpeg", "node_modules/ffprobe-static/bin/linux/x64/**" ], "icon": "icon-build/app-512.png", diff --git a/src/Settings.jsx b/src/Settings.jsx new file mode 100644 index 0000000..2ca7788 --- /dev/null +++ b/src/Settings.jsx @@ -0,0 +1,133 @@ +import React, { Fragment, memo } from 'react'; +import { Button, Table, SegmentedControl, Checkbox } from 'evergreen-ui'; + +const Settings = memo(({ + setOutputDir, customOutDir, autoMerge, setAutoMerge, keyframeCut, setKeyframeCut, invertCutSegments, setInvertCutSegments, + autoSaveProjectFile, setAutoSaveProjectFile, timecodeShowFrames, setTimecodeShowFrames, askBeforeClose, setAskBeforeClose, + renderOutFmt, AutoExportToggler, renderCaptureFormatButton, +}) => { + // eslint-disable-next-line react/jsx-props-no-spreading + const Row = (props) => ; + // eslint-disable-next-line react/jsx-props-no-spreading + const KeyCell = (props) => ; + + return ( + + + Output format (default autodetected) + {renderOutFmt({ width: '100%' })} + + + + + Working directory
+ This is where working files, exported files, project files (CSV) are stored. +
+ + +
{customOutDir}
+
+
+ + + Auto merge segments to one file during export or export to separate files? + + setAutoMerge(value === 'automerge')} + /> + + + + + + Keyframe cut mode
+ Nearest keyframe: Cut at the nearest keyframe (not accurate time.) Equiv to ffmpeg -ss -i ...
+ Normal cut: Accurate time but could leave an empty portion at the beginning of the video. Equiv to ffmpeg -i -ss ...
+
+ + setKeyframeCut(value === 'keyframe')} + /> + +
+ + + + ☯️ Choose cutting mode: Cut away or keep selected segments from video when exporting?
+ When Keep is selected, the video inside segments will be kept, while the video outside will be discarded.
+ When Cut away is selected, the video inside segments will be discarded, while the video surrounding them will be kept. +
+ + setInvertCutSegments(value === 'discard')} + /> + +
+ + + + Extract unprocessable tracks to separate files or discard them?
+ (data tracks such as GoPro GPS, telemetry etc. are not copied over by default because ffmpeg cannot cut them, thus they will cause the media duration to stay the same after cutting video/audio) +
+ + + +
+ + + + Auto save project file?
+ The project will be stored along with the output files as a CSV file +
+ + setAutoSaveProjectFile(e.target.checked)} + /> + +
+ + + + Snapshot capture format + + + {renderCaptureFormatButton()} + + + + + In timecode show + + setTimecodeShowFrames(value === 'frames')} + /> + + + + + Ask for confirmation when closing app or file? + + setAskBeforeClose(e.target.checked)} + /> + + +
+ ); +}); + +export default Settings;