The title mentions both Linux and Mac and that's not a typo: I have a requirement to record my screen on my Linux box and then put that video into iMovie on Mac for editing. (Yes, I could have used a Linux video editor but that's a different story)
I installed a simple screencasting tool called Kazam on my Linux box, record and save the movie in H264 format, which is the same encoding as QuickTime (Mac)
However, QuickTime refused to open my file! It turns out the pixel format is the culprit:
ffmpeg -i 'Screencast 2020-09-03 13:59:50.mp4' -pix_fmt yuv420p -f mov output.mov
I have to convert from "Planar 4:4:4 YUV" to yuv420p for QuickTime.
Bonus: Next I needed to record the screen from my Mac, which I could use QuickTime. However, I have too many icons on my desktop and it'd look better if I hide them. Turns out it's easy in command line:
defaults write com.apple.finder CreateDesktop false killall Finder
defaults write com.apple.finder CreateDesktop true killall Finder