1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 02:12:30 +01:00

increase smart cut bitrate by 20%

see discussion in #126
This commit is contained in:
Mikael Finstad 2023-07-11 17:27:16 +02:00
parent b426023d51
commit c01f0cf4b2
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

View File

@ -46,6 +46,10 @@ export async function getSmartCutParams({ path, videoDuration, desiredCutFrom, s
videoBitrate = stats.size / videoDuration;
}
// to account for inaccuracies and quality loss
// see discussion https://github.com/mifi/lossless-cut/issues/126#issuecomment-1602266688
videoBitrate = Math.floor(videoBitrate * 1.2);
const { codec_name: videoCodec } = videoStream;
if (videoCodec == null) throw new Error('Unable to determine codec for smart cut');