I want to take a snapshot from my logitech webcam with desired resolution and save the image by using linux bash script. I need to do it on my beagleboard with Angstrom image. In my beagleboard i can capture with using cheese. But i dont know how to capture in terminal with script.
In my host computer i am using streamer with
streamer -c /dev/video0 -b 16 -o outfile.jpeg
But i dont know how to take snapshots in Angstrom. Can you make suggestions?
How can i capture with command line?
Regards
I've used mjpg-streamer with some success. It sends a video stream through port 8080, although you can change that by editing the startup script.
I used instructions from here, although I skipped the make install part and just run it off my home directory. Worked both with the default Angstrom image and with Debian running off the SD card (i.e., non-flashed).
You can view the stream by pointing your browser (either local or over-the-LAN) to http://beagle.address:8080/?action=x, where x is stream or snapshot. I trust those parameters are self-explanatory :).
You can use a text-based browser such as links to open the URL, and links will then prompt you for the filename of the image. That's for testing, then I suppose you can find a way to save the snapshot without human intervention if you intend to use it from a script.
I'm using gstreamer to capture webcam input on Beaglebone using a logitech webcam. You'll need gstreamer with gstreamer-utils installed. I'm using Ubuntu and they can be found from the standard repos. Here's the CLI command:
gst-launch v4l2src num-buffers=1 ! ffmpegcolorspace ! video/x-raw-yuv,width=320,height=240 ! jpegenc ! filesink location=test.jpg
Unfortunately, I'm experiencing some issues after some images as the pipeline freezes on v4l2src. Maybe you'll have better luck with your setup.
Related
I've used xampp (lampp) to run an Apache2 server out of my Intel ComputeStick with Ubuntu 18.04.1 installed. I've written a .cgi script with perl:
#!/usr/bin/env perl
use strict;
use warnings;
use CGI;
print CGI::header();
system("vlc /home/jack/Desktop/ayni1.mp4");
However, when I hop onto my laptop (Win10) and use Chrome to visit http://12.345.678.90:80/dashboard/perl/ayni1.cgi (That's my server, and that directory does exist), nothing happens on the hosting machine. In the browser, this line is displayed:
VLC media player 3.0.3 Vetinari Command Line Interface initialized. Type `help' for help. > Shutting down.
I'm afraid I don't quite understand what's happening. I thought cgi scripts interacted directly with the command line; i.e. they could issue commands to Terminal directly. Was I mistaken in that? What am I doing wrong?
Sorry, I know this question is somewhat scattered. If needed, I'll try to provide clarification as best I can.
I'm somewhat new to all of this.
I think you have set VLC to open a command line interface automatically.
Reset the VLC preferences and it should work normally again.
I have installed motion, in pi3. connected pi camera. configured motion.conf according to my needs(pi/motion/)and started motion. still i am not able to see the pics created. any additional steps needed to configure this. steps in detail.
1.Connected raspi cam
2.Installed motion.
3.raspistill command worked.
4.edited motion.conf
started motion "sudo service motion start"
Later,Found that we need to create /dev/video0, so executed
sudo modprobe bcm2835-v4l2
Added below to etc/modules
/#camera with
v4l2 driver bcm2835-v4l2
After this also its not working any idea, where/what to check next?
Make sure motion is using motion.conf. It's something very stupid but I remember struggling with it because if you don't tell the program to look at /etc/motion/motion.conf it will try to find motion.conf in your current folder.
So you may want to specify the conf location with :
motion -c /path/to/motion.conf
I like to listen to one particular radio and I have made myself a little launcher using vlc that is simply like this :
#!/bin/sh
vlc http://mp3lg.tdf-cdn.com/fip/all/fiphautdebit.mp3
What I would like to do is to have this instance of vlc - I have allowed multiple instances in vlc preferences, immediatly hidden from my desktop. I would like it to run in the 'background'.
How could I achieve this ? I tried to add >/dev/null at the end but without success.
I am on Mint 17 Rebecca, and I am trying this both for fun and because RadioTray and GreatLittleRadioPlayer don't work on my system and I haven't been able to find someone with the same issue on the web.
Thanks
Default VLC depends on X, therefore cannot be run headless. You will need to install vlc-nox to run a headless vlc in the background.
Source: What is vlc-nox?
I'm creating an application (command line script) to play videos directly to the secondary monitor, which is connected either via VGA or HDMI.
The video player itself is cvlc, with command cvlc -f myvideo.avi.
Can anyone please help about the script to run the cvlc directly to secondary monitor regardless of which monitor it was launched from.
i've tried DISPLAY=":0.1" vlc -f myvideo.avi, but results a scrambled unusable video player.
Thanks.
Try using the --x11-display :0.1 flag. It's not part of the --help output but I use it on my 2.0.1 vlc.
i want to make my own haar classifier for detection of hand, so i was following the toutorial given at
Naotoshi Seo. In this tutorial various linux command are used and i don't have linux.
some command are:
$ find [image dir] -name '*.[image ext]' > [description file]
$ createsamples -info samples.dat -vec samples.vec -w 20 -h 20
so how can i use these command on my windows
The "find" command creates a text file with the names of your image files. You can do that by hand if you want.
The second one is not a standard Linux command, but, I assume, one of the tools you need to create the classifier. If you want to use Windows you will have to download the Windows version of the tools in that tutorial. He uses Cygwin so you will need to install that as well.
Another option is to download the Ubuntu Live distribution and install it on a USB memory stick. You can then boot from the USB stick, create your classifier in Linux, then go beck to Widows when you're done.