Files
ffmpeg_collection/ffprobe_drop.py
Elghinnarisa d4d12e2d41 updated
2022-09-09 20:18:34 +02:00

41 lines
731 B
Python

import subprocess
import sys
from pathlib import Path
droppedFile = sys.argv[1]
droppedName = Path(droppedFile).name
skipto = " -ss "
#droppedFile = "test.mkv"
count = 0
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
for each in arguments:
i = 0
print(each)
arguments = ( "ffprobe.exe ", " -i ", '"' , each, '"' )
arg_list = "".join(map(str, arguments))
print(arg_list)
#print(each)
cmd = subprocess.Popen(arg_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='UTF-8')
subprocess_err = cmd.stderr.read()
#for line in subprocess_err:
# print(line)
print(subprocess_err)
i += 1
k=input("press close to exit")