HDPVR unable to be detected via mythtv v34 web app
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
HDPVR unable to be detected via mythtv v34 web app
My mythtv is deployed on an LXD container running ubuntu 24.04 on an ubuntu 24.04 host. My HDPVR is connected to the host and i pass the usb device as a unix-char device through to LXD. I have been doing this for a few years on my v.33 system. On my v.34 container, the new web app cannot detect the device. If i run mythtv-setup, however, i can set up the device, though when i return to the web app, it shows only the device but indicates it is not getting any response from it.
Since mythtv-setup sees the device (and so does v4l2-ctl) i believe i have passed the device to the container correctly. Moreover, it functions fine when i pass it to the v.33 container.
I did test it on a bare metal instance of ubuntu 24.04 and it's detected in the web app properly.
Wondering if there is some package i may be missing in the ubuntu container. When i first started using the HDPVR, i have a vague memory that the capture device had to have an id # below 16 - not sure if i am remembering this correctly. And through all of my false starts with mythtv v 34 due to my other issue (now resolved), my capture device numbers are greater than that now. In older myth versions, if you clicked the button in mythv-setup to remove all capture devices it would reset the id numbering to start at 1, but that button in the web app no longer does that - should it?.
Any suggestions? thanks.
Since mythtv-setup sees the device (and so does v4l2-ctl) i believe i have passed the device to the container correctly. Moreover, it functions fine when i pass it to the v.33 container.
I did test it on a bare metal instance of ubuntu 24.04 and it's detected in the web app properly.
Wondering if there is some package i may be missing in the ubuntu container. When i first started using the HDPVR, i have a vague memory that the capture device had to have an id # below 16 - not sure if i am remembering this correctly. And through all of my false starts with mythtv v 34 due to my other issue (now resolved), my capture device numbers are greater than that now. In older myth versions, if you clicked the button in mythv-setup to remove all capture devices it would reset the id numbering to start at 1, but that button in the web app no longer does that - should it?.
Any suggestions? thanks.
Re: HDPVR unable to be detected via mythtv v34 web app
Is mythbackend running in the same machine and the same user id as mythtv-setup?
There may be a permissions problem, the backend may need to have audio and video groups.
The HDPVR should have a device like /dev/videox Do you see it in the container? Does your mythtv user have the correct permissions to access it?
Check the mythbackend log while you are trying to run setup with the web app to see if any error messages are showing.
If you set up the HDPVR with mythtv-setup can you record from it with mythbackend?
There may be a permissions problem, the backend may need to have audio and video groups.
The HDPVR should have a device like /dev/videox Do you see it in the container? Does your mythtv user have the correct permissions to access it?
Check the mythbackend log while you are trying to run setup with the web app to see if any error messages are showing.
If you set up the HDPVR with mythtv-setup can you record from it with mythbackend?
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
Re: HDPVR unable to be detected via mythtv v34 web app
Yes - as user mythtv
yes, the backend has those groups and mythtv is in both groups.
Yes, it's there and user mythtv has access to it via the video group - though i tried setting it as the owner too and that didn't work either.
no new messages in the log when i access the web app to add the hdpvr - the list shows only one entry of empty (having removed the tuner after trying with mythtv-setup)
i will have to try this...
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
Re: HDPVR unable to be detected via mythtv v34 web app
moreover, user mythtv can do which produces a playable video, so i feel the device is passed successfully to the container. The way i set up the container to do X11 GUI seems to get stuck going through the mythtv-setup, so having difficulty at the moment trying the hdpvr setup again in mythtv-setup..
Code: Select all
cat /dev/video0 > test.ts
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
Re: HDPVR unable to be detected via mythtv v34 web app
@pgbennett - ok, got the tuner setup in mythtv-setup. it works, sort of. i can schedule recordings and the channel gets tuned and the recording is made, but i am getting a bunch of errors in the log and you can see in the video a bunch of starting/stopping artifacts and the audio drops out for longer periods of time than the video start/stop artifacts... 1-2 seconds vs 10s of seconds. Moreover you can see the LED light on the tuner go on and off while the recording is being made.
Unlike my v33 system on which i have none of these issues. it just works.
log snippet:
https://pastebin.com/Q8HLhDxM
Unlike my v33 system on which i have none of these issues. it just works.
log snippet:
https://pastebin.com/Q8HLhDxM
Re: HDPVR unable to be detected via mythtv v34 web app
I developed the web app, so if something is not right there I can try to fix it. It tries to do the same as mythtv-setup, but I do not have a HDPVR to test on. What exact error do you get from the web app setup?
As far as the poor recording is concerned, I have no idea. I have no HDPVR and I have no experience with LXD. Maybe somebody else can help.
Alternatively you can replace the HDPVR with a USB HDMI capture device that costs around $10 from amazon. The downside is there is no surround sound and it uses more CPU power. I have three of these on my backend for all of my recording, up to three channels at a time. See links below
https://github.com/bennettpeter/MythTV-V4L2Capture
If you have comcast I have scripts that support recording from a fire stick:
https://github.com/bennettpeter/MythTV-LeanCapture
As far as the poor recording is concerned, I have no idea. I have no HDPVR and I have no experience with LXD. Maybe somebody else can help.
Alternatively you can replace the HDPVR with a USB HDMI capture device that costs around $10 from amazon. The downside is there is no surround sound and it uses more CPU power. I have three of these on my backend for all of my recording, up to three channels at a time. See links below
https://github.com/bennettpeter/MythTV-V4L2Capture
If you have comcast I have scripts that support recording from a fire stick:
https://github.com/bennettpeter/MythTV-LeanCapture
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
Re: HDPVR unable to be detected via mythtv v34 web app
if i try to do the setup in the web app in the container, i don't get any error message, but the drop down to select the card doesn't show /dev/video0 - there is one entry labeled Empty, and the Probed Info field reads Device does not exist. (btw, in mythtv-setup i had to type it in manually too). however if i plug the device into another machine and run mythtv v34 on that machine directly on the metal, then when i run the web app, /dev/video does show up in the drop down, so it's something container specific. however, i'm going to try recording from that device and see if i'm able to do so on that machine. if so another possible solution is that i simply use this other machine as a slave backend.
i will also look at your scripts...
i will also look at your scripts...
Re: HDPVR unable to be detected via mythtv v34 web app
I does an ioctl command against the video device to find out if it has video capabilities. It seems that the response to the ioctl indicates that there is no video support. Is there a setting in LXD to pass through the ioctl commands and responses?
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
Re: HDPVR unable to be detected via mythtv v34 web app
It seems these are kernel level controls - i don't think i should need to do anything in the container to have it supported, but i also don't know how to test it. is there an easy way from the command line? (my bare metal host isn't going to work - it installs the card ok, although it cannot detect the audio setup. but the machine isn't beefy enough to run mythtv - or maybe it's just too many interrupts on the 2012 era usb bus..).
Re: HDPVR unable to be detected via mythtv v34 web app
I do not have a HD PVR, but if I run the web setup and try top add a HDPVR it shows my webcam /dev/video0 in the list, so if you are not seeing anything in the list it is not even detecting that the HDPVR has any video capability.
The call it is using is VIDIOC_QUERYCAP.. There is a tool at https://github.com/jerome-pouiller/ioctl You can build and run it.
I guess you could try that in the container and also on the bare metal system and compare the results.
The call it is using is VIDIOC_QUERYCAP.. There is a tool at https://github.com/jerome-pouiller/ioctl You can build and run it.
Code: Select all
ioctl /dev/video0 VIDIOC_QUERYCAP | hexdump -C
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
Re: HDPVR unable to be detected via mythtv v34 web app
@pgbennett - thanks for your advice & time. i think i'm going to have to just install to bare metal. i tried one of your scripts for the capture device and i think that there is still more config in the container than i have set up currently. when i started vlc in the container, it too has a problem with the /dev/video0 device - it is getting a permission error and i can't figure that out. so, for now i think i'm just going to install to bare metal.
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
Re: HDPVR unable to be detected via mythtv v34 web app
@pgbennett - so got back to this and installed to bare metal. there are still issues with HDPVR on bare metal. the 2 i notice are:
1) while you can pick the /dev/video0 (or whichever) video device in the web GUI, you cannot pick the audio input - the dropdown is blank - it shows no results found. I resorted to use the mythtv-setup to finish the setup and it works fine, but afterwards still does not show up in the GUI.
2) in the input connections setup, you can't enter the channel change script - i had to use mythtv-setup to enter it and eventually it showed up in the web app.
3) unrelated to hdpvr - but more specific to the web gui, opened a thread specifically for that: viewtopic.php?f=36&t=5769
i have an extra HDPVR if it helps... it may be a slightly older h/w version than the one i'm using, but i can donate it if it helps...
all this has made me more curious about your other scripts - so i've been working on getting them installed to try out. there are a few things i've found... i'll share in github...
1) while you can pick the /dev/video0 (or whichever) video device in the web GUI, you cannot pick the audio input - the dropdown is blank - it shows no results found. I resorted to use the mythtv-setup to finish the setup and it works fine, but afterwards still does not show up in the GUI.
2) in the input connections setup, you can't enter the channel change script - i had to use mythtv-setup to enter it and eventually it showed up in the web app.
3) unrelated to hdpvr - but more specific to the web gui, opened a thread specifically for that: viewtopic.php?f=36&t=5769
i have an extra HDPVR if it helps... it may be a slightly older h/w version than the one i'm using, but i can donate it if it helps...
all this has made me more curious about your other scripts - so i've been working on getting them installed to try out. there are a few things i've found... i'll share in github...
Re: HDPVR unable to be detected via mythtv v34 web app
Do you still get a cable company converter box that has component output? I see that Comcast no longer has them and that some people get a hdmi-to-component converter, with limited success.
I do not have a HD PVR, so I built the web setup by copying what mythtv-setup does. Apparently this did not work out correctly.
If you want to lend me the spare HD PVR I will try to get the web setup working. Does the sparte HD PVR work with mythtv-setup?
What cable company do you have?
Probably an HDMI solution would be preferable long term. I put together the code at https://github.com/bennettpeter/MythTV-V4L2Capture as a general purpose subset of the code I am using that is specific for Comcast at https://github.com/bennettpeter/MythTV-LeanCapture . I don't know if anybody else is using either of these.
I do not have a HD PVR, so I built the web setup by copying what mythtv-setup does. Apparently this did not work out correctly.
If you want to lend me the spare HD PVR I will try to get the web setup working. Does the sparte HD PVR work with mythtv-setup?
What cable company do you have?
Probably an HDMI solution would be preferable long term. I put together the code at https://github.com/bennettpeter/MythTV-V4L2Capture as a general purpose subset of the code I am using that is specific for Comcast at https://github.com/bennettpeter/MythTV-LeanCapture . I don't know if anybody else is using either of these.
-
- Junior
- Posts: 35
- Joined: Sun May 03, 2015 12:38 am
Re: HDPVR unable to be detected via mythtv v34 web app
i believe i had the spare hdpvr working at one point - i'll try it again and advise - i have an older system (mythtv v0.33) that i can test mythtv-setup with.
i have comcast. i could not get LeanCapture to work at all. it setup ok (i had to edit the scripts as there is no argument to the `--update` argument of cp, so i just left them out. also, vlc can't be installed as a snap package - once i installed via apt, i was able to get /dev/video0 output to show up when opening the capture device in vlc. with the snap version of vlc i got permission errors. i tried this on multiple systems with the same results.
i installed on a non-mythtv system and could not get leanrec or leanfire to work at all. it just seemed like i could not get the script to actually simulate the button press so it just timed out or whatever and the script would terminate.
I had not tried V4L2Capture yet - but i will try over the weekend. will advise on that as well as status of my spare hdpvr.
thanks
i have comcast. i could not get LeanCapture to work at all. it setup ok (i had to edit the scripts as there is no argument to the `--update` argument of cp, so i just left them out. also, vlc can't be installed as a snap package - once i installed via apt, i was able to get /dev/video0 output to show up when opening the capture device in vlc. with the snap version of vlc i got permission errors. i tried this on multiple systems with the same results.
i installed on a non-mythtv system and could not get leanrec or leanfire to work at all. it just seemed like i could not get the script to actually simulate the button press so it just timed out or whatever and the script would terminate.
I had not tried V4L2Capture yet - but i will try over the weekend. will advise on that as well as status of my spare hdpvr.
thanks
Re: HDPVR unable to be detected via mythtv v34 web app
Do you have the correct hardware for LeanCapture - Amazon fire stick 4k with xfinity streaming app installed, and a usb hdmi capture device as described in the readme (not an HD PVR)?
I can help you get that set up. Do you have developer mode set on the fire stick?
I can help you get that set up. Do you have developer mode set on the fire stick?