{"id":37227420,"url":"https://github.com/lukedunsmoto/mediafetch","last_synced_at":"2026-01-29T02:01:50.750Z","repository":{"id":331658102,"uuid":"1131743253","full_name":"lukedunsmoto/mediafetch","owner":"lukedunsmoto","description":"A simple, self-hosted web wrapper for downloading media using yt-dlp.","archived":false,"fork":false,"pushed_at":"2026-01-11T21:06:31.000Z","size":37,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T07:58:01.762Z","etag":null,"topics":["audio","docker","docker-compose","dokploy","downloader","media","mit-license","open-source","self-hosted","video","wrapper","yt-dlp","yt-dlp-gui","yt-dlp-wrapper"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukedunsmoto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T16:01:07.000Z","updated_at":"2026-01-14T22:00:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lukedunsmoto/mediafetch","commit_stats":null,"previous_names":["lukedunsmoto/mediafetch"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lukedunsmoto/mediafetch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukedunsmoto%2Fmediafetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukedunsmoto%2Fmediafetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukedunsmoto%2Fmediafetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukedunsmoto%2Fmediafetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukedunsmoto","download_url":"https://codeload.github.com/lukedunsmoto/mediafetch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukedunsmoto%2Fmediafetch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28860661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","docker","docker-compose","dokploy","downloader","media","mit-license","open-source","self-hosted","video","wrapper","yt-dlp","yt-dlp-gui","yt-dlp-wrapper"],"created_at":"2026-01-15T03:21:20.437Z","updated_at":"2026-01-29T02:01:50.745Z","avatar_url":"https://github.com/lukedunsmoto.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MediaFetch\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n\r\n![MediaFetch Logo](https://www.lukedunsmore.com/wp-content/uploads/2026/01/MediaFetch-Logo.svg)\r\n\r\n[![Open Source](https://img.shields.io/badge/Open%20Source-%E2%9C%93-brightgreen?style=for-the-badge)](#)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](LICENSE)\r\n\r\nA tiny, self-hosted web wrapper for **yt-dlp**.\r\n\r\n\u003c/div\u003e\r\n\r\n---\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n\r\n[![MediaFetch Demo](https://www.lukedunsmore.com/wp-content/uploads/2026/01/Screenshot-2026-01-10-200029.png)](https://www.lukedunsmore.com/wp-content/uploads/2026/01/Recording-2026-01-10-180150.mp4)\r\n\r\n*Click the image above to watch the demo video.*\r\n\r\n\u003c/div\u003e\r\n\r\n## Features\r\n\r\n- **Universal Support**\r\n  Works with YouTube, Twitch, Vimeo, SoundCloud, and [thousands of other sites](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md).\r\n\r\n- **Zero Database**  \r\n  No state, no queues, just files on disk.\r\n\r\n- **Optional Security**  \r\n  HTTP Basic Auth (browser-native).  \r\n  If credentials are set, the UI, API, and downloads are protected.\r\n\r\n- **Modern UI**  \r\n  Simple dashboard with real-time terminal logs (SSE).\r\n\r\n- **Flexible Formats**  \r\n  - Best video + audio → **MP4**\r\n  - Audio-only extraction → **MP3**\r\n\r\n- **Always Fresh**\r\n  Docker build automatically pulls the latest official yt-dlp binary, ensuring support for the newest sites and bypassing recent YouTube blocks.\r\n\r\n---\r\n\r\n## Environment Variables\r\n\r\n| Variable | Description |\r\n|-------|------------|\r\n| `PORT` | Port to run on (default: `3002`) |\r\n| `BASIC_AUTH_USER` | Username for Basic Auth (optional) |\r\n| `BASIC_AUTH_PASS` | Password for Basic Auth (optional) |\r\n| `OUTPUT_DIR` | Download directory (default: `/data/downloads`) |\r\n| `PUBLIC_BASE_URL` | Public domain (e.g. `https://mediafetch.example.com`) **Required** to generate download links |\r\n\r\n\u003e **Note**  \r\n\u003e If `BASIC_AUTH_USER` and `BASIC_AUTH_PASS` are **not set**, authentication is disabled (useful for local dev).\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n```bash\r\ngit clone https://github.com/lukedunsmoto/mediafetch.git\r\ncd mediafetch\r\ncp .env.example .env\r\n# Builds the image and fetches the latest yt-dlp binary\r\ndocker compose up -d --build\r\n```\r\n\r\nThen open your browser at:\r\n\r\n```\r\nhttp://localhost:3002\r\n```\r\n\r\n---\r\n\r\n## Deployment (Docker)\r\n\r\n- Mount a volume to `/data/downloads` to persist files\r\n- Set `PUBLIC_BASE_URL` to your real domain when running behind a proxy\r\n- Works cleanly with Traefik, Dokploy, Coolify, or raw Docker\r\n\r\n---\r\n\r\n## API\r\n\r\n### `POST /api/fetch`\r\nStarts a download job and streams logs via **Server-Sent Events (SSE)**.\r\n\r\n**Body**\r\n```json\r\n{\r\n  \"url\": \"https://example.com/video\",\r\n  \"mode\": \"video | audio\",\r\n  \"filename\": \"optional-custom-name\"\r\n}\r\n```\r\n\r\n### `GET /api/health`\r\nSimple health check.\r\n\r\n---\r\n\r\n## Advanced: Fixing 403 \u0026 Unsupported Errors\r\n\r\nIf you encounter `HTTP Error 403: Forbidden` (common on YouTube) or need to download from premium sites that require a login, you can pass your browser cookies to MediaFetch.\r\n\r\n**1. Get your cookies**\r\n   - Install a \"Get cookies.txt LOCALLY\" extension for Chrome or Firefox.\r\n   - Log into the site (e.g., YouTube) in your browser.\r\n   - Export the cookies and save the file as `cookies.txt` in your project folder.\r\n\r\n**2. Enable them in Docker**\r\n   - Add the volume line in `docker-compose.yml`:\r\n     ```yaml\r\n     volumes:\r\n       - ./downloads:/data/downloads\r\n       - ./cookies.txt:/app/cookies.txt\r\n     ```\r\n   - Restart the container: `docker compose up -d`\r\n\r\n\u003e **Security Warning**\r\n\u003e Never share your `cookies.txt` file or commit it to Git. It contains your personal session data. MediaFetch is designed to read this file locally only.\r\n\r\n---\r\n\r\n## License\r\n\r\nMIT License\r\n\r\n---\r\n\r\n## Credits\r\n\r\nCore Power:\r\n- [yt-dlp](https://github.com/yt-dlp/yt-dlp)\r\n- ffmpeg\r\n\r\n---\r\n\r\nHappy fetching.\r\n\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukedunsmoto%2Fmediafetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukedunsmoto%2Fmediafetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukedunsmoto%2Fmediafetch/lists"}