Go Back   The macosxhints Forums > OS X Help Requests > UNIX - Newcomers



Reply
 
Thread Tools Rate Thread Display Modes
Old 12-10-2006, 03:20 PM   #1
pressure
Triple-A Player
 
Join Date: Nov 2006
Posts: 62
unix command to record audio or movie with quicktime?

I saw this cool little feature and was wondering, what is the unix command to record a movie or audio file with quicktime?

http://www.apple.com/uk/pro/tips/cameratoquicktime.html

launch the QuickTime Pro Player, then from the File menu choose New Movie Recording. A QuickTime window will open showing you a preview of what your camera is seeing. Now just click the round red record button at the bottom of the QuickTime window and it starts recording. Click the stop button when you’ve finished and you’ve got an instant QuickTime movie.

Last edited by pressure; 12-10-2006 at 03:24 PM.
pressure is offline   Reply With Quote
Old 12-10-2006, 03:28 PM   #2
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
I wasn't aware there was a command line interface for quicktime.
yellow is offline   Reply With Quote
Old 12-10-2006, 04:07 PM   #3
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,464
You could write an AppleScript to control QT Player and invoke that from a shell script.
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Old 12-10-2006, 07:08 PM   #4
pressure
Triple-A Player
 
Join Date: Nov 2006
Posts: 62
Quote:
Originally Posted by hayne
You could write an AppleScript to control QT Player and invoke that from a shell script.

how do I start to do this? I have no idea how to write script amd dont know what a shell is
pressure is offline   Reply With Quote
Old 12-10-2006, 08:28 PM   #5
mark hunte
MVP
 
Join Date: Apr 2004
Location: Hello London Calling
Posts: 1,787
Quote:
Originally Posted by pressure
how do I start to do this? I have no idea how to write script amd dont know what a shell is

Just tested this.

Code:
tell application "QuickTime Player"
	
	set nr to (new movie recording)
	set nr to start recording true
	delay 10
	set nr to stop recording true
end tell
Also look in the Applescript QT dictionary for more info.
mark hunte is offline   Reply With Quote
Old 12-10-2006, 08:54 PM   #6
mark hunte
MVP
 
Join Date: Apr 2004
Location: Hello London Calling
Posts: 1,787
Using Haynes Ash shell script

I can set up ash abbreviations to the commands which allows a quick and easy way to do this from the command line.

Code:
ash> -abbrev qtr tell application "QuickTime Player" to new movie recording
ash> -abbrev qtrst tell application "QuickTime Player" to start recording true
ash> -abbrev qtrsp tell application "QuickTime Player" to stop recording true
ash>
The -abbrev command does Not save once you exit ASH.
So I created the ~/.ashrc file and saved the commands into it so they would load when ASH starts.

Hayne this worked really well.

Last edited by mark hunte; 12-10-2006 at 09:17 PM.
mark hunte is offline   Reply With Quote
Old 12-10-2006, 11:56 PM   #7
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,464
Quote:
Originally Posted by mark hunte
The -abbrev command does Not save once you exit ASH.
So I created the ~/.ashrc file and saved the commands into it so they would load when ASH starts.

Note that you could of course have saved these commands into any text file of your choosing (e.g. "qtcmds.txt" or "qtcmds.ash" or whatever) and then used "-source" to bring those commands into the 'ash' environment when needed.

By the way (for other readers), the 'ash' scripting environment referred to is:
http://hayne.net/MacDev/Ash/
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 11:42 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.