1

I trade futures and other things, which requires me to be watching a number of things very closely while I'm actively considering or managing a trade. I'd like to be more diligent about documenting all my trades, my thought processes in the moment, etc. but doing so while trading is pretty much impossible. And trying to remember everything later is definitely impossible. So I'd like to begin recording myself when I'm being active in the markets.

This is easy to do - Quicktime can do it natively even - but I would like to assign recording the screen to a keyboard shortcut so I can just fire it off in an instant when I need to, and hit another keystroke when I'm done. This is the problem I haven't found a good solution to.

I already own ScreenFlow, and it has a keyboard shortcut for recording. Unfortunately Screenflow produces absolutely enormous files, that then require you to export them from Screenflow in order to actually save them somewhere.

Ideally I'm looking for a Mac app that:

  1. Can initiate a recording of the screen (and my microphone for narration, I don't really care about camera) via a keyboard shortcut.
  2. Produces reasonable file sizes (and to that end, allowing me to record at a greatly reduced frame rate would be great... 1 FPS even would work fine for my needs)
  3. Outputs to standard formats, preferably .mp4 or .m4v
  4. Works on macOS Sierra on a 2011 iMac

Recording system audio would be an additional plus, but is not absolutely required.

EDIT: On exploring a bit, it turns out that Automator already has a command for New Screen Recording! This is great, with one problem. Quicktime opens a small window and requires you to click the little red "Record" button, to actually initiate recording. I can't find any way to do this via a keyboard shortcut. If all else fails I could applescript the click to specific coordinates, but I would love to find a "less heavy-handed" way to start the recording process without requiring a mouse click. Any ideas anyone?

  • How about an AppleScript droplet (or folder action) to convert the output of ScreenFlow using ffmpeg (practically all the output options in the world)? I can give you something for starters, if that will solve the problem. – Trellis Aug 2 '18 at 20:30
  • I'm open to AppleScript as a solution, but how does that record the screen? Are you suggesting to script the execution of the native QT screen recording function? If so... that's an interesting idea. My initial concern is that it will be a bit slow and clunky if it has to actually launch QT Player, create a new file, etc. Intriguing idea though, I'd love to hear more of your thoughts on doing this. – Jonathan van Clute Aug 2 '18 at 20:33
  • Whoops just saw your edit, you're talking about just for conversion. Yeah that's less than ideal because then I still have to record the gigantic file in the first place which I'd rather not do. But now you've got me thinking... – Jonathan van Clute Aug 2 '18 at 20:33
  • Yeah, sorry, I accidentally hit return while I was typing. The AppleScript can delete your source file after it makes the conversion. You're gonna need scratch space on your HD anyway, right? – Trellis Aug 2 '18 at 20:36
  • It's just that ScreenFlow does so much stuff if you already have it. – Trellis Aug 2 '18 at 20:37
1

Included is the source for an AppleScript droplet that can be used to transcode video files.

You'll need a modern installation of ffmpeg, such as the one you can get by installing HomeBrew and running "brew ffmpeg".

This conversion has not been optimized for speed, but rather for quality.

No deletion of source files has been included in this configuration.

You won't need the autocropping. You probably won't want the conversion to 6-channel AC3 audio.

Most things you drop on this will probably end up with a greater file size after transcoding, but this will show you how a droplet for converting video might be configured.

I've got a bunch of these, but this will process most anything you download from YouTube, I think. If you can get hold of a non-copy-encrypted .m2ts file from a Blu-Ray (like the one MakeMKV can give you), that may best show you what this can do.

property temppath : "/private/tmp/"
property startnum : 0
property newline : ASCII character 10
property tmpfile : "/tmp/execme.command"

on open the_items
    my convert_Video(the_items)
end open

on convert_Video(the_items)
set theshellscript to ""
repeat with the_item in the_items
    set the_item to the_item as alias
    try
        tell application "Finder"
            set sost to (container of the_item) as string
        end tell
        set pos_filepath to POSIX path of sost
    end try
    set this_filepath to (the_item as string)

    if last character of this_filepath is ":" then
        tell me to set it_is_a_folder to true
    else
        set it_is_a_folder to false
    end if
    set thesourcename to (name of (info for the_item))
    set namepart to (name extension of (info for the_item))
    set the_source_file to POSIX path of this_filepath
    --display dialog the_source_file
    --set thesourcename to replace_chars(thesourcename, " ", "_")
    set newname to replace_chars(thesourcename, namepart, "m4v")
    set autocrop to (do shell script "/usr/local/bin/ffmpeg -i" & space & (quoted form of the_source_file) & space & "-t 44 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1")
    try
        set theshellscript to the theshellscript & "/usr/local/bin/ffmpeg" & space & "-i" & space & (quoted form of the_source_file) & space & "-pix_fmt yuv420p -c:v libx264 -preset slow -tune film -vf \"" & autocrop & "\" -c:a ac3 -ac 6 -ab 640k -crf 18 -x264opts keyint=40:bitrate=2400:qpmin=8:qpmax=28:qpstep=4" & space & (quoted form of (pos_filepath & newname)) & ";/bin/echo '

==========================

" & newname & space & "FINISHED!" & "

==========================

';"
            on error onerr
                activate
                display dialog onerr
            end try

end repeat
set theshellscript to theshellscript & "mv" & space & (quoted form of tmpfile) & space & (quoted form of (POSIX path of (path to trash)))
do shell script "echo " & quoted form of theshellscript & " > " & tmpfile
repeat
    try
        do shell script "chmod +x " & tmpfile
        do shell script "open -a Terminal.app" & space & tmpfile
        exit repeat
    on error
        delay 1
    end try
end repeat
end convert_Video

on replace_chars(this_text, _bad, _good)
    set AppleScript's text item delimiters to the _bad
    set the item_list to every text item of this_text
    set AppleScript's text item delimiters to the _good as string
    set this_text to the item_list as string
    set AppleScript's text item delimiters to ""
    return this_text
end replace_chars

on run
    set the_items to ((choose folder) as list)
    convert_Video(the_items)
end run
  • Very cool, thanks for sharing! Unfortunately since Screenflow records to a ".scc" file, I have a feeling this will not be able to convert it. I'd have to first convert it to a mov or other standard container, to then be able to convert it again. I think Screenflow is just plain not going to work well for my needs and I'll have to keep looking. Thanks again though! – Jonathan van Clute Aug 2 '18 at 22:17
  • I made an edit, if by chance you have any ideas about it I'd love to hear them. – Jonathan van Clute Aug 2 '18 at 22:45
0

Space, I think (while the new screen recording window in QuickTime Player is frontmost). Not sure about stopping, I +clicked the QuickTime Player Dock icon and selected "Stop Recording". Next time I tried, I received an instruction pop-up when I hit Space that told me to hit the button in the menu bar to stop. Did that work? But ScreenFlow does soooo much!

BTW, ++N while QuickTime Player is Frontmost opens a new screen recording, if you don't need to automate the process from elsewhere.

  • Aha... nice to know about space! Sadly, QTPlayer only records at 30fps which is complete overkill for what I'm doing, and again results in mammoth files that I'll have to compress down after the fact. I really don't want this to be such an involved process. I'm looking to other screen-recording solutions now, that actually record at low frame rates and to a native container rather than something proprietary, as Screenflow does. – Jonathan van Clute Aug 3 '18 at 0:49
  • As a reminder, an AppleScript Folder Action could convert the output file to any framerate and size immediately upon saving, then remove the bloaty original. – Trellis Aug 3 '18 at 1:26
  • Yeah I know, I just really don't want to waste the massive amount of space and processor to record at 30 FPS vs. the 1 FPS I would be completely happy with. It just doesn't sit well with me. I have another app (Screencast-o-matic) that records great, BUT has this weird floaty window that isn't actually a proper dialog, that requires a button click first. I can't seem to grab the button in Applescript... I may post another question about this if I get desperate enough. =) – Jonathan van Clute Aug 3 '18 at 1:29

You must log in to answer this question.

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