Skip to content

Instantly share code, notes, and snippets.

@timeartist
Created September 17, 2015 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timeartist/3ea28126a1b763ee220b to your computer and use it in GitHub Desktop.
Save timeartist/3ea28126a1b763ee220b to your computer and use it in GitHub Desktop.
#pip installed
from appscript import app
QUICKTIME = '/Applications/Quicktime Player 7.app'
def offset_audio(file, offset_amount):
##Open the video
vid = app(QUICKTIME).open(file)
##Find the audio track
for track in vid.tracks():
if track.type() == 'soun':
_track = track
break
_track.starts_at.set(_track.starts_at() + offset_amount)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment