BeagleBone as video server with mjpg-streamer under ubuntu 1210
After installing PyBBIO correctly on beaglebone A6A, I came back for adding video service on beaglebone.
I have tried "Motion" before, it was working on beagleboard xM with pretty good frame per second. But when I tried motion on beaglebone, the program looks running,no error message, but the video was never shown on the client side.
After googling, it seems mjpg-streamer is a good solution wildly applied on beaglebone.
Here is a good web page detailing the steps.
http://shrkey.com/installing-mjpg-streamer-on-beaglebone-black/
Above example use beaglebone black and 1310, I tried on beaglebone white with ubuntu 1210
1st step is to install libraries:
sudo apt-get install g++ curl pkg-config libv4l-dev libjpeg-dev build-essential libssl-dev vim cmake sudo apt-get install imagemagick
2nd step: down load mjpg-streamer
wget https://github.com/shrkey/mjpg-streamer/raw/master/mjpg-streamer.tar.gz
3rd step: untar it into it's floder:
tar -xvf ./mjpg-streamer.tar.gz
4th step: compile and install it
cd mjpg-streamer make sudo make install
svnversion is not found, but it does not matter.
the installation is completed, time to run a test, I'm using logitech C150, you may see different out come on the terminal:
$ sudo ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w ./www"
MJPG Streamer Version: svn rev:
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Adding control for Pan (relative)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Tilt (relative)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Pan Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Tilt Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Pan/tilt Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Focus (absolute)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
mapping control for Pan (relative)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Tilt (relative)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Pan Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Tilt Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Pan/tilt Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Focus (absolute)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for LED1 Mode
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for LED1 Frequency
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Disable video processing
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Raw bits per pixel
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
o: www-folder-path...: ./www/
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
the server is running and the prompt is not returned.
open the web server with the IP address of your beaglebone at port 8080, great! a server come out.
there are static image or streaming, I tested with my chrome on PC and on mobile, both works with good frame per second in local wifi network.
Since it's web base, browser has great influence, I also tested with ipad, chrome on ipad can't show stream, but with javascript, it shows correctly the streaming. Safari work nice.
I have tried "Motion" before, it was working on beagleboard xM with pretty good frame per second. But when I tried motion on beaglebone, the program looks running,no error message, but the video was never shown on the client side.
After googling, it seems mjpg-streamer is a good solution wildly applied on beaglebone.
Here is a good web page detailing the steps.
http://shrkey.com/installing-mjpg-streamer-on-beaglebone-black/
Above example use beaglebone black and 1310, I tried on beaglebone white with ubuntu 1210
1st step is to install libraries:
sudo apt-get install g++ curl pkg-config libv4l-dev libjpeg-dev build-essential libssl-dev vim cmake sudo apt-get install imagemagick
2nd step: down load mjpg-streamer
wget https://github.com/shrkey/mjpg-streamer/raw/master/mjpg-streamer.tar.gz
3rd step: untar it into it's floder:
tar -xvf ./mjpg-streamer.tar.gz
4th step: compile and install it
cd mjpg-streamer make sudo make install
svnversion is not found, but it does not matter.
the installation is completed, time to run a test, I'm using logitech C150, you may see different out come on the terminal:
$ sudo ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w ./www"
MJPG Streamer Version: svn rev:
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Adding control for Pan (relative)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Tilt (relative)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Pan Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Tilt Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Pan/tilt Reset
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
Adding control for Focus (absolute)
UVCIOC_CTRL_ADD - Error: Inappropriate ioctl for device
mapping control for Pan (relative)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Tilt (relative)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Pan Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Tilt Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Pan/tilt Reset
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Focus (absolute)
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for LED1 Mode
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for LED1 Frequency
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Disable video processing
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
mapping control for Raw bits per pixel
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
o: www-folder-path...: ./www/
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
the server is running and the prompt is not returned.
open the web server with the IP address of your beaglebone at port 8080, great! a server come out.
there are static image or streaming, I tested with my chrome on PC and on mobile, both works with good frame per second in local wifi network.
Since it's web base, browser has great influence, I also tested with ipad, chrome on ipad can't show stream, but with javascript, it shows correctly the streaming. Safari work nice.
留言
張貼留言