Hauppauge HDPVR ioctl errors with V4L2

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
somsn
Newcomer
Posts: 1
Joined: Sun Sep 24, 2017 9:11 pm
United States of America

Hauppauge HDPVR ioctl errors with V4L2

Post by somsn » Sun Sep 24, 2017 9:41 pm

Hey folks, I have a Hauppauge HDPVR at /dev/video0. The firmware is up to date and my kernel and drivers are too.

I have verified that the device works and can transmit video with cat /dev/video0 > test.ts. However, anything involving V4L2, including ffmpeg, spit out an error:

Code: Select all

[video4linux2,v4l2 @ 0x7f338c000920] The device does not support the streaming I/O method.
/dev/video0: Function not implemented
HOWEVER, 'ffplay file:/dev/video0' works. Only that command. 'ffplay -i /dev/video0' does not.

jimcor101
Newcomer
Posts: 3
Joined: Sun Nov 20, 2016 7:57 pm
United States of America

Re: Hauppauge HDPVR ioctl errors with V4L2

Post by jimcor101 » Mon Nov 06, 2017 1:30 am

I think I am having the very sample problem here. Upgraded to 29 and am running the latest kernel (Fedora 26).

cat /dev/video0 > test.ts works absolutely fine with my HDPVR. But when I try to watch LiveTV or record a show, I get a timeout error. (my timeout is currently set to 50000).

I tried 'ffplay file:/dev/video0' and it worked briefly but then locked up my server.... never tried this before so not sure if it worked previously.

Any assistance on this would be greatly appreciated as my mythtv box is just a playback machine right now... recording is completely broken.

User avatar
Steve Goodey
Moderator
Posts: 17
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: Hauppauge HDPVR ioctl errors with V4L2

Post by Steve Goodey » Mon Nov 06, 2017 7:27 am

Not sure if this will help, but under https://www.mythtv.org/wiki/Hauppauge_HD-PVR it says
If you get "Select Timeout" errors, these can sometimes be overcome by stopping the backend, removing the hdpvr module, cycling the power on the HD-PVR, modprobe-ing the hdpvr module, and restarting the backend.
Steve

jimcor101
Newcomer
Posts: 3
Joined: Sun Nov 20, 2016 7:57 pm
United States of America

Re: Hauppauge HDPVR ioctl errors with V4L2

Post by jimcor101 » Wed Nov 08, 2017 2:25 am

Steve,

Thanks... I have a shell script that does exactly that and have been using it regularly to properly reset the HDPVR. I've gone through those steps multiple time and no success. Saw that an update to FFMPEG was posted today and installed it. Still no change in behavior.... mythtv refuses to record even though the HDPVR is working fine when trying to cat /dev/video0. I have been running myth for years and years (first with a PVR-250 and now an HDPVR) and have never had this magnitude of issue getting recording to work. I am really stumped and leaning towards pulling out my old PVR-250 card and trying that to confirm the myth set up is working.

Jim

kmpatel
Newcomer
Posts: 13
Joined: Fri Nov 28, 2014 4:26 pm
United States of America

Re: Hauppauge HDPVR ioctl errors with V4L2

Post by kmpatel » Mon Nov 27, 2017 4:11 pm

I'm have the same problem as @jimcor101, with Mythtv and HDPVR, but I'm not getting that ioctl error as @somsn. I very recently tried to upgrade a operational Mythtv setup from a PVR USB2 encoder to the HD-PVR encoder. With the HD-PVR, I'm able to successfully 'cat /dev/video1' to a file or fifo, I can change HD-PVR configuration using v4l2-ctl, and I can also confirm that mythtv-backend does, in fact, configure the HD-PVR properly (i.e. setting proper input connection), but I'm not able to capture any content using LiveTV or recording mode: mythtv simply times out.

When setting up card type via mythtv-setup, I tried both the 'HD-PVR H.264' as well as 'V4L2 encoder' card types. I also tried both the Component and Composite inputs. When trying to start live TV viewing, using either card-type settings, the HD-PVR unit does light up, indicating encoding in progress, but mythtv insists that there is no signal (Signal 0%) and times out. Upon further investigation, I did notice a problem when setting up using HD-PVR (but not with V4L2) card type: there were absolutely no Recording Profiles created (i.e. no "Default", no "Live TV", no "High Quality", etc) automatically, so I manually created at least Default and Live TV. Unfortunately, this did not help. Moreover, I'm NOW having the same 'signal loss' problem when I return to using the pvrusb2 encoder, which prior to all this was not a problem (for years), suggesting that the problem lies in MythTV or my configuration and not a OS or hardware problem.

@jimcor101, let me know if, when you setup capture card, there were any recording profiles automatically configured for you. And if not, can you check if creating the "Default" and/or "Live TV" profiles makes a difference. Maybe we can tag-team this problem. On the other hand, as a fallback, since I'm able to cat /dev/video1, I'm thinking about just setting up a local, live stream server and having MythTV record off that streaming server.

my config is:
Linux 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
mythtv-backend: 2:0.28.1+fixes.20171104.36fe0ce-0ubuntu0mythbuntu2

kmpatel
Newcomer
Posts: 13
Joined: Fri Nov 28, 2014 4:26 pm
United States of America

Re: Hauppauge HDPVR ioctl errors with V4L2

Post by kmpatel » Tue Nov 28, 2017 4:05 pm

I made progress today.

In yet another attempt to bang my head into a brick wall, I repeated setting up the HD-PVR using the HDPVR card type, but this time, to my surprise and puzzlement, I was able to initiate Live TV watching. In my haste/exhaustion, however, I had forgot to set the external channel change command. So excitedly, I returned to mythtv-setup to add to the input connection settings. Upon returning to the frontend, BONK!: I could no longer start Live TV. BUT BUT BUT BUT, when I go back to mythtv-setup and set the external channel change command to blank or '/bin/true' or some other dummy command and re-return to the frontend, Voila!, I'm able to watch Live TV, just not change channel.

For some reason, my external channel change command is interfering with tuning. Moreover, I found out that it is not even the channel change script itself, because using a dummy script that simply calls the primary script worked: mythtv tunes fine and I could change channel. In my testing, I could replicate the problem if the dummy script returned a non-zero exit code. Unfortunately, my script does NOT return a non-zero exit code, so that in itself does not explain the problem. Fortunately, by burying my channel change script in a dummy script, I can make this particular problem seemingly go away.

So, long story short, check your channel change script (at least @jimcor101). At minimum, see if '/bin/true', as proxy for the script, resolves the problem.

kmpatel
Newcomer
Posts: 13
Joined: Fri Nov 28, 2014 4:26 pm
United States of America

Re: Hauppauge HDPVR ioctl errors with V4L2

Post by kmpatel » Wed Nov 29, 2017 10:56 am

somsn wrote:
Sun Sep 24, 2017 9:41 pm
Hey folks, I have a Hauppauge HDPVR at /dev/video0. The firmware is up to date and my kernel and drivers are too.

I have verified that the device works and can transmit video with cat /dev/video0 > test.ts. However, anything involving V4L2, including ffmpeg, spit out an error:

Code: Select all

[video4linux2,v4l2 @ 0x7f338c000920] The device does not support the streaming I/O method.
/dev/video0: Function not implemented
HOWEVER, 'ffplay file:/dev/video0' works. Only that command. 'ffplay -i /dev/video0' does not.
@somsn I'm new to the HDPVR but I think what you are experience is normal. To view stream in any player, what I've been doing is creating a named pipe, e.g.

Code: Select all

mkfifo /tmp/pipe.mp4
directing /dev/video0 to said pipe, e.g.

Code: Select all

cat /dev/video0 > /tmp/pipe.mp4
and then view said pipe, e.g.

Code: Select all

vlc /tmp/pipe.mp4
Its not ideal but it work is most case.

Post Reply