This tool lets you download a video file (like an MKV) directly to Google Colab, choose only the video, audio, and subtitle streams you need, and convert the result to HLS format — ready to stream via a public HTTPS link.
Perfect for:
- Watching large MKV files on a TV
- Keeping only specific audio/subtitle tracks
- Streaming from Colab without full download
- 📥 Download any direct video URL
- 🧠 Auto-detect streams via ffprobe
- ✅ Choose video/audio/subtitle tracks
- ⚡ Live progress with WebSockets
- 🎞️ Convert to adaptive HLS with ffmpeg
- 🖥️ Built-in HTML5 video player
- Start server and get Pinggy link
- Submit direct MKV video link
- Wait for streams to be parsed
- Select 1080p video + English audio + English subtitles
- Click “Convert to HLS”
- Watch it on your phone/TV via browser
pip install flask flask-socketio requests
apt install ffmpeg -y-
Clone repository
!git clone https://github.com/mateuszjanczak/mkv-to-hls-stream.git
-
Install dependencies
!pip install flask requests flask_socketio !apt install ffmpeg -y
-
Expose server via Pinggy (in a code cell with
%%bashor via terminal)ssh -p 443 -R0:localhost:4500 -o StrictHostKeyChecking=no -t a.pinggy.io x:https
This gives you a public HTTPS URL like
https://abc123.pinggy.io. -
Run the Flask server
!python app.py
-
Open your Pinggy HTTPS link to access the app.
- Works with any ffmpeg-supported format
- Subtitles are converted to WebVTT (for HTML5 compatibility)
- Everything runs in Google Colab runtime
- Great for Chromecast, Apple TV, Smart TVs
This entire codebase was fully generated by AI engines. It is provided as-is and may require review and testing before production use.
