mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 10:22:31 +01:00
simplify
This commit is contained in:
parent
f3e3fd708d
commit
54e377f112
@ -4,11 +4,6 @@ import { readFramesAroundTime } from './ffmpeg';
|
||||
|
||||
const { stat } = window.require('fs-extra');
|
||||
|
||||
function mapInputToOutputCodec(inputCodec) {
|
||||
// if (inputCodec === 'hevc') return 'libx265';
|
||||
return inputCodec;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export async function getSmartCutParams({ path, videoDuration, desiredCutFrom, streams }) {
|
||||
const videoStreams = getRealVideoStreams(streams);
|
||||
@ -54,7 +49,7 @@ export async function getSmartCutParams({ path, videoDuration, desiredCutFrom, s
|
||||
videoBitrate = stats.size / videoDuration;
|
||||
}
|
||||
|
||||
const videoCodec = mapInputToOutputCodec(videoStream.codec_name);
|
||||
const { codec_name: videoCodec } = videoStream;
|
||||
if (videoCodec == null) throw new Error('Unable to determine codec for smart cut');
|
||||
|
||||
const timebase = getVideoTimebase(videoStream);
|
||||
|
Loading…
Reference in New Issue
Block a user