Merge branch 'main' into tools-filtering

This commit is contained in:
AshAnand34
2025-07-18 14:45:15 -07:00
336 changed files with 21767 additions and 2122 deletions

View File

@@ -9,6 +9,7 @@ import ToolFileResult from '@components/result/ToolFileResult';
import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
import { FFmpeg } from '@ffmpeg/ffmpeg';
import { fetchFile } from '@ffmpeg/util';
import { useTranslation } from 'react-i18next';
const initialValues: InitialValuesType = {
newSpeed: 2
@@ -18,6 +19,7 @@ export default function ChangeSpeed({
title,
longDescription
}: ToolComponentProps) {
const { t } = useTranslation('video');
const [input, setInput] = useState<File | null>(null);
const [result, setResult] = useState<File | null>(null);
const [loading, setLoading] = useState(false);
@@ -128,13 +130,13 @@ export default function ChangeSpeed({
updateField
}) => [
{
title: 'New Video Speed',
title: t('changeSpeed.newVideoSpeed'),
component: (
<Box>
<TextFieldWithDesc
value={values.newSpeed.toString()}
onOwnChange={(val) => updateField('newSpeed', Number(val))}
description="Default multiplier: 2 means 2x faster"
description={t('changeSpeed.defaultMultiplier')}
type="number"
/>
</Box>
@@ -149,21 +151,32 @@ export default function ChangeSpeed({
<ToolVideoInput
value={input}
onChange={setInput}
title={'Input Video'}
title={t('changeSpeed.inputTitle')}
/>
}
resultComponent={
loading ? (
<ToolFileResult title="Setting Speed" value={null} loading={true} />
<ToolFileResult
title={t('changeSpeed.settingSpeed')}
value={null}
loading={true}
/>
) : (
<ToolFileResult title="Edited Video" value={result} extension="mp4" />
<ToolFileResult
title={t('changeSpeed.resultTitle')}
value={result}
extension="mp4"
/>
)
}
initialValues={initialValues}
getGroups={getGroups}
setInput={setInput}
compute={compute}
toolInfo={{ title: `What is a ${title}?`, description: longDescription }}
toolInfo={{
title: t('changeSpeed.toolInfo.title', { title }),
description: longDescription
}}
/>
);
}

View File

@@ -2,26 +2,15 @@ import { defineTool } from '@tools/defineTool';
import { lazy } from 'react';
export const tool = defineTool('video', {
name: 'Change video speed',
path: 'change-speed',
icon: 'material-symbols:speed',
description:
'Change the playback speed of video files. Speed up or slow down videos while maintaining audio pitch.',
shortDescription:
'Change the speed of video files (MP4, MOV, AVI) with audio control.',
keywords: [
'speed',
'video',
'tempo',
'pitch',
'mp4',
'mov',
'avi',
'video editing',
'playback'
],
longDescription:
'This tool allows you to change the playback speed of video files. You can speed up or slow down videos while maintaining the original audio pitch, or with pitch correction. Supports various video formats including MP4, MOV, and AVI. Perfect for creating time-lapse videos, slow-motion effects, or adjusting video speed for different purposes.',
userTypes: ['General Users', 'Students', 'Developers'],
component: lazy(() => import('./index'))
keywords: ['video', 'speed', 'playback', 'fast', 'slow'],
component: lazy(() => import('./index')),
i18n: {
name: 'video:changeSpeed.title',
description: 'video:changeSpeed.description',
shortDescription: 'video:changeSpeed.shortDescription',
userTypes: ['General Users', 'Students', 'Developers']
}
});