Skip to content

mateuszjanczak/video-downloader-hls-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎥 Video Downloader & HLS Converter

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

🔧 Features

  • 📥 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

▶️ Example Workflow

  1. Start server and get Pinggy link
  2. Submit direct MKV video link
  3. Wait for streams to be parsed
  4. Select 1080p video + English audio + English subtitles
  5. Click “Convert to HLS”
  6. Watch it on your phone/TV via browser

Demo

🛠 Requirements

pip install flask flask-socketio requests
apt install ffmpeg -y

🚀 How to Use in Google Colab

  1. Clone repository

    !git clone https://github.com/mateuszjanczak/mkv-to-hls-stream.git
  2. Install dependencies

    !pip install flask requests flask_socketio
    !apt install ffmpeg -y
  3. Expose server via Pinggy (in a code cell with %%bash or 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.

  4. Run the Flask server

    !python app.py
  5. Open your Pinggy HTTPS link to access the app.

📎 Notes

  • 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

🤖 AI Notice

This entire codebase was fully generated by AI engines. It is provided as-is and may require review and testing before production use.

About

Convert and stream videos as HLS from Google Colab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors