Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > 3rd Party Projects > Projects > Mythbuntu
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Mythbuntu
Discussions for the Mythbuntu project.

 
Thread Tools Display Modes
Old April 12th, 2008   #1
Freddie
A Carafe of Ubuntu
 
Join Date: Aug 2005
Beans: 107
Make /dev/video* Static

I have a PVR-150 and a Nova-T. Both of those export something to /dev/video. However, I am only interested in the PVR-150. Problem is that this changes seemingly random at boot-up.

How can I fix this?

Regards, Freddie.
Freddie is offline   Reply With Quote
Old April 12th, 2008   #2
KillerKiwi
Gee! These Aren't Roasted!
 
KillerKiwi's Avatar
 
Join Date: Jun 2005
Beans: 187
Re: Make /dev/video* Static

You need to create a udev rule, this will make a symlink that is always pointed to the correct device

You can use the attahed script to do it for you

syntax

sudo python udev-rules.py CURRENT_DEV SYMLINK

or

sudo python udev-rules.py /dev/video0 /dev/video_pvr150
sudo python udev-rules.py /dev/video1 /dev/video_novaT
Attached Files
File Type: py udev-rules.py (3.0 KB, 116 views)
KillerKiwi is offline   Reply With Quote
Old April 18th, 2008   #3
Freddie
A Carafe of Ubuntu
 
Join Date: Aug 2005
Beans: 107
Re: Make /dev/video* Static

Quote:
Originally Posted by KillerKiwi View Post
You need to create a udev rule, this will make a symlink that is always pointed to the correct device

You can use the attahed script to do it for you

syntax

sudo python udev-rules.py CURRENT_DEV SYMLINK

or

sudo python udev-rules.py /dev/video0 /dev/video_pvr150
sudo python udev-rules.py /dev/video1 /dev/video_novaT
Thank you! That worked an absolute treat.

Regards, Freddie.
Freddie is offline   Reply With Quote
Old March 26th, 2009   #4
mo-hog
First Cup of Ubuntu
 
Join Date: Mar 2009
Beans: 2
Re: Make /dev/video* Static

KillerKiwi (great to see another Kiwi around!)

I just used your script and it was exactly what I needed to fix this:
https://answers.launchpad.net/ubuntu...n/65286/+index

This is an excellent little script for this task. It would be great if you could clarify the license (add a GPLv3 header into the script, perhaps?) and post it somewhere that doesn't require a login to get to. Perhaps you could add a short page to the Ubuntu wiki and add the file there. I am happy to put it on my site if you have nowhere else. It would mean that mailing lists and "Answers" can link directly to the script and not require people (like me) to get an ubuntuforums login to solve the udev problem. At the moment, viewing ubuntuforums attachments requires a login.

Thanks again!!
mo-hog is offline   Reply With Quote
Old April 12th, 2009   #5
KillerKiwi
Gee! These Aren't Roasted!
 
KillerKiwi's Avatar
 
Join Date: Jun 2005
Beans: 187
Re: Make /dev/video* Static

consider it gpl2

hopefully the need for this will disappear soon...
KillerKiwi is offline   Reply With Quote
Old April 14th, 2009   #6
kees
Ubuntu Developer
 
kees's Avatar
 
Join Date: Nov 2006
Location: Portland, OR, USA
Beans: 4
Ubuntu Karmic Koala (testing)
Re: Make /dev/video* Static

MythTV should be taught to use the static device names in /dev/v4l/by-path/* (which exist starting in Intrepid). That's how static naming is being solved.
kees is offline   Reply With Quote
Old May 2nd, 2009   #7
mo-hog
First Cup of Ubuntu
 
Join Date: Mar 2009
Beans: 2
Re: Make /dev/video* Static

I agree - MythTV should be changed to support /dev/v4l/by-paths - I've filed a bug here:
https://bugs.launchpad.net/ubuntu/+s...ta/+bug/370696

The python script did not work in Jaunty because "udevinfo" is no longer supported. I have updated the script to work with udevadm instead, which is the new way to access udevinfo.

I have also added a GPLv2 header to the file (though I don't know your name, so only put KillerKiwi!) and made it available through the launchpad bug above as well. I hope you don't mind.
Attached Files
File Type: py udev-rules-jaunty.py (3.9 KB, 47 views)
mo-hog is offline   Reply With Quote
Old May 3rd, 2009   #8
KillerKiwi
Gee! These Aren't Roasted!
 
KillerKiwi's Avatar
 
Join Date: Jun 2005
Beans: 187
Re: Make /dev/video* Static

cool, thanks for updating the script will be handy when I update
KillerKiwi is offline   Reply With Quote
Old September 21st, 2009   #9
Tim L
5 Cups of Ubuntu
 
Join Date: Oct 2007
Beans: 16
Re: Make /dev/video* Static

This looks exactly like what I need to solve my problem – I have downloaded the python script – but do not know what to do with it – where do I put it – how do I get it to work – at what stage do I install it? Can someone point be in the right direction. Sorry to ask such basic questions.
Tim L is offline   Reply With Quote
Old September 21st, 2009   #10
KillerKiwi
Gee! These Aren't Roasted!
 
KillerKiwi's Avatar
 
Join Date: Jun 2005
Beans: 187
Re: Make /dev/video* Static

ok

When your system starts it assigns all video devices (webcams, capture cards etc) to a node like below
  • /dev/video0
  • /dev/video1
  • /dev/video2
  • etc
The issue is video0, video1 and video2 may swap which device it points to on boot

Now the script can create a permanent node that ALWAYS points to the correct device.

So you run a line like below for your video devices (replace PVR150 with a name for the device)
Code:
sudo python udev-rules-jaunty.py /dev/video0 /dev/video_PVR150
You can then update myth backend to point to /dev/video_PVR150 (or what ever you called it) instead of /dev/video0

Problem solved

There is a fix to this coming, but until then...
KillerKiwi is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:37 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry