#!/bin/bash

# URL of the HLS stream
#HLS_URL="https://cdn14jtedge.indihometv.com/atm/hlsv3/inews/inews-avc1_1200000=13-mp4a_96000=5.m3u8?encp=X60TEK8SPdqfAozuV4Yg8Q&uid=&expp=1740269358"
#HLS_URL="https://fhlsport111.fas41m2.xyz/token-J0N8neLAevCG7mV9wvY6zWPRlJrShHjjbCyulakaRTb05ePMHUFdDoouqhdJWkpJBCeIwzdjkPo%3Da/cfall/s6/v3b/p992o40qnUE0pUZ6Yl9mYJVlYzScp3ElMJ0hozI0/plyvivo/5u9e2efi7opa8apilube/chunklist.m3u8"
HLS_URL="https://cdn13jtedge.indihometv.com/atm/hlsv3/inews/inews-avc1_2500000=15-mp4a_96000=5.m3u8?encp=NHGc85Fdv9bsoGEkieu4MQ&uid=&expp=1740285538"
# RTMP stream destination URL
RTMP_URL="rtmp://103.148.45.219:9898/static/I-NEWS"

# Download and restream with ffmpeg
ffmpeg -i "$HLS_URL" -c:v copy -c:a copy -strict experimental -f flv "$RTMP_URL"
