YouTube Playlist Video Player
This application is a web-based video player that displays random clips from YouTube playlists. It fetches videos from a YouTube channel, downloads them locally, and serves them through a web interface with a retro CRT TV aesthetic. Perfect for kiosk displays, waiting rooms, or static screens.
- Random video clip playback from your YouTube channel
- Retro CRT screen effect
- Video details overlay (category, title, subtitle)
- Snow/static effect between clips
- Cross-platform support (Windows, macOS, Linux)
- Kiosk mode with auto-launch script
- Accessible over local network
- Clone the repository:
git clone https://github.com/Jeremy-Bell/ictv.git - Install dependencies:
cd ictv && npm install - Create a
.envfile in the root directory of the project and add the following variables:
YOUTUBE_CHANNEL_ID=your_channel_id
YOUTUBE_API_KEY=your_api_key
- Run
npm run setupto download the videos from the playlist.
Start the server and open in your browser manually:
npm startThen open http://localhost:3000 in your browser.
Launch the server and automatically open Chrome in kiosk mode with autoplay enabled:
npm run launchThis will:
- Start the server
- Open Chrome in fullscreen kiosk mode
- Enable audio/video autoplay without user interaction
The server is accessible from other devices on your local network. When started, it displays:
Server running at:
Local: http://localhost:3000
Network: http://192.168.x.x:3000
The application can be configured using the src/config.js file. Here are the available configuration options:
PATHS.VIDEOS: Directory where videos are stored (default:'../videos')PATHS.PUBLIC: Public directory for static files (default:'../public')
SETUP.VIDEO_QUALITY: Preferred video quality (default:'bestvideo[height<=1080][ext=mp4]/mp4')SETUP.REMOVE_SHORTS: Whether to filter out YouTube Shorts (default:true)SETUP.VIDEOS_BLACKLIST: Array of video IDs to exclude from processingSETUP.COOKIES_FROM_BROWSER: Browser to use for authentication cookies (e.g.,"firefox")
SERVER.PORT: Port to run the server on (default:3000or value fromprocess.env.PORT)SERVER.HOST: Host to bind the server to (default:'0.0.0.0'- accessible on local network)
UI.CRT_EFFECT: Enable/disable CRT screen effect (default:true)UI.VIDEO_DETAILS: Show/hide video details overlay (default:true)
VIDEO.CLIP_DURATION: Default duration for video clips in seconds (default:30)VIDEO.SNOW_DURATION_MS: Duration of the "snow" effect in milliseconds (default:500)VIDEO.CROP_BOUNDS: Object containing crop settings for different video types:podcast: Start/end crop times in secondsjam: Start/end crop times in secondsstunfest: Start/end crop times in secondsmisc: Start/end crop times in seconds
The following environment variables can be set:
PORT: Override the default server portYOUTUBE_API_KEY: Required for fetching video metadataYOUTUBE_CHANNEL_ID: The YouTube channel ID to fetch videos from
{
"SETUP": {
"REMOVE_SHORTS": true,
"VIDEO_QUALITY": "best[height<=720]"
},
"SERVER": {
"PORT": 4000
},
"UI": {
"CRT_EFFECT": true
}
}To exclude specific videos, add their YouTube video IDs to the VIDEOS_BLACKLIST array in the SETUP section.
For kiosk/static screen usage, Chrome or Chromium is recommended. The npm run launch command automatically configures Chrome with:
--autoplay-policy=no-user-gesture-required- Allows audio/video autoplay--kiosk- Fullscreen kiosk mode--disable-infobars- Hides info bars
npm run setup- Download videos from YouTube channelnpm start- Start the server onlynpm run launch- Start server and open browser in kiosk mode