[iConnect] Almost done - Wireless Video Streaming

Install Arch Linux ARM on other devices.

[iConnect] Almost done - Wireless Video Streaming

Postby Conn » Tue Apr 10, 2012 5:48 pm

Hello everyone,

I'm halfway doing what I was planning to make : A wireless video streaming indoor robot :geek: . I wanted to inform beginners about what I've done so far and how I did it work my way. I'm not a guru and I just used what great people have made available for us.

My configuration is as follows :
    - Feroceon 88FR131 rev. 1. ARMv5TE cr=00053977 with 256MB RAM
    - Genesys Logic, Inc. USB 2.0 IDE Adapter (GL811E)
    - Fujitsu 2,5" IDE HDD
    - Nam Tai E&E Products Ltd. (OmniVision Sony Playstation Eye)
    - 3.1.10-4-Arch


This setup is working flawlessly... I invoke wireless with :
$this->bbcode_second_pass_code('', 'wicd
ifconfig wlan0 up
netcfg wireless-wpa ')

but I don't know how to make everything work automatically during boot up yet.

I used ffmpeg to start streaming and it works OK :
$this->bbcode_second_pass_code('', 'ffserver -f /etc/ffserver.conf & ffmpeg -v 2 -r 5 -s 640x480 -f video4linux2 -i /dev/video0 http://localhost:8090/webcam.ffm ')

I installed Python 2.0 and used serial communications module pySerial to talk to my Arduino board as follows (cMsg is sensor output from Arduino, cCmd is command I tell the robot what to do, just an example of simple commands):
$this->bbcode_second_pass_code('', '>>> import serial
>>> ser = serial.Serial('/dev/ttyACM0', 9600)
>>> cMsg = ser.readline()
>>> ser.write(cCmd)
')

I just wanted to contribute a small amount to this great community.

Cheers,
Conn
Conn
 
Posts: 27
Joined: Sat Mar 10, 2012 7:34 pm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby Conn » Tue Apr 10, 2012 6:30 pm

Now to my question :

Does anyone know what to use and how to use it as a "Video Streaming Server"? ffmpeg works allright, but it is so slow it is not a video, just some frames every now and then. I tried to stream smaller videos (like 320x240) but it's the same, even when I work on the same wired 100Mb hub.

I want to stream 2 videos (stereo) or one video with 2 cam images by using a USB converter.

Please suggest...

Conn
Conn
 
Posts: 27
Joined: Sat Mar 10, 2012 7:34 pm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby kmihelich » Tue Apr 10, 2012 6:49 pm

If you stream the raw data, you should be fine at lower resolutions, limited by USB/network. If any transformations on the captured data are taking place in software, it's simply not going to work on a plug computer. The processor lacks a floating point unit (FPU) to handle the video transformations you're requesting of it, hence just getting single frames every so often.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby Conn » Tue Apr 10, 2012 7:08 pm

I believe there should be some way to get 15fps at 640x480 video with a 1GHz computer. If there isn't, it defies my purpose of using iConnect. Have you tried to solve the problem with another plug computer?

Conn
Conn
 
Posts: 27
Joined: Sat Mar 10, 2012 7:34 pm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby kmihelich » Tue Apr 10, 2012 7:17 pm

When you think of a 1GHz computer, don't compare 1GHz of x86 to 1GHz of ARM, they are two very different beasts. Clock speed comparisons are irrelevant across architectures anyway. In this particular instance, it's not clock speed that is the issue, it's the lack of an FPU as I mentioned. x86 processors have had them basically forever, and with ARM it's a matter of implementation. There is no hardware capability to handle floating point values, which is what are being used in video transformations. Basically, each value needs to be converted into integer representations, integer operations performed, then transformed back into floating point. This is an expensive operation.

An ARMv7 platform like the Beagleboard can process multimedia natively, and quite efficiently, since there is an FPU in the processor to handle floating point values and permutations on them.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby Conn » Tue Apr 10, 2012 7:24 pm

BeagleBoard seems fine but pretty expensive in my city. I bought a few iConnects for as low as $60 each while I found a BeagleBoard XM for $275!!! I can buy a double core Atom board with 4GB ram and everything!

Form my POV iConnect and BeagleBoard are almost the same (well not exactly). What do you suggest using then? Will a Raspberry Pi do the job? Maybe we can do smth (something) to stream video in a different way?

Regards,
Conn
Last edited by WarheadsSE on Tue Apr 10, 2012 7:51 pm, edited 1 time in total.
Reason: notating believed meaning of apparent
Conn
 
Posts: 27
Joined: Sat Mar 10, 2012 7:34 pm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby kmihelich » Tue Apr 10, 2012 7:29 pm

the iConnect and Beagleboard might *look* similar but under the hood they are entirely different. The iConnect is a Marvell Kirkwood 1.2GHz armv5tel, the Beagle is a TI OMAP3 1GHz armv7l with vfpv3+NEON FPUs. Two wholly different classes, and the OMAP absolutely crushes the Kirkwood in performance.

The RPi could likely handle it with a rebuild of ffmpeg, and any auxiliary libraries.

Like I said, if you work on just the raw stream data, effectively piping it from the camera to the network, that should work. Also, there are quite a few software packages out there dealing specifically with webcam stuff.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby Philoo » Tue Apr 10, 2012 9:46 pm

$this->bbcode_second_pass_quote('', 'w')icd
ifconfig wlan0 up
netcfg wireless-wpa
but I don't know how to make everything work automatically during boot up yet.


in /etc/rc.conf add dbus and wicd in the DAEMONS array (towards the end)

when you configure your wireless network (I'm guessing using wicd-curses) make sure to check the "automatically connect to this network" option

more details here :https://wiki.archlinux.org/index.php/Wicd

as to why you get only a few frame here and there it can come from a vast array of reasons:
- wifi perf (try over a wired connection if it still happens)
- usb compatibility. some webcams default to usb 1.1 and its slugish speed which in this case would gravely impair everyhting related to disk IO as well. try with a different model of webcam
- some webcam provide the frame already compressed, v4l2 uncompresses it to provide it to ffmpeg who recompresses it. same as above try a different webcam
- lack of hardware support for floating point . I had a mind to do opencv on my iconnect, but opencv is heavy on floating point (thanks intel guys), it is quite common for codec to use FP.
- usb saturation between webcan traffic and disk IO. I so wish IOMEGA had exposed sata on their pcb

my own project uses motion at 5 fps using mpeg. I get choppy video streams due to a combination of wifi performance and usb usage.

HTH
Philoo
 
Posts: 102
Joined: Wed Aug 10, 2011 9:20 pm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby Conn » Wed Apr 11, 2012 5:17 am

Thank you guys... I'll work on video streaming some more. I'll get back to you when I have some improvements.

Conn
Conn
 
Posts: 27
Joined: Sat Mar 10, 2012 7:34 pm

Re: [iConnect] Almost done - Wireless Video Streaming

Postby Philoo » Thu Apr 12, 2012 1:15 am

BTW you DO know that the iconnect has a few GPIO accessible though some soldering and identification is needed http://www.flickr.com/photos/52072764@N02/6351388468/in/photostream

I can't find the page but a polish guy managed to use these to jtag and restore a badly damaged iconnect.
Philoo
 
Posts: 102
Joined: Wed Aug 10, 2011 9:20 pm

Next

Return to [Please read announcement] Community-Supported Devices

Who is online

Users browsing this forum: No registered users and 6 guests