Skip to content

Hrastovc/bashIPTV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

IPTV VLAN Control and Stream Launcher

This repository contains scripts to set up a VLAN interface for IPTV multicast traffic and a CEC-based IPTV channel launcher using ffplay.

Scripts

connectVLAN.sh

Sets up a VLAN interface with VLAN ID 3999 on the specified physical interface for IPTV multicast routing.

Usage:

sudo ./connectVLAN.sh <interface>

iptv.sh

Listens to CEC remote control numeric inputs to switch IPTV channels from a given playlist using ffplay.

Usage:

sudo ./iptv.sh <playlist.m3u> <user>

Requirements

  • iproute2 (for ip commands)
  • ffplay (from FFmpeg)
  • cec-ctl (for CEC remote control)
  • sudo privileges

Notes

  • 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.

Auto-start with rc.local

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 &

Replace:

  • "/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

About

CEC-based IPTV channel launcher using 'ffplay'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages