after learning some basics about linux and ffmpeg I was able to implement this script.
But now I've another problem: how do I combine that whith the epg?
The script produces the .ts segments and then I read the $1_hls.m3u8 url as new iptv-network.
When I combine this new network with the epg I'm able to view the channel from the hls.m3u8 but
I'm not able to rewind back to the previous shows.
This is the code that I'm using and in the image in the attachement channel number 4 is my catch up channel.
#!/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" \
-metadata service_name="TeleZuri" \
-f hls -hls_flags delete_segments \
-hls_time 10 \
-hls_list_size 360 \
-hls_wrap 361 \
-hls_segment_filename /home/hts/timeshift/$1_%03d.ts /home/hts/timeshift/$1_hls.m3u8
!Catchup_1.jpg!