# Subtitle details for i, stream in enumerate(subtitle_streams): print(f"\n📝 Subtitle Stream {i}:") print(f" Codec: {stream.get('codec_name', 'Unknown')}") print(f" Language: {stream.get('tags', {}).get('language', 'Unknown')}") display_mkv_info("1234.mkv") 2. Stream Extraction Feature def extract_streams(filepath="1234.mkv"): """Extract individual streams from MKV""" streams = analyze_mkv(filepath)
if "error" in info: print(f"❌ {info['error']}") return
# Check if file exists if not os.path.exists(filepath): return {"error": f"File {filepath} not found"}
result = subprocess.run(cmd, capture_output=True, text=True) return json.loads(result.stdout) def display_mkv_info(filepath="1234.mkv"): """Display formatted MKV information"""