Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hmlendea/stream-to-m3u
Get M3U playlist links for liverstreams from various platforms
https://github.com/hmlendea/stream-to-m3u
iptv m3u m3u8
Last synced: about 2 months ago
JSON representation
Get M3U playlist links for liverstreams from various platforms
- Host: GitHub
- URL: https://github.com/hmlendea/stream-to-m3u
- Owner: hmlendea
- License: gpl-3.0
- Created: 2019-05-01T23:07:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-14T10:30:05.000Z (over 1 year ago)
- Last Synced: 2023-08-05T03:42:40.468Z (over 1 year ago)
- Topics: iptv, m3u, m3u8
- Language: C#
- Homepage:
- Size: 115 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![Donate](https://img.shields.io/badge/-%E2%99%A5%20Donate-%23ff69b4)](https://hmlendea.go.ro/fund.html) [![Build Status](https://github.com/hmlendea/stream-to-m3u/actions/workflows/dotnet.yml/badge.svg)](https://github.com/hmlendea/stream-to-m3u/actions/workflows/dotnet.yml)
# About
Tool for retrieving the M3U playlist URL for a given live stream
# Usage
The tool is used as just another console application.
Open a terminal and run the `SteamToM3U` executable, making sure that all the desired arguments are supplied.
# Configuration
The settings are supplied via CLI arguments
The following arguments are used to indicate the source of the stream
| Argument | Description |
|--------------------------------------------------------------|---------------------------------|
| --youtube
--yt | Sets the source to YouTube |
| --twitch | Sets the source to Twitch |
| --tvsporthd
--tvsport
--tvshd
--tvs | Sets the source to TV Sport HD |
| --antena-play
--antenaplay
--antena
--aplay
--ap | Sets the source to Antena Play |If no source argument is provided, a generic solution will be attempted
Each source will require a different set of arugments to indicate the desired live stream, as follows
## YouTube
| Argument | Description | Optional |
|-----------------|------------------------------|-----------|
| --channel
-c | The host channel ID | Mandatory |
| --title
-t | The title of the live stream | Optional |## Twitch
| Argument | Description | Optional |
|-----------------|------------------------------|-----------|
| --channel
-c | The host channel ID | Mandatory |## TV Sport HD
| Argument | Description | Optional |
|-----------------|------------------------------|-----------|
| --channel
-c | The host channel ID | Mandatory |## Antena Play
| Argument | Description | Optional |
|-----------------|------------------------------|-----------|
| --channel
-c | The host channel ID | Mandatory |## Other
| Argument | Description | Optional |
|-------------|---------------------------------------------------|-----------|
| --url
-u | The URL of the page that contains the live stream | Mandatory |## Running in background as a service
**Note:** The following instructions only apply for *Linux* distributions using *systemd*.
Create the following service file: /usr/lib/systemd/system/[email protected]
```
[Unit]
Description=Stream to M3U (%i channels)[Service]
WorkingDirectory=[ABSOLUTE_PATH_TO_SERVICE_DIRECTORY]
ExecStart=[ABSOLUTE_PATH_TO_SERVICE_DIRECTORY]/StreamToM3U -i [ABSOLUTE_PATH_TO_SERVICE_DIRECTORY]/Data/input-%i.xml -O /srv/http/iptv/livestreams/%i -u http://mydomain.com/iptv
MemoryAccounting=yes
MemoryMax=256M[Install]
WantedBy=multi-user.target
```Create the following timer file: /lib/systemd/system/stream-to-m3u.timer
```
[Unit]
Description=Periodically creates an M3U playlist out of livestreams (%i channels)[Timer]
OnBootSec=3min
OnUnitActiveSec=40min[Install]
WantedBy=timers.target
```Values that you might want to change:
- *OnBootSec*: the delay before the service is started after the OS is booted
- *OnUnitActiveSec*: how often the service will be triggered
- *MemoryMax*: RAM usage limitIn the above example, the service will start 3 minutes after boot, and then again once every 40 minutes, being allocated 256M RAM per instance