Adds ultra quality option

This commit is contained in:
C043
2025-06-09 16:54:48 +02:00
parent 22cd6def76
commit 3633420229
2 changed files with 15 additions and 3 deletions

View File

@@ -5,7 +5,6 @@ import React, { useState } from 'react';
import ToolContent from '@components/ToolContent';
import { ToolComponentProps } from '@tools/defineTool';
import { GetGroupsType } from '@components/options/ToolOptions';
import { main } from './service';
import { InitialValuesType } from './types';
import ToolVideoInput from '@components/input/ToolVideoInput';
import ToolFileResult from '@components/result/ToolFileResult';
@@ -16,7 +15,9 @@ import { fetchFile } from '@ffmpeg/util';
const initialValues: InitialValuesType = {
quality: 'mid',
fps: '10',
scale: '320:-1:flags=bicubic'
scale: '320:-1:flags=bicubic',
starting: '0',
duration: ''
};
export default function VideoToGif({
@@ -29,7 +30,7 @@ export default function VideoToGif({
const compute = (values: InitialValuesType, input: File | null) => {
if (!input) return;
const { fps, scale } = values;
const { fps, scale, starting, duration } = values;
let ffmpeg: FFmpeg | null = null;
let ffmpegLoaded = false;
@@ -133,6 +134,15 @@ export default function VideoToGif({
}}
checked={values.quality === 'high'}
/>
<SimpleRadio
title="Ultra"
onClick={() => {
updateField('quality', 'ultra');
updateField('fps', '15');
updateField('scale', '640:-1:flags=lanczos');
}}
checked={values.quality === 'ultra'}
/>
</Box>
)
}

View File

@@ -2,4 +2,6 @@ export type InitialValuesType = {
quality: string;
fps: string;
scale: string;
starting: string;
duration: string;
};