All apps · 0 apps
YT-DLP-Web-Player
Docker app from Matszwe02's Repository
Overview
Readme
View on GitHub
YT-DLP Web Player
Internet video player powered by yt-dlp
Features
- Daily auto update of yt-dlp to immediately support new yt-dlp codecs and sites
- everything you would expect a modern player to have
- fast loading speed (most videos load in 3s)
- livestream support
- minimalistic UI, configurable theme color
- paste video URL / type search query / auto pasting from clipboard
- zoom to fill for all devices
- download, repeat videos
- optional music visualizer
- browser extension
- PWA
some of these features are off by default and need to be turned on in .env
|
Main Page (PWA) Paste URL, seach for a video or click enter - when input field is empty, it will auto-fill from clipboard
|
Vertical Video Support Player automatically adjusts its aspect ratio to each video, in fullscreen you can zoom to fill
|
|
Phone App Installable as PWA app - native phone experience, opening links with "share with YT-DLP Player"
|
Browser Extension Replace all videos seamlessly - consistent UI across every website, no irritating autoplay
|
Planned
- video quality changing without interrupts
- user-side player configuration
Limitations
- only YT-DLP supported videos work
- video loading times and fallbacks:
- most videos load in around 3 seconds
- if it fails, transcoding starts and video loads in around 10s
- if it also fails, the whole video is getting downloaded until it becomes available
- project is under heavy development - you may expect bugs and issues
Technologies used
- yt-dlp as a video downloader
- videojs as a robust player
- HLS transcoding for the most reliable playback
- ffmpeg for better format support
- node / deno for solving YT-DLP's js challenges
- sponsorblock integration
- Media Session API integration for system playback controls
- Audio Context API for audio over-amplification and music visualizer
How to run
App should be accessible at http://localhost:5000
Docker
docker run -p 5000:5000 matszwe02/ytdlp_web_player:stable- if you want stable version, ready for everyday use
docker run -p 5000:5000 matszwe02/ytdlp_web_player:latest- if you want latest version - may have new and experimental features, it may also contain more bugs
OR
- Clone repo
- Run
docker compose up - For automatic app updates, see
compose.yml - To enable environment:
- Uncomment:
# env_file: # - src/.env - Copy
src/example.envtosrc/.env, modify as needed
- Uncomment:
- To enable HTTPS, see
compose.yml- then you can access the HTTPS app with https://localhost:5001
- your browser will warn you about not secure connection, you need to click on "allow"
Run locally (Python)
- Create and activate a virtual environment in
src/and installrequirements.txt - optionally install
ffmpegandnode/deno, otherwise they will be automatically installed to your venv - run
main.py - To enable environment:
- Copy
src/example.envtosrc/.env, modify as needed
- Copy
Build application
Due to the packaging of necessary python modules, yt-dlp update may break on older builds when yt-dlp updates its dependencies, and app rebuild is necessary.
- Clone repo
- install python3 and nodejs
- Create and activate a virtual environment
- run
/app/build_app.py - app and CLI should appear in
/dist
Cookies
Some videos need cookies to work. With cookies you will be logged in to the video streaming's website while using the app.
- Create
src/cookies.txtfile and enable incompose.yml(if using docker) - Paste relevant cookies into that file (I suggest using an extension for that, which exports cookies in netscape format)
- yt-dlp created a nice guide about providing the cookies
- If using extension, you can enable automatic sending of browser cookies for individual videos in extension settings
Keep in mind that cookies work the same way as your account credentails - anyone having them may mess up your account.
I do not guarantee that cookies file is completly secure from accessing it through the player. Additionally yt-dlp uses them when playing videos on behalf of the provided account. So I only recommend putting throwaway accounts here.
Extension
YT-DLP Web Player provides an extension that replaces every video in allowed (in extension settings) domains with YT-DLP Player. That results with all of the default video players to be seamlessly replaced with YT-DLP Player
- This extension will disable all media playback on the website, disable native player and create YT-DLP Player's iframe in its place
There are 3 ways of running this extension:
Browser Extension
Additionally adds Open in YT-DLP Player context menu for all links. So you can right-click any link and it is opened in YT-DLP Player directly
- Extension available in Chrome Web Store and Firefox Add-ons
- alternatively, you can clone this repo and load it from
/extensiondirectory
- alternatively, you can clone this repo and load it from
- Put player's URL in extension settings
- In extension settings: enable/disable domains or start/stop temporarily
Tampermonkey script
- Create a new script and copy extension js from player's dropdown menu (or
/extension/extension.js) - In script settings: enable/disable domains or start/stop temporarily
- For some websites you need to install one of
disable CSMextensions
Developer Tools script
It is a temporary solution, every page reload clears it
- copy extension js from player's dropdown menu (or
/extension/extension.js) and paste into developer tools - For some websites you need to install one of
disable CSMextensions
Demo, other use cases
Demo server
Low performance and may be IP blacklisted due to this server's limitations
https://ytdlp-web-player.vercel.app
Proof-of-Concept YT-DLP Web Player inside Invidious
https://hub.docker.com/r/matszwe02/invidious_ytdlp_web_player
Sharing
This player fully supports Open Graph - sharing it through social media and messaging apps shows video's title, thumbnail, and allows for direct playback
Embedding player
If you want to embed this player, use /iframe?url=... endpoint
Troubleshooting
I can't install PWA / embed it as an iframe / extension does not load
You need a working HTTPS for this, see in How to run. Some features will work when you run through HTTP from localhost, but it may not work properly.
I can't play some videos
Please check if it's supported by yt-dlp here.
Also check yt-dlp's issues.
You can even try to download yt-dlp and download that video with it, to ensure there is a way to download it.
If it appears to be supported, fill in a bug report with app logs.
Can this app do XYZ?
This readme does not mention every configuration option. See example.env and check if the feature you want is already settable. If not, I'm open for feature requests.
Other issues
Please fill in a bug report. Attach browser and app logs if relevant, app version, browser name, etc.
Star History
Install YT-DLP-Web-Player on Unraid in a few clicks.
Find YT-DLP-Web-Player in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Categories
Download Statistics
Related apps
Explore more like this
Explore allDetails
ghcr.io/matszwe02/ytdlp_web_player:stableRuntime arguments
- Web UI
http://[IP]:[PORT:5000]- Network
bridge- Shell
sh- Privileged
- false
Template configuration
HTTP port for the WebUI.
- Target
- 5000
- Default
- 5000
- Target
- APP_TITLE
- Default
- YT-DLP Player
- Target
- THEME_COLOR
- Default
- #ff7300
generate sprites for videos below this duration (0 to disable)
- Target
- GENERATE_SPRITE_BELOW
- Default
- 1800
- Target
- AMOLED_BG
- Default
- false
inactivity after which video is removed
- Target
- MAX_VIDEO_AGE
- Default
- 3600
- Target
- MAX_VIDEO_DURATION
- Default
- 36000
- Target
- DEFAULT_QUALITY
- Default
- 720
- Target
- MAX_QUALITY
- Default
- 2160
- Target
- AUTOPLAY
- Default
- false
- Target
- ALWAYS_TRANSCODE
- Default
- false
useful for low-performance machines, only basic features will work
- Target
- DISABLE_TRANSCODING
- Default
- false
comma separated, e.g. selfpromo,outro,sponsor,preview,interaction,intro,music_offtopic
- Target
- AUTOSKIP_SB_SEGMENTS
only use cookies if necessary
- Target
- COOKIES_ONLY_ON_FAILURE
- Default
- true
keep playing videos in background after leaving application or locking screen
- Target
- AUTO_BG_PLAYBACK
- Default
- true
- Target
- AUDIO_VISUALIZER
- Default
- false
proxy for accessing video sources, e.g. http://127.0.0.1:8888
- Target
- PROXY