YouCast is a Rust-based desktop application that turns YouTube videos and playlists into continuous UDP Multicast streams.
It allows you to build your own local IPTV network by defining "Channels" sourced from YouTube. YouCast manages the background processes to download, encode, and broadcast the content effectively simulating 24/7 TV stations on your local network.
- Modern GUI: Built with Iced for a clean, dark-themed interface.
- Channel Management: Create, edit, and delete custom channels.
- Custom Metadata: Set Channel Name, Provider Name, and Service IDs (SDT info).
- 24/7 Looping: Automatically restarts the playlist/video when it finishes to simulate a broadcast network.
- Low Latency Transcoding: Uses FFMPEG with
ultrafastpresets for real-time streaming. - Multicast Support: Broadcasts via UDP (e.g.,
239.255.0.1:1234), compatible with VLC, TiviMate, and other IPTV clients.
YouCast relies on two external command-line tools to function. These must be installed and available in your system's PATH.
- FFmpeg
- Used for encoding and streaming video.
- Download FFmpeg
- yt-dlp
- Used for extracting raw video streams from YouTube.
- Download yt-dlp
Verify Installation: Open your terminal/command prompt and type
ffmpeg -versionandyt-dlp --version. If both commands return version info, you are ready.
-
Clone the repository
git clone https://github.com/SarahRoseLives/youcast.git cd youcast -
Run with Cargo
cargo run --release
- Click the + Add Channel button.
- Name: The name displayed in the UI and burned into the video feed.
- Multicast IP: Use a valid multicast address (e.g.,
239.255.0.1up to239.255.255.250). - Port: Default is
1234. - Playlist URL: Paste a full YouTube Video URL or Playlist URL.
- Click the green Start Stream button on the channel card.
- The status will change to
LIVE. - Note: It may take 5-10 seconds for the FFMPEG process to buffer and begin sending packets.
You can watch the stream using VLC Media Player:
- Open VLC.
- Go to Media -> Open Network Stream.
- Enter the URL:
udp://@239.255.0.1:1234(Replace with the IP/Port you configured). - Click Play.
When you click "Start Stream", YouCast spawns a system shell process that executes a pipeline:
while true; do
yt-dlp -o - "URL" | ffmpeg -i pipe:0 -c:v libx264 -f mpegts udp://...
done- yt-dlp fetches the video and pipes the raw data to
stdout. - ffmpeg reads from
stdin, transcodes the video to H.264 (720p), injects the channel name as an overlay, and outputs an MPEG-TS stream via UDP. - The Loop ensures that if a video ends (or the playlist finishes), the command immediately restarts, keeping the "TV Channel" on air.
- Stream won't play in VLC:
- Ensure you included the
@symbol in VLC (e.g.,udp://@239.255.0.1:1234). - Check your Firewall. You may need to allow
ffmpegto send public UDP packets. - Multicast often works best on Wired (Ethernet) connections. Some WiFi routers block or throttle multicast traffic.
- Ensure you included the
- "Failed to start ffmpeg" error:
- Ensure
ffmpegandyt-dlpare in your System PATH. - Restart your PC after installing them if the app can't find them.
- Ensure