How to start QuickTime recording at command line?

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)'

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.