Stabilisation
This commit is contained in:
parent
9dcb59f9a0
commit
3692bd56b5
@ -103,11 +103,20 @@ def volume_audio(file, infos):
|
||||
return volumes
|
||||
|
||||
|
||||
def stabilization(file):
|
||||
'''
|
||||
Cette fonction permet de stabiliser l'image,
|
||||
par exemple quand filmé au smartphone.
|
||||
'''
|
||||
cmd_stab = f'ffmpeg -i {file} -vf vidstabdetect=shakiness=10:accuracy=10:result="/tmp/vidstab.trf" -f null - '
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("f_input")
|
||||
parser.add_argument("-d", "--debug", dest='debug', action='store_true')
|
||||
parser.add_argument("-d", "--debug", dest="debug", action="store_true")
|
||||
parser.add_argument("-s", "--stabilise", dest="stab", action="store_true")
|
||||
args = parser.parse_args()
|
||||
if args.debug:
|
||||
logging.basicConfig(format='[%(asctime)s]\n%(message)s', level=logging.DEBUG, datefmt='%d/%m/%Y %H:%M:%S')
|
||||
@ -117,3 +126,6 @@ if __name__ == '__main__':
|
||||
interlaced = is_interlaced(args.f_input, infos)
|
||||
cropsize = cropping(args.f_input, infos)
|
||||
volumes = volume_audio(args.f_input, infos)
|
||||
if args.stab:
|
||||
stabilization(f_input)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user