Couchtube
๐บ A self-hosted, YouTube based application that recreates the feel of a TV channel. CouchTube schedules YouTube video playback dynamically from user-defined channel lists. Customize, share, and submit JSON-based playlists to make CouchTube your own!
Install / Use
/learn @ozencb/CouchtubeREADME
CouchTube
CouchTube is a self-hostable YouTube frontend designed to simulate a TV channel experience. It dynamically loads YouTube videos from a predefined list of channels and schedules playback based on the current time. Users can also submit their custom video lists through a JSON file URL.
I hope CouchTube will be a community-driven project, where people can create and share their own channel JSON lists. Feel free to submit pull requests with new channel lists to enhance the default set in this repo.
The project is in its early days of development. There will probably be many issues and bugs. Please use issues to report them.
CouchTube is inspired by ytch.xyz.
Getting Started
Using Docker
To run CouchTube using Docker, you can either use a docker-compose.yml file:
version: "3.8"
services:
couchtube:
image: ghcr.io/ozencb/couchtube:latest
container_name: couchtube_app
ports:
- "8363:8363"
environment:
- PORT=8363
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8363"]
interval: 30s
timeout: 10s
retries: 3
Or start it directly with a docker run command:
docker run -d \
--name couchtube_app \
-p 8363:8363 \
-e PORT=8363 \
--restart unless-stopped \
--health-cmd="curl -f http://localhost:8363 || exit 1" \
--health-interval=30s \
--health-timeout=10s \
--health-retries=3 \
ghcr.io/ozencb/couchtube:latest
Building From Source
Ensure you have Golang 1.22 or higher installed. Create a .env file with the same environment variables found in docker-compose.yml.
PORT=8363
DATABASE_FILE_PATH=/app/data/couchtube.db
-
Clone the Repository:
git clone https://github.com/ozencb/couchtube.git cd couchtube -
Install Go Dependencies:
go mod tidy -
Run the Application:
go run main.goThe server will start on
http://localhost:8363. -
Access the Application: Open a browser and go to
http://localhost:8363to access CouchTube.
On the first run, CouchTube will create a couchtube.db SQLite database file, initialize necessary tables, and populate them with any default channels found in videos.json.
Usage
CouchTube loops through a channel's videos and only shows the section of the video marked by sectionStart and sectionEnd. The scheduler aims to distribute these videos throughout the day, so two different users should see the same video for a given channel.
Environment Variables
You can configure CouchTube using environment variables.
| Variable | Description |
| -------------------- | --------------------------------------------------------------------------- |
| PORT | The port number on which CouchTube will run. |
| DATABASE_FILE_PATH | The path to the SQLite database file used by CouchTube. |
| DEFAULT_CHANNELS_PATH | Path to the JSON file used to seed the database on first run. Default: /videos.json. |
| EDITOR_MODE | Controls the channel editor at /editor. Values: off (default, hidden), readonly (visible but no edits), full (fully enabled). Also accepts true/false for backward compat. |
Editor

CouchTube includes a built-in channel editor at /editor. Set EDITOR_MODE=full to enable editing, or EDITOR_MODE=readonly to let users browse without making changes (useful for demos). The editor lets you:
- Manage channels โ create, rename, and delete channels from the sidebar
- Add videos โ paste a YouTube URL or video ID to add videos to a channel
- Set playback sections โ configure start and end times for each video to control which segment plays on air
- Preview โ preview individual video sections directly in the editor
- Import/Export JSON โ bulk import or export your entire channel configuration
- Import playlists โ paste a YouTube playlist URL to bulk-import videos into a channel
Custom JSON Format for Channel and Video Lists
You can create custom JSON files to specify channels and video lists.
JSON Structure
Create your JSON file using the following format:
{
"channels": [
{
"name": "Channel Name",
"videos": [
{
"id": "VIDEO_ID",
"sectionStart": 10,
"sectionEnd": 300
},
{
"id": "ANOTHER_VIDEO_ID",
"sectionStart": 0,
"sectionEnd": 200
}
]
},
{
"name": "Another Channel Name",
"videos": [
{
"id": "DIFFERENT_VIDEO_ID",
"sectionStart": 0,
"sectionEnd": 150
}
]
}
]
}
Field Descriptions
- channels: An array of channel objects. Each channel contains:
- name: The channel name.
- videos: An array of video objects containing:
- id: The ID of the YouTube video.
- sectionStart: The start time (in seconds) within the video where playback begins.
- sectionEnd: The end time (in seconds) within the video where playback ends.
Save your custom JSON file using the above structure or make it accessible through a URL.
Uploading Custom JSON
Within the CouchTube application, click the settings icon (gear icon) to submit a URL pointing to your custom JSON file. This URL should contain the JSON with channels and videos you want CouchTube to use.
Contributing
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a Pull Request.
License
This project is licensed under the GNU General Public License.
Additional Notes
- Database: Ensure you don't have an existing
couchtube.dbfile to avoid database conflicts. - Error Handling: The app includes basic error handling but might need enhancements for production use.
- Video Availability: Videos marked private, restricted, or disabled for embedding may not play. CouchTube attempts to handle such errors by skipping to the next available video.
Enjoy using CouchTube!
Related Skills
xurl
351.2kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
qqbot-channel
351.2kQQ ้ข้็ฎก็ๆ่ฝใๆฅ่ฏข้ข้ๅ่กจใๅญ้ข้ใๆๅใๅๅธใๅ ฌๅใๆฅ็จ็ญๆไฝใไฝฟ็จ qqbot_channel_api ๅทฅๅ ทไปฃ็ QQ ๅผๆพๅนณๅฐ HTTP ๆฅๅฃ๏ผ่ชๅจๅค็ Token ้ดๆใๅฝ็จๆท้่ฆๆฅ็้ข้ใ็ฎก็ๅญ้ข้ใๆฅ่ฏขๆๅใๅๅธๅธๅญ/ๅ ฌๅ/ๆฅ็จๆถไฝฟ็จใ
docs-writer
100.5k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
351.2kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
