TVHeadend Server recording issue in Matrix

I’m going crazy for problems recording an Italian IPTV stream (RAI1).
With all the other channels I have I have no problems, with this one after a while I get these error messages in the console:

2022-02-02 12: 06: 09.754 TS: IPTV1 / iptvitaplus.m3u - Rai 1 / Service01: H264 @ # 256 Continuity counter error (total 1)

2022-02-02 12: 06: 09.754 TS: IPTV1 / iptvitaplus.m3u - Rai 1 / Service01: AAC @ # 257 Continuity counter error (total 1)

The thing is random, the recording continues but then it is unusable, because it tries to hang up the stream and this creates a problem in the saved file.
Latest version of TVHeadend Server downloaded from repo for Matrix 19.4 RC2.
To do a test I tried to install TVHeadend on Ubuntu and in that the channel is perfectly recorded without ever problems.
Perhaps this IPTV sends out a particular stream that is misinterpreted in the version of TVHeadend for CoreElec, I say this because recording any other channel always works, but on Ubuntu as I wrote above that channel is recorded correctly.
The mux: pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -loglevel fatal -i “https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803” -vcodec copy -acodec copy -f mpegts -tune zerolatency pipe:1

My tvbox: Tictid TX6 (sm1_s905x3_4g_1gbit.dtb).

I’m trying on another tv-box, an X96Max Plus 2T (uses the same dtb), backing up the CoreElec configuration of the other tv-box and doing the restore, so same global settings, it does the same problem.

SOLVED: but unfortunately not in the Matrix.
With CoreElec 9.2.8 (Leia) and the same settings the recording in that IPTV channel is perfect.
So there is something about the Matrix that bothers him.
I thought it was the different version of FFMpeg, I tried to downgrade only that one but on Matrix there are those problems.
I’m sorry to be left behind, but if there are no problems with Leia I hope they will be solved in the Matrix.
From what I read on the web it could be a problem in the new kernel, which 9.2.8 Leia doesn’t have.

Continuing to investigate today I tried LibreElec “Matrix version” and the problem is exactly the same.
So it should be understood if it is the fault of TVHeadend Server that has something that gives it problems with the Matrix, or vice versa.

Have you gotten to try installing the docker linuxserver/tvheadend service?

It has the advantage that it does not depend on the CE/LE version, although it does depend on the kernel. It is updated very frequently, the last time eleven days ago, and it includes its own ffmpeg.

In case you want to try, this is my installation ssh command:

docker run -d \
  --name=9981-tvheadend \
  --net=host \
  -e PUID=0 \
  -e PGID=0 \
  -e TZ=Europe/Paris \
  -e RUN_OPTS="--satip_xml http://10.10.20.9:8875/desc.xml --satip_xml http://192.168.2.11:8080/desc.xml" \
  -p 9981:9981 \
  -p 9982:9982 \
  -v /storage/.config/dockers/tvheadend/config:/config \
  -v /storage:/storage \
  -v /media:/media \
  --privileged \
  --restart unless-stopped \
  linuxserver/tvheadend

(I suggest you omit the RUN_OPTS line)
All configuration is in /storage/.config/dockers/tvheadend/config

1 Like

Good idea to use docker, I hadn’t thought about it!
Already installed and started the container with some modifications.
The problem is that it doesn’t see the DVB-T2 USB adapter, while the addons version finds it.
Anyway test us with that mux in the container, thanks!

I hope you have not forgotten the “–privileged” parameter, it is the one that allows to find the hardware :joy:

I had included it but it doesn’t work, I have to investigate.

I managed to get everything working, only the EPG is missing which I don’t quite understand how to configure it now since TVHeadend is not a plugin, so it doesn’t have the settings.xml where I could enter the url for the internal grabber: http://www.epgitalia.tv/xml/guide.xz

I was also able to get the internal EPG to work via a modified tv_grab_file.
So I always scheduled a recording on that offending stream and the error is the same:

2022-02-04 13:46:21.405 TS: IPTV1/iptvitaplus.m3u - Rai 1/Service01: H264 @ #256 Continuity counter error (total 1)
2022-02-04 13:46:21.538 TS: IPTV1/iptvitaplus.m3u - Rai 1/Service01: AAC @ #257 Continuity counter error (total 1)

Working all within docker now seems impossible to me but still has problems.
@cubimol why not with Leia, and without the docker container?
Maybe in the Matrix some process stops streaming for a moment and gets corrupted, I’m thrilled.
However, this is proof that it does not depend on TVHeadend, the problem lies either in the kernel or something in the operating system, even in LibreElec.
Could you try in your tvbox?

Just an observation, TVHeadend has evolved the way it filters streams over time. I have consistently found that the earlier TVH version of 4.2 tunes marginal Muxes better than later versions - ie all the current 4.3 versions have much worse problems with continuity with poor signals resulting in pauses and glitches in playback.
Every time I have attempted to use one of the 4.3 versions I have reverted back to 4.2 in a few days. Sometimes newer isn’t better.

Shoog

Absolutely agree, staying up to date doesn’t always solve problems.
But on CoreElec V9.2.8 (Leia) I always use TVHeadend V4.3 and there is no such problem, so I don’t consider it a TVH issue.
Unfortunately however 9.2.8 does not see my DVB dongle, while with Matrix it works.

[ 1516.302104@2] usb 1-2.1.3: New USB device found, idVendor=0572, idProduct=689a
[ 1516.302112@2] usb 1-2.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1516.302114@2] usb 1-2.1.3: Product: USB Stick
[ 1516.302118@2] usb 1-2.1.3: Manufacturer: Gen
[ 1516.302120@2] usb 1-2.1.3: SerialNumber: 2017.12.09
[ 1516.302906@2] usb 1-2.1.3: Unsupported device

And the driver are installed:

2022-02-04 14:37:05.634 T:4065534016 NOTICE: ADDON: driver.dvb.crazycat v9.2.0 installed

So with Matrix I have that problem with that particular stream but the usb dvb works, on Leia the usb dvb doesn’t work but the stream records it well.
Could we have an intermediate version between Leia and the Matrix? :rofl:

For the developers:

2022-02-05 10:04:25.300 [ TRACE]:tbl-base: pmt: pid 1000 tableid 02 extraid 0000000000000001 len 25
2022-02-05 10:04:25.300 [ TRACE]:tbl-base: pmt: section 0 last 0 ver 0 (ver 0 st 2 incomp 0 comp 1)
2022-02-05 10:04:25.300 [ TRACE]:tbl-base: pmt: skip, already complete (2)
2022-02-05 10:04:25.437 [ TRACE]:iptv-pcr: updated 11333461, time start 4496629917, limit 5000000, diff 4648004
2022-02-05 10:04:25.445 [ TRACE]:iptv: iptv_input_close_fds 48 0
2022-02-05 10:04:25.455 [ TRACE]:iptv: iptv pipe: spawned "/storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg" rd 39 pid 4761
2022-02-05 10:04:25.456 [ TRACE]:spawn: 45 78 65 63 75 74 69 6E 67 20 22 2F 73 74 6F 72 Executing "/stor
2022-02-05 10:04:25.456 [ TRACE]:spawn: 61 67 65 2F 2E 6B 6F 64 69 2F 61 64 64 6F 6E 73 age/.kodi/addons
2022-02-05 10:04:25.456 [ TRACE]:spawn: 2F 74 6F 6F 6C 73 2E 66 66 6D 70 65 67 2D 74 6F /tools.ffmpeg-to
2022-02-05 10:04:25.456 [ TRACE]:spawn: 6F 6C 73 2F 62 69 6E 2F 66 66 6D 70 65 67 22 0A ols/bin/ffmpeg".
2022-02-05 10:04:25.456 [ INFO]:spawn: Executing "/storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg"
2022-02-05 10:04:25.456 [ TRACE]:iptv-pcr: updated 11334901, time start 4496645917, limit 5000000, diff 4632004
2022-02-05 10:04:27.452 [ TRACE]:iptv-pcr: updated 11514541, time start 4498641922, limit 5000000, diff 2635999
2022-02-05 10:04:27.452 [ TRACE]:mpegts: iptvitaplus.m3u - Rai 1 in IPTV1: pid 0011 cc err 0 != 10
2022-02-05 10:04:27.452 [ TRACE]:mpegts: iptvitaplus.m3u - Rai 1 in IPTV1: pid 0000 cc err 0 != 2
2022-02-05 10:04:27.452 [ TRACE]:mpegts: iptvitaplus.m3u - Rai 1 in IPTV1: pid 1000 cc err 0 != 2
2022-02-05 10:04:27.452 [ TRACE]:mpegts: iptvitaplus.m3u - Rai 1 in IPTV1: pid 0100 cc err 0 != 4
2022-02-05 10:04:27.452 [WARNING]:TS: IPTV1/iptvitaplus.m3u - Rai 1/Service01: H264 ` #256 Continuity counter error (total 1)2022-02-05 10:04:27.452 [ TRACE]:mpegts: iptvitaplus.m3u - Rai 1 in IPTV1: pid 0101 cc err 0 != 112022-02-05 10:04:27.452 [WARNING]:TS: IPTV1/iptvitaplus.m3u - Rai 1/Service01: AAC ` #257 Continuity counter error (total 1)
2022-02-05 10:04:27.452 [ TRACE]:mpegts: input IPTV #1 got 122012 bytes
2022-02-05 10:04:27.452 [ TRACE]:tbl-base: pat: pid 00 tableid 00 extraid 0000000000000001 len 9
2022-02-05 10:04:27.453 [ TRACE]:tbl-base: pat: section 0 last 0 ver 0 (ver 0 st 2 incomp 0 comp 1)
2022-02-05 10:04:27.453 [ TRACE]:tbl-base: pat: skip, already complete (2)
2022-02-05 10:04:27.453 [ TRACE]:tbl-base: pmt: pid 1000 tableid 02 extraid 0000000000000001 len 25

Here the full debug log during the issue: https://drive.google.com/file/d/1Z25G6kG-2zb3GpMoIKCfv4VWXNugixPg/view?usp=sharing

@Shoog I’m trying now with the TVH 4.2.8 version, same problem, it’s just something in the Matrix that gives that problem.

1 Like

I leave you my scripts that I use to be able to integrate the Pluto TV and Samsung TV playlists into tvheadend, and convert them to something that tvheadend understands. Perhaps with this your continuity errors will disappear. They work very well for me.

FFMPEG

#!/bin/sh
# pipedffm3u.sh script for pipe playlist with ffmpeg to tvheadend
# ffmpeg default location in '/usr/bin' change to your convenience
if [[ -z $1 ]]; then
  echo "PLAYLIST ERROR!"
else
  sed '/#EXTM3U/s/http/TEMP/' $1 > $1.pipedff.m3u
  sed -i '/#EXTINF/!s/http/pipe:\/\/\/usr\/bin\/ffmpeg -user_agent "okhttp\/4.9.0" -re -i "http/' $1.pipedff.m3u
  sed -i '/#EXTINF/!s/$/" -c:v copy -c:a aac -f mpegts pipe:1/' $1.pipedff.m3u
  sed -i '/#EXTM3U/s/TEMP/http/' $1.pipedff.m3u
  sed -i '/#EXTM3U/s/" -c:v copy -c:a aac -f mpegts pipe:1//' $1.pipedff.m3u
fi

STREAMLINK

#!/bin/sh
# pipedslm3u.sh script for pipe playlist with streamlink to tvheadend
# streamlink default location in '/usr/bin' change to your convenience
if [[ -z $1 ]]; then
  echo "PLAYLIST ERROR!"
else
  sed '/#EXTM3U/s/http/TEMP/' $1 > $1.pipedsl.m3u
  sed -i '/#EXTINF/!s/http/pipe:\/\/\/usr\/bin\/streamlink --http-header "User-Agent=okhttp\/4.9.0" --url "http/' $1.pipedsl.m3u
  sed -i '/#EXTINF/!s/$/" --stdout --default-stream best --ffmpeg-audio-transcode aac --ffmpeg-copyts/' $1.pipedsl.m3u
  sed -i '/#EXTM3U/s/TEMP/http/' $1.pipedsl.m3u
  sed -i '/#EXTM3U/s/" --stdout --default-stream best --ffmpeg-audio-transcode aac --ffmpeg-copyts//' $1.pipedsl.m3u
fi
1 Like

Thank you! But I didn’t understand how to use them! :grinning:
Ah ok, i understand, directly convert the list, I try!

Is easier than it looks like:

  1. create a directory /storage/.config/iptv
  2. copy the pipedffm3u.sh script into this directory
  3. make the script executable "chmod +x /storage/.config/iptv/pipedffm3u.sh
  4. find out where ffmpeg is with ‘which ffmpeg’
  5. change the ‘/usr/bin’ directory inside the script to your ffmpeg directory with the warning to write '\/' instead of the ‘/’ character because you are inside a ‘sed’ command
  6. copy your ‘playlist.m3u’ to /storage/.config/iptv
  7. run the command ‘/storage/.config/iptv/pipedffm3u.sh /storage/.config/iptv/playlist.m3u’
  8. you will get a new file ‘/storage/.config/iptv/playlist.m3u.pipedff.m3u’
  9. inside tvheadend create a new network with playlist ‘file:///storage/.config/iptv/playlist.m3u.pipedff.m3u’

I assume you know how to use SSH

1 Like

Yes, I understood how your script thinks, it was enough for me to adapt the mux only of that problematic channel but I can confirm that the problem remains.
The mux with your system becomes:

pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -user_agent "okhttp\/4.9.0" -re -i "https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803" -c:v copy -c:a aac -f mpegts pipe:1

And this is the result! :face_with_raised_eyebrow:
Going then to view the recording it is impossible to make a time shift, and you hear some gaps in the audio every now and then.
I repeat, only with this mux I have problems, all the others record them perfectly. 
Try it in your sistem if you can, just for comparation, thanks!

2022-02-05 16:53:23.025 spawn: frame= 1933 fps= 25 q=-1.0 size=   24909kB time=00:01:17.31 bitrate=2639.3kbits/s speed=0.999x    

2022-02-05 16:53:23.530 spawn: frame= 1946 fps= 25 q=-1.0 size=   25048kB time=00:01:17.83 bitrate=2636.3kbits/s speed=   1x    

2022-02-05 16:53:24.038 spawn: frame= 1958 fps= 25 q=-1.0 size=   25282kB time=00:01:18.32 bitrate=2644.4kbits/s speed=0.999x    

2022-02-05 16:53:24.541 spawn: frame= 1970 fps= 25 q=-1.0 size=   25392kB time=00:01:18.80 bitrate=2639.5kbits/s speed=0.999x    

2022-02-05 16:53:25.041 spawn: frame= 1982 fps= 25 q=-1.0 size=   25577kB time=00:01:19.29 bitrate=2642.4kbits/s speed=0.999x    

2022-02-05 16:53:25.550 spawn: frame= 1996 fps= 25 q=-1.0 size=   25716kB time=00:01:19.83 bitrate=2638.8kbits/s speed=0.999x    

2022-02-05 16:53:25.617 spawn: [hls @ 0x1df1470] Opening 'crypto+https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/itarai1_160/exp=1644162723~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=f037e64e403bf9b7cbd22190f0203ed34e8edb99fb277c32e497f769a7fa8dd6/zc3ftx60/00000008/media_16962.aac?aka_me_session_id=AAAAAAAAAACj7v9hAAAAAInIeP61XbCgVvonCRgt2wgwHOPML5c42Yl3IqyLAk6dGasg2N0DHMrl1HrJY7kaOFIuiyaUKAKS&aka_msn=16962&aka_hls_version=3&aka_media_format_type=hls' for reading

2022-02-05 16:53:25.741 spawn: [aac @ 0x1f8aea0] channel element 1.0 is not allocated

2022-02-05 16:53:25.741 spawn: Error while decoding stream #0:0: Invalid data found when processing input

2022-02-05 16:53:25.741 spawn: [https @ 0x1e13e40] Opening 'https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/rai1_2400/exp=1644162723~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=f037e64e403bf9b7cbd22190f0203ed34e8edb99fb277c32e497f769a7fa8dd6/chunklist.m3u8?aka_me_session_id=AAAAAAAAAACj7v9hAAAAAInIeP61XbCgVvonCRgt2wgwHOPML5c42Yl3IqyLAk6dGasg2N0DHMrl1HrJY7kaOFIuiyaUKAKS&aka_media_format_type=hls' for reading

2022-02-05 16:53:25.751 spawn: [hls @ 0x1df1470] Skip ('#EXT-X-VERSION:3')

2022-02-05 16:53:25.751 spawn: [hls @ 0x1df1470] Skip ('#EXT-X-DISCONTINUITY-SEQUENCE:0')

2022-02-05 16:53:25.751 spawn: [hls @ 0x1df1470] Skip ('#EXT-X-PROGRAM-DATE-TIME:2022-02-05T15:52:47.086+00:00')

2022-02-05 16:53:25.751 spawn: [hls @ 0x1df1470] Opening 'crypto+https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/rai1_2400/exp=1644162723~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=f037e64e403bf9b7cbd22190f0203ed34e8edb99fb277c32e497f769a7fa8dd6/0hec23h4/00000008/media_16962.ts?aka_me_session_id=AAAAAAAAAACj7v9hAAAAAInIeP61XbCgVvonCRgt2wgwHOPML5c42Yl3IqyLAk6dGasg2N0DHMrl1HrJY7kaOFIuiyaUKAKS&aka_msn=16962&aka_hls_version=3&aka_media_format_type=hls' for reading

2022-02-05 16:53:26.058 spawn: frame= 2008 fps= 25 q=-1.0 size=   25878kB time=00:01:20.34 bitrate=2638.7kbits/s speed=0.999x    

2022-02-05 16:53:26.566 spawn: frame= 2021 fps= 25 q=-1.0 size=   25980kB time=00:01:20.83 bitrate=2632.9kbits/s speed=0.999x    

2022-02-05 16:53:27.074 spawn: frame= 2034 fps= 25 q=-1.0 size=   26201kB time=00:01:21.35 bitrate=2638.4kbits/s speed=0.999x    

2022-02-05 16:53:27.584 spawn: frame= 2047 fps= 25 q=-1.0 size=   26314kB time=00:01:21.87 bitrate=2632.9kbits/s speed=0.999x    

2022-02-05 16:53:28.090 spawn: frame= 2059 fps= 25 q=-1.0 size=   26530kB time=00:01:22.36 bitrate=2638.8kbits/s speed=0.999x    

2022-02-05 16:53:28.590 spawn: frame= 2073 fps= 25 q=-1.0 size=   26643kB time=00:01:22.91 bitrate=2632.4kbits/s speed=   1x    

2022-02-05 16:53:29.099 spawn: frame= 2085 fps= 25 q=-1.0 size=   26864kB time=00:01:23.39 bitrate=2638.9kbits/s speed=   1x    

2022-02-05 16:53:29.599 spawn: frame= 2097 fps= 25 q=-1.0 size=   26986kB time=00:01:23.87 bitrate=2635.7kbits/s speed=0.999x    

2022-02-05 16:53:30.106 spawn: frame= 2109 fps= 25 q=-1.0 size=   27194kB time=00:01:24.38 bitrate=2640.1kbits/s speed=0.999x    

2022-02-05 16:53:30.609 spawn: frame= 2122 fps= 25 q=-1.0 size=   27296kB time=00:01:24.87 bitrate=2634.6kbits/s speed=0.999x    

2022-02-05 16:53:31.120 spawn: frame= 2135 fps= 25 q=-1.0 size=   27530kB time=00:01:25.40 bitrate=2640.7kbits/s speed=0.999x    

2022-02-05 16:53:31.621 spawn: frame= 2148 fps= 25 q=-1.0 size=   27626kB time=00:01:25.91 bitrate=2634.1kbits/s speed=   1x    

2022-02-05 16:53:32.130 spawn: frame= 2160 fps= 25 q=-1.0 size=   27868kB time=00:01:26.40 bitrate=2642.2kbits/s speed=0.999x    

2022-02-05 16:53:32.630 spawn: frame= 2174 fps= 25 q=-1.0 size=   27963kB time=00:01:26.95 bitrate=2634.4kbits/s speed=   1x    

2022-02-05 16:53:33.134 spawn: frame= 2186 fps= 25 q=-1.0 size=   28169kB time=00:01:27.43 bitrate=2639.3kbits/s speed=   1x    

2022-02-05 16:53:33.635 spawn: frame= 2198 fps= 25 q=-1.0 size=   28262kB time=00:01:27.91 bitrate=2633.5kbits/s speed=0.999x    

2022-02-05 16:53:34.142 spawn: frame= 2210 fps= 25 q=-1.0 size=   28475kB time=00:01:28.42 bitrate=2638.1kbits/s speed=0.999x    

2022-02-05 16:53:34.643 spawn: frame= 2223 fps= 25 q=-1.0 size=   28593kB time=00:01:28.91 bitrate=2634.4kbits/s speed=0.999x    

2022-02-05 16:53:35.148 spawn: frame= 2236 fps= 25 q=-1.0 size=   28809kB time=00:01:29.43 bitrate=2638.8kbits/s speed=0.999x    

2022-02-05 16:53:35.621 spawn: [hls @ 0x1df1470] Opening 'crypto+https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/rai1_2400/exp=1644162723~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=f037e64e403bf9b7cbd22190f0203ed34e8edb99fb277c32e497f769a7fa8dd6/0hec23h4/00000008/media_16963.ts?aka_me_session_id=AAAAAAAAAACj7v9hAAAAAInIeP61XbCgVvonCRgt2wgwHOPML5c42Yl3IqyLAk6dGasg2N0DHMrl1HrJY7kaOFIuiyaUKAKS&aka_msn=16963&aka_hls_version=3&aka_media_format_type=hls' for reading

2022-02-05 16:53:35.743 spawn: [https @ 0x1e13e40] Opening 'https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/itarai1_160/exp=1644162723~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=f037e64e403bf9b7cbd22190f0203ed34e8edb99fb277c32e497f769a7fa8dd6/chunklist_ao.m3u8?aka_me_session_id=AAAAAAAAAACj7v9hAAAAAInIeP61XbCgVvonCRgt2wgwHOPML5c42Yl3IqyLAk6dGasg2N0DHMrl1HrJY7kaOFIuiyaUKAKS&aka_media_format_type=hls' for reading

2022-02-05 16:53:35.752 spawn: [hls @ 0x1df1470] Skip ('#EXT-X-VERSION:3')

2022-02-05 16:53:35.752 spawn: [hls @ 0x1df1470] Skip ('#EXT-X-DISCONTINUITY-SEQUENCE:0')

2022-02-05 16:53:35.752 spawn: [hls @ 0x1df1470] Skip ('#EXT-X-PROGRAM-DATE-TIME:2022-02-05T15:52:50.762+00:00')

2022-02-05 16:53:35.752 spawn: [hls @ 0x1df1470] Opening 'crypto+https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/itarai1_160/exp=1644162723~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=f037e64e403bf9b7cbd22190f0203ed34e8edb99fb277c32e497f769a7fa8dd6/zc3ftx60/00000008/media_16963.aac?aka_me_session_id=AAAAAAAAAACj7v9hAAAAAInIeP61XbCgVvonCRgt2wgwHOPML5c42Yl3IqyLAk6dGasg2N0DHMrl1HrJY7kaOFIuiyaUKAKS&aka_msn=16963&aka_hls_version=3&aka_media_format_type=hls' for reading

2022-02-05 16:53:35.870 spawn: [aac @ 0x1f8aea0] channel element 2.0 is not allocated

2022-02-05 16:53:35.870 spawn: Error while decoding stream #0:0: Invalid data found when processing input

2022-02-05 16:53:35.870 spawn: frame= 2249 fps= 25 q=-1.0 size=   28918kB time=00:01:29.95 bitrate=2633.5kbits/s speed=0.999x    

2022-02-05 16:53:36.245 spawn: frame= 2263 fps= 25 q=-1.0 size=   29153kB time=00:01:30.51 bitrate=2638.5kbits/s speed=0.999x    

2022-02-05 16:53:36.745 spawn: frame= 2276 fps= 25 q=-1.0 size=   29264kB time=00:01:31.03 bitrate=2633.4kbits/s speed=   1x    

2022-02-05 16:53:37.254 spawn: frame= 2289 fps= 25 q=-1.0 size=   29481kB time=00:01:31.55 bitrate=2637.8kbits/s speed=   1x    

2022-02-05 16:53:37.761 spawn: frame= 2301 fps= 25 q=-1.0 size=   29739kB time=00:01:32.04 bitrate=2646.8kbits/s speed=0.999x

@cubimol if I play the mux it has no audio or video problem, the problem is recording.
Even during the play of the mux I have those constant errors but the reproduction is perfect.

This is what I have seen:

  • I can’t watch the stream because I don’t live in Italy
  • the stream is of type ‘hls’, it is an HTTP-based adaptive bitrate streaming like Pluto TV and Samsung TV which can malfunction with tvheadend.

My advice is to use the service hls-proxy with the original playlist and create a second playlist to import into tvheadend. I use five playlists with hls-proxy on ports 33300-33400-33500-33600-33700 which are added to tvheadend using the pipedffm3u.sh script I discussed earlier. When my server starts up it runs another IPTV content synchronization/update script. hls-proxy can also be used directly with http://<hls-proxy-server>:<port> from a PC or smartphone. Try the linux-armv7 version (I use linux-x64).

Another alternative that I have not tried is to use pipe with streamlink, I have heard that it works with hls url!.