26.7.2018, 14:27
@JiRo Tady to je...
#! /bin/bash
source=$*
stream=$(grep -A 1 "${source}$" o2tv.generic.m3u8 | head -n 2 | tail -n 1)
streamcount=$(wget -qO- ${stream} | grep -Eo "(http|https)://[\da-z./?A-Z0-9\D=_-]*" | wc -l)
streamcount=$((streamcount-1))
ffmpeg -re -fflags +genpts -loglevel fatal -i ${stream} -probesize 32 -c copy -map p:${streamcount}? -f mpegts -mpegts_service_type digital_tv pipe:1
#! /bin/bash
source=$*
stream=$(grep -A 1 "${source}$" o2tv.generic.m3u8 | head -n 2 | tail -n 1)
streamcount=$(wget -qO- ${stream} | grep -Eo "(http|https)://[\da-z./?A-Z0-9\D=_-]*" | wc -l)
streamcount=$((streamcount-1))
ffmpeg -re -fflags +genpts -loglevel fatal -i ${stream} -probesize 32 -c copy -map p:${streamcount}? -f mpegts -mpegts_service_type digital_tv pipe:1