[mythtv-users] Debugging problem with ExternalRecorder and streamlink

Peter Carlsson peter.jm.carlsson at gmail.com
Sat Jun 26 21:30:09 UTC 2021


On Fri, Jun 25, 2021 at 11:33:46AM -0400, Peter Bennett wrote:
> 
> On 6/24/21 5:32 PM, Peter Carlsson wrote:
> > According to the log above it receive data from streamlink but fails to
> > find the start of the stream to sync/lock on.
> > 
> > I have no knowledge about how this is working but it feels that MythTV
> > and VLC have different ways of finding the start of a stream.
> > 
> > Could someone explain how this works in MythTV?
> > 
> > I can build MythTV and add more logging but am not sure where to put it
> > and what I should log to best find out what is failing.
> > 
> > Best regards,
> > Peter Carlsson
> 
> I don't know what streamlink is. I am working on a system using the external
> recorder to record from Xfinity stream, and it is working reasonably well.
> 
> Can you explain your setup.
> 
> I am using capturecard External Black Box. In mythtv-setup I give it the
> name and location of a bash script. That script does a few things and then
> calls mythexternrecorder passing the name of a configuration file. The
> configuration file contains the names of scripts that are executed to tune,
> to record, to end recordings and to signal a new episode.
> 
> Is this similar to your setup?
> 
> The script that is executed to record must output a transport stream to
> stdout and not output anything else (no messages, etc.). Since the capture
> device I have does not output a transport stream I execute ffmpeg to convert
> to a transport stream. I can share the details.

Thanks for sharing!

https://streamlink.github.io

I had it working perfectly until the plugin for SVTPlay in Streamlink
stopped working. It did not take long before Ian Cameron fixed/rewrote
the plugin and it start work in Streamlink again but after that I never
got it working in MythTV.

If I remember correctly I followed the examples on https://www.mythtv.org/wiki/Example_Configuration_files
when I first set it up.

As I wrote in my previous email it feels that MythTV is receiving a
stream from Streamlink but never find the start of the stream to
sync/lock on.

It never crossed my mind to try ffmpeg until I read that you use it. I
should probably give that a try.

Please let me know if you want some further explanation.

Here are my config files.

# cat /home/peter/script/mythtv-svtplay-external-recorder.conf
[RECORDER]
# The recorder command to execute.  %URL% is optional, and
# will be replaced with the channel's "URL" as defined in the
# [TUNER/channels] (channel conf) configuration file
#command="cvlc \"%URL%\" --sout \"#std{mux=ts,access=file,dst=-}\""
command="/usr/bin/streamlink --player=vlc --stdout \"%URL%\" best"

# Used in logging events, %ARG% are replaced from the channel info
desc=streamlink \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\"

[TUNER]
# An optional CONF file which provides channel details.  If it does not
# exist, then channel changes are not supported.
channels=mythtv-svtplay-external-recorder-channels.conf

# If [TUNER/command] is provided, it will be executed to "tune" the
# channel. A %URL% parameter will be substituted with the "URL" as
# defined in the [TUNER/channels] configuration file
#command=

# Timeout for changing channels in msecs
#timeout=


[SCANNER]
# When MythTV scans for channels, The contents of the [TUNER/channels]
# config file are used to populate MythTV's channel information.
# If a command is provided here, it will be executed first, so it can
# populate the [TUNER/channels] config file
#command=/home/myth/bin/scan.sh "%CHANCONF%"

# Timeout for scan command in msecs
#timeout=60000

# cat /home/peter/script/mythtv-svtplay-external-recorder-channels.conf
[1]
NAME=SVT1 HD
CALLSIGN=SVT1HD
XMLTVID=svt1.svt.se
URL="https://www.svtplay.se/kanaler/svt1?start=auto"
ICON=/home/mythtv/.mythtv/channels/svt1.svt.se.png

[2]
NAME=SVT2 HD
CALLSIGN=SVT2HD
XMLTVID=svt2.svt.se
URL="https://www.svtplay.se/kanaler/svt2?start=auto"
ICON=/home/mythtv/.mythtv/channels/svt2.svt.se.png

[3]
NAME=Kunskapskanalen
CALLSIGN=Kunskapskanalen
XMLTVID=kunskapskanalen.svt.se
URL="https://www.svtplay.se/kanaler/kunskapskanalen?start=auto"
ICON=/home/mythtv/.mythtv/channels/kunskapskanalen.svt.se.png

[4]
NAME=Barnkanalen
CALLSIGN=Barnkanalen
XMLTVID=barnkanalen.svt.se
URL="https://www.svtplay.se/kanaler/svtbarn?start=auto"
ICON=/home/mythtv/.mythtv/channels/barnkanalen.svt.se.png

[5]
NAME=SVT24
CALLSIGN=SVT24
XMLTVID=svt24.svt.se
URL="https://www.svtplay.se/kanaler/svt24?start=auto"
ICON=/home/mythtv/.mythtv/channels/svt24.svt.se.png



More information about the mythtv-users mailing list