LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Turn on Webcam from Bash or Python (https://www.linuxquestions.org/questions/programming-9/turn-on-webcam-from-bash-or-python-4175603935/)

faruk.c 04-17-2017 02:29 PM

Quote:

Originally Posted by Xeratul (Post 5698170)
"(Scheme function)" shall be replaced by " xterm -e 'pkill mplayer ; mplayer -fs -zoom -tv device=/dev/video0 tv://' "

But, " xterm -e 'pkill mplayer ; mplayer -fs -zoom -tv device=/dev/video0 tv://' " command isn't working for me.

Xeratul 04-17-2017 02:35 PM

Quote:

Originally Posted by faruk.c (Post 5698194)
But, " xterm -e 'pkill mplayer ; mplayer -fs -zoom -tv device=/dev/video0 tv://' " command isn't working for me.

try:

xterm -e mplayer -fs -zoom -tv device=/dev/video0 tv://

do you have even /dev/video0 available with ls (list file) ?

faruk.c 04-18-2017 04:54 AM

Quote:

Originally Posted by Xeratul (Post 5698198)
try:

xterm -e mplayer -fs -zoom -tv device=/dev/video0 tv://

do you have even /dev/video0 available with ls (list file) ?

Thanks for reply again, I checked /dev/ folder. In normally, there isn't "video0" in /dev/ folder; after pressing "FN+F6", yes there is "video0" in /dev" folder.

I run command which above, just open xterm with this message: "Can't execvp mplayer: No such file or directory."

I guess, FN key is a switch for on/off and hardware related.

NevemTeve 04-18-2017 04:55 AM

> I guess, FN key is a switch for on/off and hardware related.

Yes, so it is.

faruk.c 04-18-2017 05:46 AM

Hi everyone,

I found how works FN+F6 for me. This key is hardware related for switching on/off device. I tested it these steps:

1. I pressed FN+F6 and turned on webcam.
2. Restart computer.
3. Try open webcam and yes, webcam opened.

My goal was open webcam at the beginning and I made it. :)

Thanks too much to everyone!

astrogeek 04-18-2017 12:03 PM

Glad you figured it out, and thank your for posting your solution which helps everyone!

If this thread is resolved, please use the Thread Tools options at top of the first post to mark it as solved.

Good luck!


All times are GMT -5. The time now is 08:06 AM.