I am experiencing an issue with recording the screen and system audio on an EC2 instance on AWS. I am using the command screencapture -v -g <filename>
to record the screen along with audio, with the audio routed using BlackHole.
When I manually log into the instance and execute screencapture -v -g <filename>
, the recording captures both the screen and the audio correctly. However, when I run a GitHub Action on the instance to execute the same command using Python, the recording only captures the screen without the audio.
Here is the Python code I am using to start the recording:
import subprocess
command = 'screencapture -v -g ~/Movies/Recording.mp4'
result = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, text=True)
Has anyone faced a similar issue or can provide guidance on how to ensure the audio is captured when the command is executed via a GitHub Action?
I’m expecting to be able so also captures the audio from the python code – i don’t see any much different.
Alternative for OBS is not good enough since most of the time the videos are coming also without audio