[mythtv-users] /dev/video0 and /dev/video1 occasionally swapped on reboot: udev rule needed?

James Miller gajs-f0el at dea.spamcon.org
Mon Mar 2 14:51:28 UTC 2009


Hello. I've got 2 capture cards in my Mythbox: 1) a Internext Compression 
Inc iTVC16 [CX23416] MPEG-2 Encoder, and 2) a Brooktree Corporation Bt878 
Video Capture. I've posted to the list previously asking how I might the 
system capture most recordings through the better card (card # 1). The 
resolution suggested was to set up the better card first in mythsetup, 
which I did. Well, that worked fine until I needed to reboot. You see, the 
system does not consistently assign the device file to each card on every 
boot: sometimes card # 1 ends up as /dev/video0, other times it ends up as 
/dev/video1. Each time this happens I need to go through mythsetup again 
since the cards cease to record at all (card # 1 is trying to use v4l to 
transcode, which is actually what card # 2 needs to use, and vice versa). 
I'm pretty sure what I need to do to make the system consistently assign 
device files to each card is to create a udev rule--is that correct?

I do have some experience with udev rules and have created them before. My 
problem is that I am a computer hobbyist and I don't get involved in these 
technical operations often enough that I can remember in detail, from one 
instance to the next, how this sort of thing is done. I'm hoping I might 
get some pointers from other list subscribers on creating the udev rules I 
need. I did find some information on setting up udev rules under Myth at 
http://www.mythtv.org/wiki/Device_Filenames_and_udev , but an initial 
perusal of that article does not leave me with much confidence about 
exactly what the udev rules need to look like in my case. Nor does it 
indicate what the udev rule should be called--while I recall from 
grappling with udev rules previously that the naming was important (the 
system implements the rules in order according to the rule name, if memory 
serves).

Can I ask for input on creating the udev rules I will need in order for 
the device files representing my capture cards get assigned consistently 
each time I boot the system? TIA.

James

PS This system actually has one of the Myth distros installed on 
it--Mythbuntu--in case that's relevant (I think it is with regard to the 
location of udev rules).


More information about the mythtv-users mailing list