mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-26 01:19: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 ToolContent from '@components/ToolContent';
|
||||||
import { ToolComponentProps } from '@tools/defineTool';
|
import { ToolComponentProps } from '@tools/defineTool';
|
||||||
import { GetGroupsType } from '@components/options/ToolOptions';
|
import { GetGroupsType } from '@components/options/ToolOptions';
|
||||||
import { main } from './service';
|
|
||||||
import { InitialValuesType } from './types';
|
import { InitialValuesType } from './types';
|
||||||
import ToolVideoInput from '@components/input/ToolVideoInput';
|
import ToolVideoInput from '@components/input/ToolVideoInput';
|
||||||
import ToolFileResult from '@components/result/ToolFileResult';
|
import ToolFileResult from '@components/result/ToolFileResult';
|
||||||
@@ -16,7 +15,9 @@ import { fetchFile } from '@ffmpeg/util';
|
|||||||
const initialValues: InitialValuesType = {
|
const initialValues: InitialValuesType = {
|
||||||
quality: 'mid',
|
quality: 'mid',
|
||||||
fps: '10',
|
fps: '10',
|
||||||
scale: '320:-1:flags=bicubic'
|
scale: '320:-1:flags=bicubic',
|
||||||
|
starting: '0',
|
||||||
|
duration: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function VideoToGif({
|
export default function VideoToGif({
|
||||||
@@ -29,7 +30,7 @@ export default function VideoToGif({
|
|||||||
|
|
||||||
const compute = (values: InitialValuesType, input: File | null) => {
|
const compute = (values: InitialValuesType, input: File | null) => {
|
||||||
if (!input) return;
|
if (!input) return;
|
||||||
const { fps, scale } = values;
|
const { fps, scale, starting, duration } = values;
|
||||||
let ffmpeg: FFmpeg | null = null;
|
let ffmpeg: FFmpeg | null = null;
|
||||||
let ffmpegLoaded = false;
|
let ffmpegLoaded = false;
|
||||||
|
|
||||||
@@ -133,6 +134,15 @@ export default function VideoToGif({
|
|||||||
}}
|
}}
|
||||||
checked={values.quality === 'high'}
|
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>
|
</Box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@@ -2,4 +2,6 @@ export type InitialValuesType = {
|
|||||||
quality: string;
|
quality: string;
|
||||||
fps: string;
|
fps: string;
|
||||||
scale: string;
|
scale: string;
|
||||||
|
starting: string;
|
||||||
|
duration: string;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user