Warning: include_once(/home/kenv/kenvillines.com/wp-content/plugins/wordpress-support/wordpress-support.php): failed to open stream: Permission denied in /home/kenv/kenvillines.com/wp-settings.php on line 213

Warning: include_once(): Failed opening '/home/kenv/kenvillines.com/wp-content/plugins/wordpress-support/wordpress-support.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/kenv/kenvillines.com/wp-settings.php on line 213
» Quicktime Scripting & RTSP Ken Villines 1.0

Quicktime Scripting & RTSP

Using scripting to control Quicktime Movies when those movies are for streaming looses Audio Video Sync. It isn’t really apparent at first but certain function calls should cause the audio to stop or even slow down along with the video. When function calls are made the video reacts but the audio does not. I have reported the issue to Apple and they are currently working on it. Continue to read if you want to know the specifics of the issue…

The Issue SUMMARY
All scripting controls work great with progressive download movies but choke with files prepared for rtsp://. Any function calls that slow down the movie will only slow the video. The audio plays at normal speed and eventually looses sync with the video. This will happen using Javascript, Applescript, or VBScript.

The problem can be reproduced directly in the QT Player with the following AppleScript:


tell application "QuickTime Player"
activate
open location movieURL
tell first movie
play
--hang out until the movie starts
repeat while the rate < 1
delay 1 --sleep for a second before checking again
end repeat
set rate to 0.5
end tell
end tell

The Result
The Audio keeps playing at normal speed and the video is the only track that plays in slow motion.

This issue doesn’t happen with Progressive download QT files. It also doesn’t happen if you play a streaming file through the HTTP embedding for the QT plug-in. This isn’t an option to fix it because an rtsp server should really be used with this file type. Another problem is that other scripting features don’t work when you play an rtsp file with http embedding.

This is the jist of the problem…I hope this helps others who are going crazy trying to figure out what they are doing wrong. You aren’t doing anything wrong. It is Apple’s problem.

One Response to “Quicktime Scripting & RTSP”

  1. maurice matiz Says:

    I am glad I ran into your post. I can stop banging my head against the wall.

Leave a Reply