TVHeadend Server recording issue in Matrix

Ok, I’ll try to figure out how to do it, thanks for the suggestion.
But the absurd thing is that with CoreElec V9.2.8 I have no problem with that mux, how is that possible?
What has changed in the Matrix that may have compromised this thing?

The hunt continues.
That mux has 3 video streams and 6 audio streams, that’s why FFmpeg goes crazy.
I should figure out how to force only one audio and one video stream (if is possibile).

I’m hearty by definition, so I did a clean install of THHeadend on a Raspberry 3 to always test with this mux, and exactly the same problem occurs during recording.
I therefore exclude FFMpeg which is version 4.x as in CoreELEC V9.2.8, but I am still thrilled because in Leia this problem does not exist, I do not understand where the difference lies.
The mux is the same, FFMpeg identical to the one I have on the Raspberry, how is that possible? :frowning_face:
What’s in CoreELC V9.2.8 that doesn’t give this problem?

I had not done the right tests with FFmpeg inside the Matrix, it works with the version of Leia!
The solution:

  1. ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developersbuilt with gcc 10.3.0 (GCC)
  2. the working mux: pipe:///storage/.kodi/userdata/bin/ffmpeg -loglevel fatal -hide_banner -re -i “https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803” -c copy -f mpegts -flags +global_header pipe:1

FFmpeg V5 with this mux probably has that problem.
In reality, however, there are audio gaps in the recording, but at least the time is respected.

I’m noticing that your scripts produce unwanted results if there are blank lines in the source list, please could you check?
How to automate the skip of empty lines if they exist?
My script:

#!/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
cd /storage/.kodi/userdata/iptv
rm iptv2.m3u
wget -O iptv2.m3u https://pastebin.com/raw/8GpCCkhf
  sed '/#EXTM3U/s/http/TEMP/' $1 > $1.pipedff.m3u
  sed -i '/#EXTINF/!s/http/pipe:\/\/\/storage\/.kodi\/addons\/tools.ffmpeg-tools\/bin\/ffmpeg -user_agent "okhttp\/4.9.0" -re -i "http/' $1.pipedff.m3u
  sed -i '/#EXTINF/!s/$/" -vcodec copy -acodec copy -f mpegts -tune zerolatency -flags +global_header pipe:1/' $1.pipedff.m3u
  sed -i '/#EXTM3U/s/TEMP/http/' $1.pipedff.m3u
  sed -i '/#EXTM3U/s/" -vcodec copy -acodec copy -f mpegts -tune zerolatency -flags +global_header pipe:1//' $1.pipedff.m3u

The best thing about this time is having knowledge at your fingertips :wink: I suggest you use the Google search engine: “linux sed delete empty lines”

I’m trying all right, but I still get the output wrong in the second part, adds an unwanted ENTER:

#EXTINF:-1 tvg-id=“” group-title=“RAI” tvg-logo=“002.png”,Rai 2
pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -user_agent “okhttp/4.9.0” -re -i "CDN relinker
" -vcodec copy -acodec copy -f mpegts -tune zerolatency -flags +global_header pipe:1

wget -O iptv2.m3u.tmp https://pastebin.com/raw/8GpCCkhf
sed ‘/^[[:space:]]$/d’ iptv2.m3u.tmp
sed -i '/^[[:space:]]
$/d’ iptv2.m3u.tmp
sed -r ‘/^\s*$/d’ iptv2.m3u.tmp > $1
sed ‘/#EXTM3U/s/http/TEMP/’ $1 > $1.pipedff.m3u
sed -i ‘/#EXTINF/!s/http/pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -user_agent “okhttp/4.9.0” -re -i "http/’ $1.pipedff.m3u
sed -i ‘/#EXTINF/!s/$/" -vcodec copy -acodec copy -f mpegts -tune zerolatency -flags +global_header pipe:1/’ $1.pipedff.m3u
sed -i ‘/#EXTM3U/s/TEMP/http/’ $1.pipedff.m3u
sed -i ‘/#EXTM3U/s/" -vcodec copy -acodec copy -f mpegts -tune zerolatency -flags +global_header pipe:1//’ $1.pipedff.m3u
fi

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.