Created
February 2, 2022 03:26
-
-
Save tusharhero/1635bdcaf616e3c310a9492d993ec17c to your computer and use it in GitHub Desktop.
A script to use termux-api to record videos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
a = 0 | |
dir = input('dir: ') | |
l = 10 | |
C=str(input('camera: ')or"0") | |
while a < l: | |
a = 1 + a | |
c = 'termux-camera-photo -c '+ C+" " + dir + str(a) + '.jpeg' | |
print(c) | |
os.system(c) | |
print(a) | |
os.chdir(dir) | |
c ="ffmpeg -f -framerate 1 -i %d.jpeg output.avi" | |
print(c) | |
os.system(c) | |
print('done') | |
print('check ' + dir +'output.mp4') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment