# Extract subtitles if present subprocess.run([ 'ffmpeg', '-i', filepath, '-map', '0:s:0', '-c', 'copy', '1234_subtitles.srt' ]) print("✅ Streams extracted from 1234.mkv") def remux_mkv(filepath="1234.mkv", output="1234_remuxed.mkv"): """Remux MKV to optimize or remove streams""" # Remove unwanted streams (example: keep only first video and audio) subprocess.run([ 'ffmpeg', '-i', filepath, '-map', '0:v:0', '-map', '0:a:0', '-c', 'copy', output ])
# Use ffprobe to get media info cmd = [ 'ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', filepath ]
print(f"✅ Remuxed to {output}") # Install dependencies pip install pymediainfo Or use command line tools ffprobe -v quiet -print_format json -show_format -show_streams 1234.mkv mkvmerge -i 1234.mkv mediainfo 1234.mkv GUI Version (using tkinter) import tkinter as tk from tkinter import ttk, filedialog class MKVAnalyzer: def init (self): self.root = tk.Tk() self.root.title("MKV Analyzer - 1234.mkv")
# Stream analysis streams = info['streams'] video_streams = [s for s in streams if s['codec_type'] == 'video'] audio_streams = [s for s in streams if s['codec_type'] == 'audio'] subtitle_streams = [s for s in streams if s['codec_type'] == 'subtitle']
Request a free trial license extension in case you need more time to evaluate our product. You will receive your new trial license shortly after you fill out the application.
Cloud services and managed services providers can benefit with our products. The Terminalworks Partner Program enables you to buy license packages of Terminalworks products and resell them.