SkillAgentSearch skills...

Ytdlp2STRM

A little script to serve Youtube / Twitch / Crunchyroll videos without storage it. Uses yt-dlp HTTP data throught Flask and dynamic URLs. We can use this dynamic URLs to set STRM files.

Install / Use

/learn @fe80Grau/Ytdlp2STRM
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ytdlp2STRM

<a href="https://www.buymeacoffee.com/fe80grau" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="width: 120px !important;" ></a>

  • Youtube / Twitch / ~~Crunchyroll~~ etc. to STRM files
  • Watch Youtube through Jellyfin or Emby
  • Watch Twitch through Jellyfin or Emby
  • ~~Watch Crunchyroll through Jellyfin or Emby~~ https://github.com/fe80Grau/ytdlp2STRM/issues/52 ytdlp2STRM <img width="2872" height="1662" alt="image" src="https://github.com/user-attachments/assets/42a7ffb4-5364-48ba-a47c-f62ba0e4c8b0" />

Prerequisite

  • Python 3 https://www.python.org/downloads/
  • FFmpeg https://ffmpeg.org/

Installation and usage

  • To allocate ytdlp2STRM, I suggest using /opt/ in Linux or C:\ProgramData in Windows.

Linux

  • The next steps have been tested on Ubuntu 22.04 LTS. In terminal:
cd /opt && git clone https://github.com/fe80Grau/ytdlp2STRM.git
  • Install requierments.txt
cd /opt/ytdlp2STRM && pip install -r requierments.txt
  • Copy service file to system services folder
sudo cp config/ytdlp2strm.service /etc/systemd/system/ytdlp2strm.service
  • Enable service
sudo systemctl enable ytdlp2strm.service
  • Start service
sudo systemctl start ytdlp2strm.service
  • Check it
sudo systemctl status ytdlp2strm.service
  • Check GUI in browser
http://localhost:5000/

Windows

  • The next steps have been tested on Windows 11 Pro 22H2. Using Powershell or Windows Terminal with Administrator privileges:
cd C:\ProgramData; git clone https://github.com/fe80Grau/ytdlp2STRM.git;
  • Install requierments.txt
cd C:\ProgramData\ytdlp2STRM; pip install -r requierments.txt
  • Create a task that is scheduled to run main.py at startup. If you plan to install ytdlp2STRM in a different folder than C:\ProgramData\ytdlp2STRM, edit ./config/MS-TASK-ytdlp2STRM.xml
schtasks.exe /create /tn "ytdlp2STRM" /xml C:\ProgramData\ytdlp2STRM\config\MS-TASK-ytdlp2STRM.xml
  • Run task
schtasks.exe /run /tn "ytdlp2STRM"
  • In case everything is working, these commands will return "Running"
(Get-ScheduledTask | Where TaskName -eq ytdlp2STRM ).State
  • Check the GUI in the browser.
http://localhost:5000/

Docker

To deploy this as a Docker container, follow these steps in the ytdlp2STRM root folder.

  • Build Docker image. The default host port is 5005, to change it edit Dockerfile and change the env value of DOCKER_PORT with the same port that you will configure in the docker run command.
docker build . -t "ytdlp2strm" 
  • Create a volume to preserve data.
docker create --name ytdlp2strm-data ytdlp2strm 
  • Run the container with volume and mount D:\media (host folder for accessing strm files, change it as you prefer) in /media (container folder).
docker run -p 5005:5000 --restart=always -d -v D:\media:/media --volumes-from ytdlp2strm-data --name ytdlp2STRM ytdlp2strm
  • Check the GUI in the browser
http://localhost:5005/

Docker HUB

  • https://hub.docker.com/r/fe80grau/ytdlp2strm image

    • Run container. To persist strm files, you must configure a volume, that is, a directory on the host that points to the /media directory in the container. Also, the default env value of DOCKER_PORT is 5005, make sure to put 5005 as host port or re-declare the env value of DOCKER_PORT like I do in the following screenshot. image
  • Check the GUI in the browser

http://localhost:5001/

Docker compose YAML template

  • Thank you INPoppoRTUNE
  • INPoppoRTUNE was here
---
services:
 ytdlp2strm:
    image: fe80grau/ytdlp2strm
    container_name: ytdlp2STRM
    environment:
      - AM_I_IN_A_DOCKER_CONTAINER=Yes
      - DOCKER_PORT=5005
    volumes:
      - /local/path/to/media:/media
      - /local/path/to/channel_list.json:/opt/ytdlp2STRM/plugins/youtube/channel_list.json
      - /local/path/to/yt_config.json:/opt/ytdlp2STRM/plugins/youtube/config.json
      - /local/path/to/config.json:/opt/ytdlp2STRM/config/config.json
      - /local/path/to/crons.json:/opt/ytdlp2STRM/config/crons.json
      - ytdlp2strm-data:/opt/ytdlp2STRM
    ports:
      - 5005:5000
    restart: always
volumes:
  ytdlp2strm-data:

Where:

  • /local/path/to/media is the local folder where the .strm file will be created
  • /local/path/to/config.json is optional and will set your ytdlp2STRM general settings; formatted as config.example.json
  • /local/path/to/crons.json is optional and will set your ytdlp2STRM cronjob settings; formatted as crons.example.json
  • /local/path/to/channel_list.json is optional and will set your Youtube channel list; formatted as channel_list.example.json
  • /local/path/to/yt_config.json is optional and will set your Youtube plugin settings; formatted as config.example.json
  • The default env value of DOCKER_PORT is 5005, make sure to put 5005 as host port or re-declare the env value of DOCKER_PORT

Additional info

  • After that you can view all channels folders within /media/Youtube and their strm files. If you are using Jellyfin/Emby, add /media/Youtube, /media/Twitch ~~and /media/Crunchyroll~~ as folders in Library and enjoy it!

New in v1.1.0

  • Season folders by year: YouTube and Twitch videos are now organized in year-based Season folders
    • Structure: Channel/Season {year}/S{year}E{XX} - video.strm
    • Example: Channel [ID]/Season 2025/S2025E01 - Video Title.strm
  • UI improvements:
    • New UI
  • Authentication improvements:
    • All yt-dlp commands now properly use cookie authentication
    • Better handling of subscriber-only content on Twitch

Youtube

  • SponsorBlock doesn't work in redirect mode.
  • Local NFO for each video
  • audio- prefix
  • Season folders by year: Videos are organized in Season {year} folders (e.g., Season 2025, Season 2026)
  • Episode numbering: Files are named S{year}E{XX} format, resetting to E01 each year
  • Cookie authentication: Supports both browser cookies and cookie files for age-restricted content
  • Language configuration: Configurable audio language via lang parameter in config.json

Twitch

  • If a live video is on air the !000-live-channel.strm will be created. The script will download the strm for each video in the /videos channel tab in any manner. Take a look at the limits and daterange values for videos in ./plugins/twitch/config.json.
  • SponsorBlock doesn't work in redirect mode, Twitch only works in direct mode at the moment.
  • Season folders by year: Videos are organized in Season {year} folders (e.g., Season 2025, Season 2026)
  • Episode numbering: Files are named S{year}E{XX} format, resetting to E01 each year
  • Cookie authentication: Supports browser cookies for subscriber-only content

TV3

  • Plugin for 3cat, content in Catalan.

~~Crunchyroll~~

  • ~~Requieres a cookie file from Premium user login (you can extract the cookie file from Crunchyroll with browser extension like https://chrome.google.com/webstore/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) or load a fresh cookie from browser (check discusion in https://github.com/yt-dlp/yt-dlp/issues/7442#issuecomment-1685036245).~~
  • ~~Requires yt-dlp nightly build to work. yt-dlp >=2024.05.22.232749.dev0~~
  • ~~Only works with login auth.~~
  • ~~I'm using a filter language your crunchyroll_audio_language config value and extractor crunchyrollbeta:hardsub=your crunchyroll_subtitle_language config value to get a version with one language and subs embedded~~
  • ~~To avoid constant rewriting of the strm files, a file called last_episode.txt is generated in the series directory, it contains the playlist position of the last strm downloaded, this will only generate strm for new episodes.~~
  • ~~Patch yt-dlp if Crunchyroll not works https://github.com/yt-dlp/yt-dlp/issues/7442#issuecomment-1637748442~~
  • ~~mutate_values.json A particular file for this plugin. Overwrites the value of a specified field. For example, in cases where the season given by yt-dlp - season_number does not correspond to the actual season of the series. The available fields are as follows: season_number, season, episode_number, and episode.~~
  • ~~direct mode. On Crunchyroll, the direct mode inherits the functionality of the download mode. ~~
  • ~~bridge mode. Given the latest updates, it is necessary to obtain the audio and video streams separately, redirect their output, and remux both tracks to finally serve them over HTTP. Experimental, sometimes it may fail to start playback and you need to try playing it again. There is no timestamp and it is not possible to navigate through the video's timeline.~~
  • ~~With download mode, the audio and video streams will be downloaded separately, and after downloading, they will be remuxed to finally serve a final video/mp4 file. The files will be downloaded to ./temp/ and their lifespan will be 24 hours. This is configurable in config.json -> ytdlp2strm_temp_file_duration. The Crunchyroll plugin in download mode will automatically download the latest discovered episode of each series declared in channel_list.json.~~
  • ~~In the config.json file, and specifically for the Crunchyroll plugin, there are 4 parameters: `jellyfin_pr
View on GitHub
GitHub Stars443
CategoryContent
Updated1d ago
Forks35

Languages

Python

Security Score

100/100

Audited on Mar 20, 2026

No findings