// Name: Video Speed
// Description: Change the playback speed of a video file.
// Author: Strajk
import '@johnlindquist/kit';// Get the video file path, either from selection or prompt
const videoPath = await getSelectedFile() || await path({ placeholder: 'Select a video file' });
// Define available speed options with labels
const speedOptions = [
{ name: '1.5x', value: 1.5 },
{ name: '2x', value: 2 },
{ name: '3x', value: 3 },
{ name: '5x', value: 5 },
{ name: 'Custom', value: 'custom' },
];
// Prompt user to select a speed
const selectedSpeed = await arg('Select speed', speedOptions.map(option => option.name));
let speed: number;
if (selectedSpeed === 'Custom') {