I'm trying to make catchup for IPTV to have +1, +2 etc hours back timeshift for channels which are not recorded by provider.
I've made that setups
1.Mux Schedule for two channels as follow:
https://i.imgur.com/IlT0aAB.png
2.Setup Timeshift:
https://i.imgur.com/jQkgvCO.png
There are two streams, but not see any files recorded in /home/hts/timeshift/
And if I'll make that timeshift, how to setup another Mux to start it from -1h ChannelID and watch it one hour ago ?
WORKAROUND
Script file
/home/lib/catch-up/timeshift_hls.sh
#!/bin/bash
/usr/bin/ffmpeg -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 2 -y -nostdin \
-hide_banner -loglevel fatal \
-i http://127.0.0.1:9981/stream/channelnumber/$1 \
-vcodec copy -acodec copy -scodec copy -g 60 \
-fflags +genpts -user_agent HLS_delayer -metadata service_provider="TimeShift" \
-f hls -hls_flags delete_segments -hls_time 10 -hls_list_size 360 -hls_wrap 361 \
-hls_segment_filename /timeshift/$1_%03d.ts /timeshift/$1_hls.m3u8
chmod +x /home/lib/catch-up/timeshift_hls.sh
Manual run
./timeshift_hls.sh [channel number]
Service file
/etc/systemd/system/timeshift_Nova.service
[Unit]
Description=Timeshift Nova TV
After=tvheadend.service
PartOf=tvheadend.service
Restart=always
[Service]
ExecStartPre=/bin/mkdir -p /timeshift/
ExecStart=/home/lib/catch-up/timeshift_hls.sh 103 &
ExecStop=/bin/rm -rf /timeshift/
[Install]
WantedBy=default.target
$ sudo systemctl daemon-reload
$ sudo systemctl enable timeshift_Nova # to enable startup exec
$ sudo systemctl start timeshift_Nova
MUX in TVH
pipe:///usr/bin/ffmpeg -live_start_index -99999 -i /timeshift/hls_103_.m3u8 -c copy -f mpegts pipe:1
And choose option "Use A/V library" to "Dont use"
Link to fork at github
https://github.com/Saentist/HLS-TV-channel-delay