12

How to start QuickTime video recording on a MacBook at the command line?

3 Answers 3

16

1) Create a Applescript by AppleScript Editor and save it (e.g. QTRecord.scpt):

 tell application "QuickTime Player"
     activate
     start (new movie recording)
 end tell

2) Open Terminal and run the script in command line:

 osascript QTRecord.scpt 

Or the whole thing as an one-liner:

 osascript -e 'tell application "QuickTime Player" to activate' -e 'tell application "QuickTime Player" to start (new movie recording)'
3
  • How do you know those parameters ? Apple script editor 'Record' function, don't provide that... @ohho
    – CodeFarmer
    Commented Jul 12, 2016 at 5:49
  • 2
    @CodeFarmer Using Xcode, open QuickTImePlayerX.sdef, located Inside the Contents folder of the Quicktime Player X package.
    – James Bush
    Commented Dec 2, 2016 at 9:49
  • Another way to check the commands in a more readable way is to open the .app bundle in Script Editor using File → Open Dictionary...
    – grego
    Commented Jan 20, 2022 at 21:18
2

According to this site, it can be done using Applescript

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

So it interacts with Quick-time. There are no direct commands with QuickTime.

1
  • Compiling the above code gives a syntax error: Expected end of line, etc. but found “true”.
    – ohho
    Commented Jun 19, 2012 at 1:46
0

To start a QuickTime recording at the command line on a Mac, you can use the osascript command to execute AppleScript code. Here's an example script that you can use:

tell application "QuickTime Player"
    activate
    start (new movie recording)
    delay 1 -- Optional delay to give QuickTime time to start recording
end tell

To execute this AppleScript code from the command line, you can create a file with a .scpt extension, for example, start_recording.scpt, and then run the following command in the terminal:

osascript /path/to/start_recording.scpt

This will launch QuickTime Player, start a new movie recording, and begin recording the screen or webcam, in sinuano noche game players select a three-digit number ranging from 000 to 999 and can choose from various bet types. Depending on your QuickTime settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .