TS2HLS-Manager, HLS (HTTP Live Streaming) yönetimi için geliştirilmiş bir Bash Script aracıdır. Bu araç, kullanıcı ve Base URL yönetimi sağlar, ayrıca FFmpeg kullanarak HLS akışları oluşturur ve otomatik olarak yönetir.
-
Base URL Yönetimi
- Base URL ekleme, listeleme ve silme.
- ID ve takma adlarla kolay kaynak yönetimi.
-
Kullanıcı Yönetimi
- Kullanıcı oluşturma ve kaldırma.
- Her kullanıcı için özelleştirilmiş yayın URL'leri.
-
Canlı Akış İşleme
- FFmpeg ile HLS formatında akış oluşturma.
- Segment sürelerini ve otomatik silme özelliklerini destekler.
-
Nginx Yapılandırması
- HLS dizinini sunmak için Nginx yapılandırmasını otomatik olarak ayarlar.
-
Linux veya macOS* (Windows için Bash simülasyon araçları gereklidir. WSL ile çalışabilir)
-
AlmaLinux >= 8
-
Arch Linux
-
CentOS Stream >= 8
-
Debian >= 10
-
Fedora >= 30
-
Oracle Linux >= 8
-
Rocky Linux >= 8
-
Ubuntu >= 20.04
-
Pardus >= 19
-
Linux Mint >= 20
*Not: macOS'ta scriptin çalışması için Homebrew ile
ffmpeg,nginx, veapache2kurulmalı, dizinler/usr/local/var/wwwolarak değiştirilip IP alma komutuipconfig getifaddr en0ile güncellenmelidir.
Komut dosyasını indirin ve çalıştırın. Tüm gerekli olan paketleri otomatik kuracaktır.
curl -O https://raw.githubusercontent.com/livvaa/TS2HLS-Manager/main/ts2hls_live_management.sh
chmod +x ts2hls_live_management.sh
./ts2hls_live_management.sh"Kullanıcı eklemek veya kaldırmak ya da Base URL eklemek veya kaldırmak için betiği yeniden çalıştırın."
- Yeni bir Base URL ekleyin.
- Mevcut URL'leri listeleyin.
- Gereksiz URL'leri silin.
- Kullanıcı ekleyerek onlara özel HLS akışları oluşturabilirsiniz.
- Kullanıcıların tüm yayınlarını ve dizinlerini kaldırabilirsiniz.
- Script, her kullanıcı için otomatik olarak yayın URL'lerini oluşturur:
http://<server_ip>:8080/hls/<username>/<base_id>.m3u8
# Base URL ekleme işlemi sırasında:
Takma Ad: MyStream
URL: http://1.2.3.4:1234/live.ts# Kullanıcı ekleme işlemi sırasında:
Kullanıcı adı: testuser
Base URL ID'leri: 1,2Sonuç URL'ler:
http://<server_ip>:8080/hls/testuser/1.m3u8http://<server_ip>:8080/hls/testuser/2.m3u8
Script, aşağıdaki yapılandırmayı /etc/nginx/sites-available/hls dizinine otomatik olarak ekler:
server {
listen 8080;
location /hls/ {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /var/www/html;
}
}Bu proje AGPL-3.0 Lisansı ile lisanslanmıştır.
Katkıda bulunmak istiyorsanız:
- Bu repository'yi fork edin.
- Yeni bir özellik ekleyin veya hata düzeltin.
- Pull Request gönderin.
Eğer herhangi bir sorunuz veya geri bildiriminiz varsa, GitHub üzerinden bir Issue oluşturabilirsiniz.
TS2HLS-Manager is a Bash Script tool developed for managing HLS (HTTP Live Streaming). This tool provides user and Base URL management and automatically creates and manages HLS streams using FFmpeg.
-
Base URL Management
- Add, list, and delete Base URLs.
- Easy resource management with IDs and aliases.
-
User Management
- Create and delete users.
- Customized streaming URLs for each user.
-
Live Stream Processing
- Create streams in HLS format using FFmpeg.
- Supports segment durations and automatic deletion.
-
Nginx Configuration
- Automatically configures Nginx to serve the HLS directory.
-
Linux or macOS* (Windows requires Bash simulation tools. It can work with WSL.)
-
AlmaLinux >= 8
-
Arch Linux
-
CentOS Stream >= 8
-
Debian >= 10
-
Fedora >= 30
-
Oracle Linux >= 8
-
Rocky Linux >= 8
-
Ubuntu >= 20.04
-
Pardus >= 19
-
Linux Mint >= 20
*Note: For macOS, the script requires
ffmpeg,nginx, andapache2to be installed via Homebrew, directories to be adjusted to/usr/local/var/www, and the IP retrieval command to be updated toipconfig getifaddr en0.
Download and run the script. It will automatically install all the necessary packages.
curl -O https://raw.githubusercontent.com/livvaa/TS2HLS-Manager/main/ts2hls_live_management.sh
chmod +x ts2hls_live_management.sh
./ts2hls_live_management.sh"To add or remove a user, or to add or remove a Base URL, run the script again."
- Add new Base URLs.
- List existing URLs.
- Remove unnecessary URLs.
- Add users to create dedicated HLS streams for them.
- Remove all streams and directories for users.
- The script automatically generates streaming URLs for each user:
http://<server_ip>:8080/hls/<username>/<base_id>.m3u8
# During Base URL addition:
Alias: MyStream
URL: http://1.2.3.4:1234/live.ts# During user addition:
Username: testuser
Base URL IDs: 1,2Resulting URLs:
http://<server_ip>:8080/hls/testuser/1.m3u8http://<server_ip>:8080/hls/testuser/2.m3u8
The script automatically adds the following configuration to /etc/nginx/sites-available/hls:
server {
listen 8080;
location /hls/ {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /var/www/html;
}
}This project is licensed under the AGPL-3.0 License.
If you want to contribute:
- Fork this repository.
- Add a new feature or fix a bug.
- Submit a Pull Request.
If you have any questions or feedback, you can create an Issue on GitHub.