Saving movie frames for large dataset

Summary of what happened:

I would like to save the sagittal view for slices of a brain for multiple subjects. The tutorial (FsTutorial/OutputData_freeview - Free Surfer Wiki) has us doing this “manually” through the GUI. Is there a way to call the “Save Movie Frames” command through the terminal so that I can iterate through my subjects?

In addition, is there a way to only export non-empty slices, as exporting slices 0 to 255 would include “empty” slices at both ends.

Thanks!

Command used (and if a helper script was used, a link to the helper script or the command generated):

freeview -v /Users/user_home/T1.mgz \
/Users/user_home/brainmask.mgz \
/Users/user_home/aseg.mgz:colormap=lut:opacity=0.3 \
-f /Users/user_home/lh.white:edgecolor=blue \
/Users/user_home/lh.pial:edgecolor=red \
/Users/user_home/rh.white:edgecolor=blue \
/Users/user_home/rh.pial:edgecolor=red

Version:

freesurfer-macOS-darwin_x86_64-7.4.1-20230614-7eb8460