Skip to content

Instantly share code, notes, and snippets.

@void4
Created May 28, 2018 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save void4/070ea1e8fee9e5e25164b62d8c0dacb0 to your computer and use it in GitHub Desktop.
Save void4/070ea1e8fee9e5e25164b62d8c0dacb0 to your computer and use it in GitHub Desktop.
import os
import time
import subprocess
with open(os.devnull, 'w') as devnull:
subprocess.Popen('ffmpeg -y -re -f lavfi -i "sine=frequency=440:duration=20" -blocksize 2048 test.wav', shell=True)
time.sleep(0.1)
while True:
print(os.path.getsize("test.wav"))
time.sleep(0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment