Created
September 17, 2015 20:02
-
-
Save timeartist/3ea28126a1b763ee220b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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