Skip to main content
Glama

speed_change

Adjust the playback speed of clips in Adobe Premiere Pro, with options to modify speed multiplier and maintain audio pitch, enabling precise control over video pacing and effects.

Instructions

Changes the playback speed of a clip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYesThe ID of the clip
maintainAudioNoWhether to maintain audio pitch when changing speed
speedYesSpeed multiplier (0.1 = 10% speed, 2.0 = 200% speed)

Implementation Reference

  • Registers the 'speed_change' tool in the list of available tools, including its name, description, and Zod input schema for validation.
    name: 'speed_change', description: 'Changes the playback speed of a clip.', inputSchema: z.object({ clipId: z.string().describe('The ID of the clip'), speed: z.number().describe('Speed multiplier (0.1 = 10% speed, 2.0 = 200% speed)'), maintainAudio: z.boolean().optional().describe('Whether to maintain audio pitch when changing speed') }) }
  • The handler method that executes the speed change by generating and running ExtendScript code via the PremiereProBridge to modify the clip's speed property and optionally preserve audio pitch.
    private async speedChange(clipId: string, speed: number, maintainAudio = true): Promise<any> { const script = ` try { var clip = app.project.getClipByID("${clipId}"); if (!clip) { JSON.stringify({ success: false, error: "Clip not found" }); return; } var oldSpeed = clip.speed; clip.speed = ${speed}; if (${maintainAudio} && clip.hasAudio && clip.hasAudio()) { clip.maintainAudioPitch = true; } JSON.stringify({ success: true, message: "Speed change applied successfully", clipId: "${clipId}", oldSpeed: oldSpeed, newSpeed: ${speed}, maintainAudio: ${maintainAudio} }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
  • Dispatches execution of the 'speed_change' tool to its handler method in the executeTool switch statement.
    case 'speed_change': return await this.speedChange(args.clipId, args.speed, args.maintainAudio);
  • Defines the input schema using Zod for parameter validation: clipId (string), speed (number), maintainAudio (optional boolean).
    clipId: z.string().describe('The ID of the clip'), speed: z.number().describe('Speed multiplier (0.1 = 10% speed, 2.0 = 200% speed)'), maintainAudio: z.boolean().optional().describe('Whether to maintain audio pitch when changing speed') }) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hetpatel-11/Adobe_Premiere_Pro_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server