mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-25 17:09:33 +02:00
Adds ultra quality option
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
@@ -2,4 +2,6 @@ export type InitialValuesType = {
|
||||
quality: string;
|
||||
fps: string;
|
||||
scale: string;
|
||||
starting: string;
|
||||
duration: string;
|
||||
};
|
||||
|
Reference in New Issue
Block a user