Catching no ffmpeg exception

This commit is contained in:
SevaSk 2023-06-03 11:43:50 -04:00
parent 54f98f8280
commit 579fdc9466
2 changed files with 8 additions and 1 deletions

View File

@ -28,7 +28,7 @@ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManage
``` ```
Once Chocolatey is installed, you can install FFmpeg by running the following command in your PowerShell: Once Chocolatey is installed, you can install FFmpeg by running the following command in your PowerShell:
``` ```
choco install ffmpeg-full choco install ffmpeg
``` ```
Please ensure that you run these commands in a PowerShell window with administrator privileges. If you face any issues during the installation, you can visit the official Chocolatey and FFmpeg websites for troubleshooting. Please ensure that you run these commands in a PowerShell window with administrator privileges. If you face any issues during the installation, you can visit the official Chocolatey and FFmpeg websites for troubleshooting.

View File

@ -8,6 +8,7 @@ import time
import torch import torch
import sys import sys
import TranscriberModels import TranscriberModels
import subprocess
def write_in_textbox(textbox, text): def write_in_textbox(textbox, text):
textbox.delete("0.0", "end") textbox.delete("0.0", "end")
@ -65,6 +66,12 @@ def create_ui_components(root):
return transcript_textbox, response_textbox, update_interval_slider, update_interval_slider_label, freeze_button return transcript_textbox, response_textbox, update_interval_slider, update_interval_slider_label, freeze_button
def main(): def main():
try:
subprocess.run(["ffmpeg", "-version"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except FileNotFoundError:
print("ERROR: The ffmpeg library is not installed. Please install ffmpeg and try again.")
return
root = ctk.CTk() root = ctk.CTk()
transcript_textbox, response_textbox, update_interval_slider, update_interval_slider_label, freeze_button = create_ui_components(root) transcript_textbox, response_textbox, update_interval_slider, update_interval_slider_label, freeze_button = create_ui_components(root)