bluecherrydvr / solo6x10

Bluecherry solo6x10 repo
23 stars 10 forks source link

random device or resource busy #52

Closed luogni closed 11 years ago

luogni commented 11 years ago

Same system as #51 (I don't know if it's related or not). When i load the module and try recording from 16 inputs i get 15 inputs ok and 1 fails with: root:~# bc-record /dev/video9 file.mkv ... Failure in dqbuf Failure in dqbuf ... root:~# cat /dev/video9 > asd cat: /dev/video9: Device or resource busy

If i reboot i get the same error but on another device, don't know why. I'm using the driver in PAL mode and recording 704x576@25/3 FPS.

luogni commented 11 years ago

Sometime it happens to more than a single device at the same time.

curtishall commented 11 years ago

To confirm, you are trying to pull 16 inputs @ 25FPS @ 704x576?

'Device or resource busy' usually indicates the device is already open (another process running on that encoder) and is returning EBUSY. If it happens again try running this:

sudo lsof | grep /dev/video[port]

Also run ps aux |grep bc-record to make sure another process isn't accidently left running.

We need to figure out why that is happening.

luogni commented 11 years ago

No, i'm setting the framerate for each channel to 25/3 (8.333FPS). Now i'm running with 25/4 and i've not seen the problem again. Should 25/3 work fine?

curtishall commented 11 years ago

Any interval between 1 and 15 should work fine. As you have figured out (it is not well documented) 30/interval == fps (NTSC) or 25/interval == fps (PAL).

We will look into this a bit later this week, thanks for the report!

alexxxwork commented 11 years ago

The function that set fps parameters is written so that it returns -EBUSY when the chipset bandwith is exceeded. So this is not a bug but a feature (or maybe lack of detailed error reporting).

luogni commented 11 years ago

Yes i got it after some tries, just some comments:

ismaell commented 11 years ago

v4l2-ctl works now.

luogni commented 11 years ago

How?

root@ay5:~# v4l2-ctl --set-parm=10 -d /dev/video1 Frame rate set to 2.000 fps root@ay5:~# v4l2-ctl --set-parm=5 -d /dev/video1 Frame rate set to 2.000 fps root@ay5:~# v4l2-ctl --set-parm=5/1 -d /dev/video1 Frame rate set to 2.000 fps root@ay5:~# v4l2-ctl --set-parm=1/1 -d /dev/video1 Frame rate set to 2.000 fps root@ay5:~# v4l2-ctl --set-parm=17/1 -d /dev/video1 Frame rate set to 2.000 fps

alexxxwork commented 11 years ago

Featured code isn't in git tree for now. Ismaell emailed it to me in a patch

alexxxwork commented 11 years ago

Should I make a new pull request? Or it's better to wait for 2.4.6? There was a feature request for mjpg jpeg quality settings. Is it possible to implement?