[mythtv-users] mythtv and zoneminder cameras
Stephen Worthington
stephen_agent at jsw.gen.nz
Wed May 5 13:14:34 UTC 2021
On Wed, 5 May 2021 12:37:30 +0100, you wrote:
>On 05/05/2021 12:17, Doug Lytle wrote:
>>>>> What I need is a pointer to some instructions to configure a source to accept IP streams in mythtv,
>>>>> when all I have is the streams. How do I do that? The streams would be in the format:
>>
>> Mike,
>>
>> I've tried to do this also, I'm still on .29 and found information on setting up a network tuner with a m3u file, but I was not able to get it to work. The contents of that m3u is
>>
>> doug at desktop:~/Desktop$ cat playlist.m3u
>>
>> #EXTM3U
>>
>> #EXTINF:0,501 - Back Yard
>>
>> rtsp://camera1.drdos.info/live.sdp
>>
>> #EXTINF:0,502 - Driveway
>>
>> rtsp://camera3.drdos.info/live.sdp
>>
>> I have 2 cameras that I can use VLC to stream, so I tried to add channels 501 and 502 to Myth.
>>
>> I can select those a channels in Myth, but it does not provide a video stream.
>>
>> I'd be interested in this as well, but do not know for certain if my version of Myth is compatible.
>>
>Ah, sorry. Forgot to include my version:
>
>mythtv at jade:~$ mythbackend --version
>Please attach all output as a file in bug reports.
>MythTV Version : v30.0
>MythTV Branch :
>Network Protocol : 91
>Library API : 30.20181231-1
>QT Version : 5.11.3
>(snip)
>mythtv at jade:~$
>
>I'm using Debian Buster and the deb-multimedia repo.
>
>I really do have an upgrade on the 'to do' list but time, etc. and it isn't (yet) broke.
I have been using IPTV to record from rtsp URLs (SAT>IP in my case)
for several versions of MythTV now. Getting the exact format of the
playlist.m3u file correct is important if you want to set things up
that way, but as far as I can tell your playlist.m3u format is
correct. But where I had problems was actually getting the tuner to
load the playlist.m3u file. I found the easiest way was to have the
playlist.m3u file on my Apache2 web server (that also runs mythweb and
other things). I just put the playlist.m3u file in the /var/www/html
directory and accessed it from there:
http://satip.jsw.gen.nz/playlist.m3u
or
http://10.0.2.4/playlist.m3u
if you do not run a local nameserver. Other methods of accessing the
playlist.m3u file that I tried simply did not work - no channels were
created.
But if you have only a few channels to set up, then you can just do
that manually directly in the database. That is what I do when a new
channel or channel change happens with my SAT>IP channels. I use
DBeaver as a good freeware SQL editor:
https://dbeaver.io/
and just create a channel by copying an existing channel in the
channel and iptv_channel tables and changing the values to what the
new channel needs.
Here is one of my SAT>IP tuners:
MariaDB [mythconverg]> select * from capturecard where sourceid=6
limit 1\G
*************************** 1. row ***************************
cardid: 90
parentid: 0
videodevice: http://satip.jsw.gen.nz/playlist.m3u
audiodevice: NULL
vbidevice: NULL
cardtype: FREEBOX
defaultinput: Television
audioratelimit: NULL
hostname: mypvr
dvb_swfilter: 0
dvb_sat_type: 0
dvb_wait_for_seqstart: 1
skipbtaudio: 0
dvb_on_demand: 1
dvb_diseqc_type: NULL
firewire_speed: 0
firewire_model: NULL
firewire_connection: 0
signal_timeout: 1000
channel_timeout: 30000
dvb_tuning_delay: 0
contrast: 0
brightness: 0
colour: 0
hue: 0
diseqcid: NULL
dvb_eitscan: 0
inputname: MPEG2TS
sourceid: 6
externalcommand: NULL
changer_device: NULL
changer_model: NULL
tunechan: NULL
startchan: 4210
displayname: SAT>IP 1.1 (90)
dishnet_eit: 0
recpriority: 2
quicktune: 0
schedorder: 11
livetvorder: 11
reclimit: 2
schedgroup: 0
1 row in set (0.001 sec)
and the channel and iptv_channel rows for a SAT>IP channel:
MariaDB [mythconverg]> select * from channel where chanid=10072\G
*************************** 1. row ***************************
chanid: 10072
channum: 4072
freqid: NULL
sourceid: 6
callsign: NATGE
name: Nat Geographic
icon: national_geographic.jpg
finetune: NULL
videofilters:
xmltvid: nat-geographic.sky.co.nz
recpriority: 0
contrast: 32768
brightness: 32768
colour: 32768
hue: 32768
tvformat: Default
visible: 1
outputfilters:
useonairguide: 0
mplexid: NULL
serviceid: 1012
service_type: 0
tmoffset: 0
atsc_major_chan: 0
atsc_minor_chan: 0
last_record: 2021-05-03 08:29:01
default_authority:
commmethod: -1
iptvid: NULL
deleted: NULL
1 row in set (0.001 sec)
MariaDB [mythconverg]> select * from iptv_channel where chanid=10072\G
*************************** 1. row ***************************
iptvid: 116
chanid: 10072
url:
rtsp://satip.jsw.gen.nz:554/?src=1&freq=12581&msys=dvbs2&plts=off&fec=23&pol=h&ro=0.35&sr=22500&mtype=8psk&pids=0,307,1007,1107,1907
type: data
bitrate: 0
1 row in set (0.001 sec)
MythTV up to v31 can, however, only handle direct URLs - any
redirection and it does not work. So maybe that is the problem - if
you are using cameras where they send via a cloud site, there is
likely to be redirection. VLC can handle that, but MythTV can not.
Trying to capture from a camera using curl commands should show if
there is redirection happening, or you can run Wireshark and capture
the network traffic when you use VLC to play from a camera and see any
redirection there.
More information about the mythtv-users
mailing list