0

I made this script

import os
import sys
import subprocess
from tkinter import *
from tkinter import filedialog
print("Compressing......")
file_path = filedialog.askopenfilename(title = "Select Video", filetypes = (("Mp4", "*.mp4"), 
            ("AVI", "*.avi"), ("MOV", "*.mov"), ("3gp", "*.3gp")))
print (file_path)
result = subprocess.run("TOOLS\\ffmpeg.exe -i "+ (str(file_path))+"-b 800k output.mp4")
print("Process Succesfull")

But When I run it and selects a file this error is comming-

Traceback (most recent call last):
  File "D:\Compressor.py", line 10, in <module>
    result = subprocess.run("TOOLS\\ffmpeg.exe -i "+ (str(file_path))+"-b 800k output.mp4")
  File "C:\Program Files\Python37\lib\subprocess.py", line 488, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Program Files\Python37\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "C:\Program Files\Python37\lib\subprocess.py", line 1207, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

Can Anybody help me Can Anybody help me Can Anybody help me

0 Answers0