Difference between revisions of "Example Configuration files"
From MythTV Official Wiki
(→encoder.conf) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 23: | Line 23: | ||
# replaced with the channum provided by mythbackend | # replaced with the channum provided by mythbackend | ||
#command="/home/mythtv/bin/tune-channel.sh %URL% %CHANNUM%" | #command="/home/mythtv/bin/tune-channel.sh %URL% %CHANNUM%" | ||
+ | |||
+ | # If [TUNER/ondatastart] is provided, it will be executed as soon | ||
+ | # as data is seen from the [RECORDER/command] stdout. This can be | ||
+ | # used to do any final cleanup of the tunning operation. | ||
+ | #ondatastart="/home/mythtv/bin/control.py --leftplay 2" | ||
+ | |||
+ | # if [TUNER/newepisodecommand] is provided, it will be executed | ||
+ | # if a new episoded is starting up on the channel that is already | ||
+ | # tuned. In other words, if [TUNER/command] is skipped because | ||
+ | # the current channel is already correct, this will be executed | ||
+ | # instead. | ||
+ | #newepisodecommand="/home/mythtv/bin/control.py --touch %CHANNUM%" | ||
+ | |||
# Timeout for changing channels in msecs | # Timeout for changing channels in msecs | ||
Line 81: | Line 94: | ||
# will be replaced with the channum provided by mythbackend. | # will be replaced with the channum provided by mythbackend. | ||
#command= | #command= | ||
+ | |||
+ | # If [TUNER/ondatastart] is provided, it will be executed as soon | ||
+ | # as data is seen from the [RECORDER/command] stdout. This can be | ||
+ | # used to do any final cleanup of the tunning operation. | ||
+ | #ondatastart="/home/mythtv/bin/control.py --leftplay 2" | ||
+ | |||
+ | # if [TUNER/newepisodecommand] is provided, it will be executed | ||
+ | # if a new episoded is starting up on the channel that is already | ||
+ | # tuned. In other words, if [TUNER/command] is skipped because | ||
+ | # the current channel is already correct, this will be executed | ||
+ | # instead. | ||
+ | #newepisodecommand="/home/mythtv/bin/control.py --touch %CHANNUM%" | ||
# Timeout for changing channels in msecs | # Timeout for changing channels in msecs | ||
Line 154: | Line 179: | ||
# will be replaced with the channum provided by mythbackend. | # will be replaced with the channum provided by mythbackend. | ||
#command= | #command= | ||
+ | |||
+ | |||
+ | # If [TUNER/ondatastart] is provided, it will be executed as soon | ||
+ | # as data is seen from the [RECORDER/command] stdout. This can be | ||
+ | # used to do any final cleanup of the tunning operation. | ||
+ | #ondatastart="/home/mythtv/bin/control.py --leftplay 2" | ||
+ | |||
+ | # if [TUNER/newepisodecommand] is provided, it will be executed | ||
+ | # if a new episoded is starting up on the channel that is already | ||
+ | # tuned. In other words, if [TUNER/command] is skipped because | ||
+ | # the current channel is already correct, this will be executed | ||
+ | # instead. | ||
+ | #newepisodecommand="/home/mythtv/bin/control.py --touch %CHANNUM%" | ||
# Timeout for changing channels in msecs | # Timeout for changing channels in msecs | ||
Line 184: | Line 222: | ||
ICON=/home/mythtv/icon2.jpg | ICON=/home/mythtv/icon2.jpg | ||
</pre> | </pre> | ||
+ | |||
==== IP Encoder Example ==== | ==== IP Encoder Example ==== | ||
If using a Roku as the STB (Set Top Box), then [https://pypi.org/project/roku/] may be of interest. | If using a Roku as the STB (Set Top Box), then [https://pypi.org/project/roku/] may be of interest. | ||
===== encoder.conf ===== | ===== encoder.conf ===== | ||
− | <pre> | + | <pre style="color: blue"> |
[RECORDER] | [RECORDER] | ||
# The recorder command to execute. %URL% is optional, and | # The recorder command to execute. %URL% is optional, and | ||
Line 207: | Line 246: | ||
# will be replaced with the channum provided by mythbackend. | # will be replaced with the channum provided by mythbackend. | ||
command="/home/mythtv/bin/roku-control.py --debug --roku roku1 --set-channel %CHANNUM%" | command="/home/mythtv/bin/roku-control.py --debug --roku roku1 --set-channel %CHANNUM%" | ||
+ | |||
+ | # If [TUNER/ondatastart] is provided, it will be executed as soon | ||
+ | # as data is seen from the [RECORDER/command] stdout. This can be | ||
+ | # used to do any final cleanup of the tunning operation. | ||
+ | #ondatastart="/home/mythtv/bin/control.py --leftplay 2" | ||
+ | |||
+ | # if [TUNER/newepisodecommand] is provided, it will be executed | ||
+ | # if a new episoded is starting up on the channel that is already | ||
+ | # tuned. In other words, if [TUNER/command] is skipped because | ||
+ | # the current channel is already correct, this will be executed | ||
+ | # instead. | ||
+ | #newepisodecommand="/home/mythtv/bin/control.py --touch %CHANNUM%" | ||
# Timeout for changing channels in msecs | # Timeout for changing channels in msecs |
Revision as of 22:27, 25 May 2020
Contents
vlc Example
vlc.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=-}\"" # Optional cleanup command which is executed when this recorder is shut down cleanup="/home/mythtv/bin/input-finished.sh" # Used in logging events, %ARG% are replaced from the channel info desc=cvlc \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\" [TUNER] # An optional CONF file which provides channel details. channels=vlc-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. %CHANNUM% will be # replaced with the channum provided by mythbackend #command="/home/mythtv/bin/tune-channel.sh %URL% %CHANNUM%" # If [TUNER/ondatastart] is provided, it will be executed as soon # as data is seen from the [RECORDER/command] stdout. This can be # used to do any final cleanup of the tunning operation. #ondatastart="/home/mythtv/bin/control.py --leftplay 2" # if [TUNER/newepisodecommand] is provided, it will be executed # if a new episoded is starting up on the channel that is already # tuned. In other words, if [TUNER/command] is skipped because # the current channel is already correct, this will be executed # instead. #newepisodecommand="/home/mythtv/bin/control.py --touch %CHANNUM%" # 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
vlc-channel.conf
[2] NAME=Second Channel CALLSIGN=Second XMLTVID= URL="https://manifest.auditude.com/auditude/variant/samsung_pet_collective/aHR0cDovL21hbmlmZXN0Lnd1cmwuY29tL2NoYW5uZWxzL3NhbXN1bmcvdGhlX3BldF9jb2xsZWN0aXZlX2xpbmVhcl8vcGxheWxpc3QubTN1OA==.m3u8?u=19287a324825cc5aacb7e46183c72324&z=268729&g=1000003&k=channel_id=227516;page_url=http%253A%252F%252Fwww.wurl.com%252Fwatch%252Fpet_collective;dnt=0;wurl_channel=91;distributor=samsung&ptcueformat=turner&pttrackingmode=sstm&pttrackingversion=v2&__sid__=abcdeab" ICON=/home/mythtv/etc/second-channel-icon.jpg [3] NAME=Third channel CALLSIGN=Third XMLTVID= URL=/mythtv/1/TV/1071_20180817030000.ts
youtube Example
youtube.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="/usr/bin/youtube-dl --hls-use-mpegts --ffmpeg-location /opt/ffmpeg/bin --external-downloader-args \"-hide_banner -nostats -loglevel panic -re\" -o - \"%URL%\"" # Optional cleanup command which is executed when this recorder is shut down cleanup="/home/mythtv/bin/input-finished.sh" # Used in logging events, %ARG% are replaced from the channel info desc=Twitch \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\" [TUNER] # An optional CONF file which provides channel details. channels=youtube-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. %CHANNUM% # will be replaced with the channum provided by mythbackend. #command= # If [TUNER/ondatastart] is provided, it will be executed as soon # as data is seen from the [RECORDER/command] stdout. This can be # used to do any final cleanup of the tunning operation. #ondatastart="/home/mythtv/bin/control.py --leftplay 2" # if [TUNER/newepisodecommand] is provided, it will be executed # if a new episoded is starting up on the channel that is already # tuned. In other words, if [TUNER/command] is skipped because # the current channel is already correct, this will be executed # instead. #newepisodecommand="/home/mythtv/bin/control.py --touch %CHANNUM%" # 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/mythtv/bin/scan.sh "%CHANCONF%" # Timeout for scan command in msecs #timeout=60000
youtube-channel.conf
[1] NAME=Twitch Arcade Cloud CALLSIGN=ArcadeCloud XMLTVID= URL=https://www.twitch.tv/arcadecloud ICON=/home/mythtv/etc/some-icon.jpg [2] NAME=Twitch Buzzr CALLSIGN=Buzzr XMLTVID= URL=https://www.twitch.tv/buzzr [3] NAME=Twitch Cosmos CALLSIGN=Cosmos XMLTVID= URL=https://www.twitch.tv/cosmos [4] NAME=Twitch Eleven Sports Next CALLSIGN=11SportsNext XMLTVID= URL=https://www.twitch.tv/elevensportsnext [5] NAME=Twitch Fail Army CALLSIGN=FailArmy XMLTVID= URL=https://www.twitch.tv/failarmy
ffmpeg Example
ffmpeg.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=/opt/ffmpeg/bin/ffmpeg -hide_banner -nostats -loglevel panic -re -i \"%URL%\" -c:v copy -c:a copy -f mpegts - # Optional cleanup command which is executed when this recorder is shut down cleanup="/home/mythtv/bin/input-finished.sh" # Used in logging events desc=ffmpeg \"%URL%\" \"%CHANNUM%\" \"%CHANNAME%\" \"%CALLSIGN%\" [TUNER] # An optional CONF file which provides channel details. channels=ffmpeg-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. %CHANNUM% # will be replaced with the channum provided by mythbackend. #command= # If [TUNER/ondatastart] is provided, it will be executed as soon # as data is seen from the [RECORDER/command] stdout. This can be # used to do any final cleanup of the tunning operation. #ondatastart="/home/mythtv/bin/control.py --leftplay 2" # if [TUNER/newepisodecommand] is provided, it will be executed # if a new episoded is starting up on the channel that is already # tuned. In other words, if [TUNER/command] is skipped because # the current channel is already correct, this will be executed # instead. #newepisodecommand="/home/mythtv/bin/control.py --touch %CHANNUM%" # 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
ffmpeg-channel.conf
[1] NAME=Test Channel 1 CALLSIGN=TEST1 XMLTVID= URL=/mythtv/1/TV/60004_20181016040000.ts ICON=/home/mythtv/icon1.jpg [2] NAME=Test Channel 2 CALLSIGN=TEST2 XMLTVID= URL=/mythtv/1/TV/50002_20181015070000.ts ICON=/home/mythtv/icon2.jpg
IP Encoder Example
If using a Roku as the STB (Set Top Box), then [1] may be of interest.
encoder.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="curl --silent http://uhe2654/12.ts" cleanup="/home/mythtv/bin/roku-control.py --debug --roku roku1 --reset" # Used in logging events, %ARG% are replaced from the channel info desc="Roku1" [TUNER] # An optional CONF file which provides channel details. #channels= # 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. %CHANNUM% # will be replaced with the channum provided by mythbackend. command="/home/mythtv/bin/roku-control.py --debug --roku roku1 --set-channel %CHANNUM%" # If [TUNER/ondatastart] is provided, it will be executed as soon # as data is seen from the [RECORDER/command] stdout. This can be # used to do any final cleanup of the tunning operation. #ondatastart="/home/mythtv/bin/control.py --leftplay 2" # if [TUNER/newepisodecommand] is provided, it will be executed # if a new episoded is starting up on the channel that is already # tuned. In other words, if [TUNER/command] is skipped because # the current channel is already correct, this will be executed # instead. #newepisodecommand="/home/mythtv/bin/control.py --touch %CHANNUM%" # Timeout for changing channels in msecs timeout=30000 [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