This repository contains scripts to set up a VLAN interface for IPTV multicast traffic and a CEC-based IPTV channel launcher using ffplay
.
Sets up a VLAN interface with VLAN ID 3999 on the specified physical interface for IPTV multicast routing.
Usage:
sudo ./connectVLAN.sh <interface>
Listens to CEC remote control numeric inputs to switch IPTV channels from a given playlist using ffplay.
Usage:
sudo ./iptv.sh <playlist.m3u> <user>
- iproute2 (for ip commands)
- ffplay (from FFmpeg)
- cec-ctl (for CEC remote control)
- sudo privileges
- The VLAN ID is fixed at 3999 and the assigned IP is 10.10.10.5/24 by default in connectVLAN.sh.
- The multicast route covers 232.0.0.0/8 addresses used typically for IPTV multicast streams.
- programs.sh listens for CEC remote input and expects 3-digit channel numbers but supports shorter input with a timeout.
To launch the IPTV VLAN interface and the CEC-based channel switcher at boot, add the following lines to /etc/rc.local before the exit 0 line:
#!/bin/bash
# Create IPTV VLAN interface
/path/to/connectVLAN.sh eth0
# Wait for the desktop session to load (adjust as needed)
sleep 10
# Start the IPTV stream switcher as background job
sudo -u youruser /path/to/programs.sh /path/to/playlist.m3u youruser &
- "/path/to/" with the actual paths where your scripts and playlist are located.
- "eth0" with your real network interface name.
- "youruser" with your actual desktop user.
- Example m3u playlist