I have two subprocesses as I showed below
cmd1='arecord -d 0 -f cd -t wav test.wav'
cmd2='raspivid -o video.h264 -fps 25 -t 0'
pro1 = subprocess.Popen(cmd1, shell=True)
pro2 = subprocess.Popen(cmd2, shell=True)
I want to record audio and video at the same time with raspberry pi. From now on I can start both programs but I cannot stop these programs. Can anybody help me?
Or any idea for doing by simple way this process?