[pvrusb2] recent problem: getting frontend status failed
A. F. Cano
afc at shibaya.lonestar.org
Wed Jun 25 16:59:06 CDT 2014
Hi,
More testing to try to figure out what is happening. This time I have an
NTSC analog camera connected to the composite input.
After exiting mythbackend, obviously after the driver or the device had
been placed in a strange state, although mythbackend had not triggered
the I/O error previously reported.
$ v4lctl setnorm ntsc-m
v4l2: open: open(pathname = "/dev/video0", flags = O_RDWR) failed, Input/output error (5, EIO)
vid-open: failed: libv4l
no grabber device available
$ v4lctl setinput 1
v4l2: open: open(pathname = "/dev/video0", flags = O_RDWR) failed, Input/output error (5, EIO)
vid-open: failed: libv4l
no grabber device available
After unplugging and re-plugging the usb cable:
$ v4lctl setnorm ntsc-m
$ v4lctl setinput 1
work fine:
Then,
$ vlc stream:///dev/video0
works fine. The image is displayed in all its analog detail with about
a second lag (from the mpeg encoder I presume). This is what v4l2ctl
reports:
$ v4l2-ctl --all
Driver Info (not using libv4l2):
Driver name : pvrusb2
Card type : OnAir Creator Hybrid USB tuner
Bus info : usb-0000:00:1d.7-1
Driver version: 3.2.57
Capabilities : 0x01070001
Video Capture
Tuner
Audio
Radio
Read/Write
Format Video Capture:
Width/Height : 720/480
Pixel Format : ''
Field : Interlaced
Bytes per Line: 0
Size Image : 32768
Colorspace : Unknown (00000000)
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 0, Height 0
Default : Left 0, Top 0, Width 0, Height 0
Pixel Aspect: 0/0
Video input : 1 (composite: ok)
Audio input : 0 (PVRUSB2 Audio)
Frequency: 980 (61.250000 MHz)
Video Standard = 0x00001000
NTSC-M
Tuner:
Name :
Capabilities : 62.5 kHz multi-standard
Frequency range : 44.0 MHz - 958.0 MHz
Signal strength/AFC : 100%/0
Current audio mode : mono
Available subchannels:
Priority: 2
Then I tried motion:
$ motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.12 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Thread 1 started
[1] cap.driver: "pvrusb2"
[1] cap.card: "OnAir Creator Hybrid USB tuner"
[1] cap.bus_info: "usb-0000:00:1d.7-1"
[1] cap.capabilities=0x01070001
[1] - VIDEO_CAPTURE
[1] - TUNER
[1] - AUDIO
[1] - READWRITE
[1] Config palette index 1 (BA81) doesn't work.
[1] Supported palettes:
[1] 0:
[1] 1: RGB3 (RGB3)
[1] 2: BGR3 (BGR3)
[1] 3: YU12 (YU12)
[1] 4: YV12 (YV12)
[1] Selected palette YU12
[1] VIDIOC_TRY_FMT failed for format YU12: Invalid argument
[1] Unable to find a compatible palette format.
[1] Failed with YUV420P, trying YUV422 palette: Invalid argument
[1] Failed with YUV422, trying YUYV palette: Invalid argument
[1] Failed with YUYV, trying RGB24 palette: Invalid argument
[1] Failed with RGB24, trying GREYSCALE palette: Invalid argument
[1] Failed with all supported palettes - giving up: Invalid argument
[1] Could not fetch initial image from camera
[1] Motion continues using width and height from config file(s)
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
[1] Retrying until successful connection with camera
The block of lines above between:
[1] cap.driver: "pvrusb2"
...
[1] Retrying until successful connection with camera
and the above is then repeated until interrupted:
^C[1] Thread exiting
[0] httpd - Finishing
[0] httpd Closing
[0] httpd thread exit
[0] Motion terminating
It is clear (line 3) that motion recognizes the need and presumably uses
ffmpeg, which is what's needed to decode what comes through /dev/video0,
correct?
What palette do I need? How can I make motion work with this camera?
Is there another setting that needs to be set?
I also tried zoneminder, but the zoneminder console has /dev/video0 in red.
The capture palette is JPEG. There is no MPEG. Does this mean that it is
hopeless to try to use the OnAir Creator and an NTSC camera with zoneminder?
The other palettes supported by zoneminder are: RGB444, RGB555, RGB565,
BGR24, RGB24, BGR32, RGB32, GREY, YUYV, YUV422P, YUV411P, YUV444, YUV410,
YUV420.
Starting zoneminder results in the following: (timestamp removed for better
formatting)
zmc_dvideo0 9158 FAT Video device does not support streaming i/o zm_local_camera.cpp 373
>From the source code of zm_local_camera.cpp, the bit tested is
V4L2_CAP_STREAMING. Does pvrusb2 (or the OnAir Creator) not support this?
Vlc seems to imply the opposite, since it works. I've run vlc for a while now
and restarted it multiple times. Even though the temperature is 84 it has not
caused the original problem that myth causes, so it's not only the temperature.
Since mythzoneminder requires zoneminder to work correctly first, no chance of
getting the former to work without the latter.
So, to summarize: it appears that running myth causes the driver or the OnAir
Creator to go into a not-quite working state after a while. Then, the
/dev/video0 device is not accessible until a re-init (unplug/replug). When
in this state, if myth does some (sequence of?) operations, the I/O error
previously reported happens. This is also solved by an unplug/replug.
Does anyone have other tests I could perform? Any ideas as to what is
happening?
Thanks.
Augustine
More information about the pvrusb2
mailing list