Best Free Video Format Converter 2025 | Convert Videos to MP4, AVI, MOV, MKV | FuzzuTech

Demo :


Click Video πŸ‘‡πŸ‘‡πŸ‘‡



















Code :


import customtkinter as ctk

from tkinter import filedialog

import subprocess

import threading

import os


# ───────────────────────────────────────

# FFmpeg-based video conversion function

# ───────────────────────────────────────

def convert_video(input_path, output_format, output_path):

    if not os.path.isfile(input_path):

        return "❌ File not found."


    try:

        command = [

            "ffmpeg",

            "-i", input_path,

            output_path

        ]

        subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

        return f"✅ Converted to {output_format.upper()}\n{output_path}"

    except Exception as e:

        return f"⚠️ Error: {e}"


# ────────────────────────

# Setup GUI using CTk

# ────────────────────────

ctk.set_appearance_mode("System")

ctk.set_default_color_theme("blue")


formats = ["mp4", "avi", "mov", "wmv", "flv", "mkv", "webm", "3gp", "mpeg", "mpg", "ogg", "gif"]


app = ctk.CTk()

app.title("Fuzzu Video Converter")

app.geometry("500x300")


def browse_file():

    filepath = filedialog.askopenfilename(filetypes=[("Video files", "*.*")])

    input_entry.delete(0, ctk.END)

    input_entry.insert(0, filepath)


def start_conversion():

    input_path = input_entry.get()

    output_format = format_var.get()

    base = os.path.splitext(input_path)[0]

    output_path = f"{base}_converted.{output_format}"


    result_label.configure(text="πŸ”„ Processing... Please wait...")

    app.update_idletasks()


    # Background me convert_video run hoga

    def run_conversion():

        result = convert_video(input_path, output_format, output_path)

        result_label.configure(text=f"Result: {result}")


    threading.Thread(target=run_conversion).start()


ctk.CTkLabel(app, text="Video Format Converter", font=("Arial", 20)).pack(pady=10)


input_entry = ctk.CTkEntry(app, width=400, placeholder_text="Choose your video file")

input_entry.pack(pady=10)


browse_button = ctk.CTkButton(app, text="Browse", command=browse_file)

browse_button.pack(pady=5)


format_var = ctk.StringVar(value="mp4")

format_menu = ctk.CTkOptionMenu(

    app,

    values=formats,

    variable=format_var,

    anchor="center" 

)

format_menu.pack(pady=20)


convert_button = ctk.CTkButton(app, text="Convert", command=start_conversion)

convert_button.pack(pady=10)


result_label = ctk.CTkLabel(app, text="", text_color="green")

result_label.pack(pady=10)


app.mainloop()

Comments

Popular posts from this blog

πŸš€ Simple Login & Registration System in Python Tkinter πŸ“±

πŸš€ Create a Python Screen Recorder with Audio (Complete Code)

Python IP Tracker App with GUI | Track IP Location Real-Time! (Working Project)