The easy way to convert MKV to HLS. 🤖
🎥 This project automates the conversion of multiple MKV files into HLS (HTTP Live Streaming) format with multiple resolutions and audio tracks. HLS is a widely used protocol for online video streaming.
✨ Converts MKV files into HLS format.
✨ Supports multiple AAC audio tracks.
✨ Creates multiple resolutions for HLS streaming.
✨ Generates a master .m3u8
file that allows the selection of resolutions and audio tracks.
- Python 3.x: The code is written in Python 3 and requires a Python installation.
- FFmpeg: It is used to manipulate video and audio files. Ensure that FFmpeg is installed and accessible from the command line.
🖥️ NVIDIA graphics card (optional): The code utilizes NVIDIA's CUDA hardware acceleration for video conversion. It is recommended to have a CUDA-compatible NVIDIA graphics card for optimal performance.
- Clone this repository to your system.
git clone https://github.com/Z3belek/MKV-to-HLS.git
- Install Python dependencies.
pip install -r requirements.txt
- Ensure that FFmpeg is accessible from the command line.
ffmpeg -version
-
Place the MKV files in the same folder as
main.py
. -
Execute the
main.py
script to start the conversion.
py main.py
-
A folder will be created for each MKV file, and within each folder, the
resoluciones
will be created in separate subfolders. -
Temporary MP4 and AAC files will be generated and will be removed upon completion of the conversion.
-
Hls
files will be created within each resolution folder.. -
The master
.m3u8
file will be generated in the root folder of each file.
This project is licensed under the MIT License. Please refer to the (LICENSE) file for more details.
Contributions are welcome. If you wish to contribute to this project, create a Pull Request with your suggestions.