To automate QuickTime Player tasks, you can use AppleScript, Automator, or Finder services.
Use Script Editor to browse the AppleScript dictionary to see the available actions for playback, recording, and more. For more information, see Edit scripts.
You can link several AppleScript actions into a workflow using Automator. To see the available QuickTime Player actions in Automator, select Movies in the Library list. For more information, see Choose actions.
When you Control-click a media file and choose Encode Selected Video Files or Encode Selected Audio Files, you get a few options for encoding the media:
Encode selected video file
With this action, you can change the resolution of the movie, then choose whether you want the video to be higher quality or compatible with more devices. You can also extract the audio track from the movie.
Encode selected audio file
With this action, you can create MPEG audio files from your existing AIF, WAV, CAF, or SDII audio files.