LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-14-2017, 05:43 PM   #1
tempo-namee
LQ Newbie
 
Registered: Sep 2017
Distribution: Slackware
Posts: 8

Rep: Reputation: Disabled
V4L2 driver can't access stream from /dev/video; I/O or ioctl error


I have a Hauppauge DVR at /dev/video0. The device is correctly identified and labeled by V4L2 information utils, but it is unable to pass video. When opened with the qV4L2 utility, I get these two errors:

"VIDIOC_CROPCAP returned -1 (Inappropriate ioctl for device)"

and

"VIDIOC_G_SELECTION returned -1 (Inappropriate ioctl for device)"

edit: and of course the error from ffmpeg:

"[video4linux2,v4l2 @ 0x7f526c000920] The device does not support the streaming I/O method.
/dev/video0: Function not implemented"


I have verified that the device works and that I can read it by using ffplay file:/dev/video0, or cat /dev/video0 > video.ts. The video seems to play fine at least and even cooperates with the video paramaters I have tried it with.

And ffplay -i /dev/video0 spits out the V4L2 error, thus giving it trouble with a lot of ffmpeg's capabilities.

I know nothing about drivers so I'm at a dead end here, thanks

Last edited by tempo-namee; 09-14-2017 at 05:52 PM.
 
Old 09-15-2017, 10:34 AM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
You have chosen not to tell us what card model you have. All we can do is suggest you inspect the dmesg.
 
Old 09-15-2017, 04:25 PM   #3
tempo-namee
LQ Newbie
 
Registered: Sep 2017
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
You have chosen not to tell us what card model you have. All we can do is suggest you inspect the dmesg.
I have a GeForce GTX 650 Ti. There is nothing from the hdpvr in dmesg.

Sorry, but what does that have to do with this? I have already verified that I can view video from this device. It is only when interacting with the V4L2 drivers (and therefore most of ffmpeg) that it becomes a problem.

Last edited by tempo-namee; 09-15-2017 at 04:27 PM.
 
Old 09-15-2017, 04:58 PM   #4
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
GeForce GTX 650 Ti is not a PVR card. Use a pastebin site to post your dmesg if you have difficulties interpreting its contents.
 
Old 09-15-2017, 05:15 PM   #5
tempo-namee
LQ Newbie
 
Registered: Sep 2017
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
GeForce GTX 650 Ti is not a PVR card. Use a pastebin site to post your dmesg if you have difficulties interpreting its contents.
I'm sorry, I have no idea what you are asking. I know how to read dmesg and there is no message relating to operation of the DVR.

I have a Hauppauge DVR. It is a standalone device and not a capture card in my computer. It has its own fricking kernel module (modinfo hdpvr)... My device is correctly identified by the computer and by V4L2. Again, I can view the raw video stream and record it, but nothing beyond that that requires the V4L2 driver (which is a lot of stuff)

Last edited by tempo-namee; 09-15-2017 at 05:22 PM.
 
Old 09-15-2017, 05:23 PM   #6
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
Hauppauge DVR has PCI ID if it is a PCI device, or USB ID - if it is a USB device. We need to identify the hardware, then we can diagnose how kernel is handling it. If you are unable to provide this information then nobody can help you. For instance here is my device:
Code:
04:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb [14f1:8880] (rev 04)
 
Old 09-15-2017, 05:28 PM   #7
tempo-namee
LQ Newbie
 
Registered: Sep 2017
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Hauppauge DVR has PCI ID if it is a PCI device, or USB ID - if it is a USB device. We need to identify the hardware, then we can diagnose how kernel is handling it.
Here is the output for that device from lsusb -v:

Code:
 Bus 001 Device 006: ID 2040:4902 Hauppauge HD PVR
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x2040 Hauppauge
  idProduct          0x4902 HD PVR
  bcdDevice            0.00
  iManufacturer           1 AMBA
  iProduct                2 Hauppauge HD PVR
  iSerial                 3 00A3AD35
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                4mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered
 
Old 09-15-2017, 05:39 PM   #8
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
Seems to be this device? They have little initialization script there, have you tried it?
 
Old 09-15-2017, 06:10 PM   #9
tempo-namee
LQ Newbie
 
Registered: Sep 2017
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
Yes, I had already run that sample setup script. It doesn't do much besides re-run the kernel module and set some video encoding settings, though.
 
Old 09-16-2017, 10:23 AM   #10
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
Reloading the kernel module should be seen in dmesg, did it load properly?
 
Old 09-16-2017, 01:00 PM   #11
tempo-namee
LQ Newbie
 
Registered: Sep 2017
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Reloading the kernel module should be seen in dmesg, did it load properly?
Yes.. I already set modprobe to load the appropriate drivers at boot anyway. When I run the sample script again this is the confirmation dmesg gives me:

[161017.741057] usbcore: deregistering interface driver hdpvr
[161022.768017] usbcore: registered new interface driver hdpvr

Edit: by the way, I would not have been able to view video from the device if the kernel module weren't properly loaded. I appreciate your help but I am not starting from the complete beginning of troubleshooting. There is either something wrong with the device or the V4L2 driver. It is not a basic thing like whether the USB device is recognized or not

Last edited by tempo-namee; 09-16-2017 at 01:04 PM.
 
Old 09-16-2017, 01:17 PM   #12
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
I'm starting to think there is a module missing/not loaded. Below is a snippet from kernel config, you can see there are special drivers to handle USB video. This is just a snippet, there is much more in Linux kernel. I do not have this hardware to experiment with. You could load a live version of some specialized multimedia distro and see if it can handle it, then compare lsmod output.
Code:
 │      XXX   *** Digital TV USB devices ***                                                                │
 │      XXX   Support for various USB DVB devices                                                           │
 │      XXX     Enable extended debug support for all DVB-USB devices                                       │
 │      XXX     DVB_USB_DIB3000MC                                                                           │
 │      XXX     AVerMedia AverTV DVB-T USB 2.0 (A800)                                                       │
 │      XXX     DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list)               │
 │      XXX       Support faulty USB IDs                                                                    │
 │      XXX     DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list)             │
 │      XXX     DiBcom DiB0700 USB DVB devices (see help for supported devices)                             │
 │      XXX     HanfTek UMT-010 DVB-T USB2.0 support                                                        │
 │      XXX     Conexant USB2.0 hybrid reference design support                                             │
 │      XXX     Uli m920x DVB-T USB2.0 support                                                              │
 │      XXX     Nebula Electronics uDigiTV DVB-T USB2.0 support                                             │
 │      XXX     TwinhanDTV Alpha/MagicBoxII, DNTV tinyUSB2, Beetle USB2.0 support                           │
 │      XXX     TwinhanDTV StarBox and clones DVB-S USB2.0 support                                          │
 │      XXX     GENPIX 8PSK->USB module support                                                             │
 │      XXX     Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support                                            │
 │      XXX     Pinnacle 400e DVB-S USB2.0 support                                                          │
 │      XXX     WideView WT-200U and WT-220U (pen) DVB-T USB2.0 support (Yakumo/Hama/Typhoon/Yuan)          │
 │      XXX     Opera1 DVB-S USB2.0 receiver                                                                │
 │      XXX     Afatech AF9005 DVB-T USB1.1 support                                                         │
 │      XXX       Afatech AF9005 default remote control support                                             │
 │      XXX     Pinnacle PCTV HDTV Pro USB device/TT Connect S2-3600                                        │
 │      XXX     DvbWorld & TeVii DVB-S/S2 USB2.0 support                                                    │
 │      XXX     Terratec CinergyT2/qanu USB 2.0 DVB-T receiver                                              │
 │      XXX     AME DTV-5100 USB2.0 DVB-T support                                                           │
 │      XXX     Friio ISDB-T USB2.0 Receiver support                                                        │
 │      XXX     Azurewave DVB-S/S2 USB2.0 AZ6027 support                                                    │
 │      XXX     Technisat DVB-S/S2 USB2.0 support                                                           │
 │      XXX   Support for various USB DVB devices v2                                                        │
 │      XXX     Afatech AF9015 DVB-T USB2.0 support                                                         │
 │      XXX     Afatech AF9035 DVB-T USB2.0 support                                                         │
 │      XXX     Anysee DVB-T/C USB2.0 support                                                               │
 │      XXX     Alcor Micro AU6610 USB2.0 support                                                           │
 │      XXX     AzureWave 6007 and clones DVB-T/C USB2.0 support                                            │
 │      XXX     Intel CE6230 DVB-T USB2.0 support                                                           │
 │      XXX     E3C EC168 DVB-T USB2.0 support                                                              │
 │      XXX     Genesys Logic GL861 USB2.0 support                                                          │
 │      XXX     LME DM04/QQBOX DVB-S USB2.0 support                                                         │
 │      XXX     MxL111SF DTV USB2.0 support                                                                 │
 │      XXX     Realtek RTL28xxU DVB USB support                                                            │
 │      XXX     DVBSky USB support                                                                          │
 │      XXX     ZyDAS ZD1301                                                                                │
 │      XXX   Technotrend/Hauppauge Nova-USB devices                                                        │
 │      XXX   Technotrend/Hauppauge USB DEC devices                                                         │
 │      XXX   Siano SMS1xxx based MDTV receiver                                                             │
 │      XXX   Technisat/B2C2 Air/Sky/Cable2PC USB                                                           │
 │      XXX     Enable debug for the B2C2 FlexCop drivers                                                   │
 │      XXX   Abilis AS102 DVB receiver                                                                     │
 
Old 09-17-2017, 12:31 PM   #13
tempo-namee
LQ Newbie
 
Registered: Sep 2017
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
There is only one kernel module (hdpvr) mentioned in every documentation for this device. There is only one module needed for V4L2 and it is videodev, which I have already loaded.

Last edited by tempo-namee; 09-17-2017 at 12:35 PM.
 
Old 09-17-2017, 01:49 PM   #14
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
You are not listening. Did you or did you not try with a specialized Linux multimedia distro?
Code:
 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
        Subsystem: Hauppauge computer works Inc. WinTV-quadHD
I have this ^^.
All articles I found about it tell me all I need is cx23885 module. Wrong. When I installed the card it did not work at all. I started experimenting and found out I also need si2157, lgdt3306a, cx2341x, tda18271, m88ds3103, lgdt330x.
 
Old 09-18-2017, 12:47 AM   #15
tempo-namee
LQ Newbie
 
Registered: Sep 2017
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
You are not listening. Did you or did you not try with a specialized Linux multimedia distro?
Well since you insisted, I went out and installed virtualbox and tried two mainstream multimedia linux distros (Ubuntu Studio and AV Linux) and both gave the exact same error and symptoms I described in my above post.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configure iptables to control access to video stream tonj Linux - Software 5 04-27-2015 02:50 PM
'ioctl ()' returns error on IDE access linux1001 Linux - Newbie 1 04-24-2012 09:31 AM
Ffmpeg dazzle v4l2 live stream problem Beastwick987 Linux - Software 0 12-15-2011 12:31 AM
How to forward IOCTL's from i2c-dev.c to adapter driver (i2c-rt3352.c) elonica.pl Linux - Kernel 2 08-23-2011 03:03 AM
v4l2 webcam program: cannot identify /dev/video iochinome Linux - Software 3 05-15-2009 06:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration