maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Maemo 5] Camera stream from N900 to PC? (N900 as webcam) (https://talk.maemo.org/showthread.php?t=31567)

romanianusa 2009-12-28 17:29

Re: camera stream from n900 to pc
 
Qik works fine for me and it's LIVE and you chat too.

timperi 2009-12-28 17:47

Re: camera stream from n900 to pc
 
This would be a nice app. I would probably be coding something like this at the moment if there was a way for me to develop with QT on my Win7-64bit system (and compile to the device...) But there isn't at the moment, and that makes me a sad boy :)

MADDE is promising, but i couldn't get it to work.

Qik is a nice app, but it lacks the camera settings, which makes it a non-optimal solution.

zehjotkah 2010-02-10 21:37

Re: camera stream from n900 to pc
 
Now I got a little bit further.

The current idea is to use gstreamer on the n900, set up a server on it (to use it also online, not only in a local network) and on the pc-side use VLC to grab the stream.

You can talk to the camera of the N900 via gstreamer, by installing gstreamer-tools
Code:

root
apt-get install gstreamer-tools

and then
Code:

gst-launch v4l2src device=/dev/video1 ! autovideosink
for front facing camera
or
Code:

gst-launch v4l2src device=/dev/video0 ! autovideosink
for back camera.

For streaming I found this article: http://doit.juii.net/meta/englisch/588
so using VLC on the other end would be the best. No server needed for local network streaming...
Stay tuned, or jump in if you want to help to provide a easy-to-use solution to use the n900 as a webcam.

nikrohr 2010-02-24 16:42

Re: camera stream from n900 to pc
 
how do i set up vlc? port & protocol?

rikisky 2010-03-08 02:26

Re: camera stream from n900 to pc
 
this is gonna be great when done : ) love the idea of streaming from an online server, reminded me of american pie :P

m2cm2c 2010-03-13 16:52

Re: camera stream from n900 to pc
 
I got it to work by doing this:

on the phone
Code:

gst-launch v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! smokeenc ! udpsink host=192.168.1.255 port=1234

on my computer
Code:

gst-launch udpsrc port=1234 ! smokedec ! autovideosink
now with mencoder I think we'll be able to set that stream as a virtual video device on the desktop :D

zehjotkah 2010-03-14 09:41

Re: camera stream from n900 to pc
 
Quote:

Originally Posted by m2cm2c (Post 566136)
I got it to work by doing this:

on the phone
Code:

gst-launch v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! smokeenc ! udpsink host=192.168.1.255 port=1234

on my computer
Code:

gst-launch udpsrc port=1234 ! smokedec ! autovideosink
now with mencoder I think we'll be able to set that stream as a virtual video device on the desktop :D

you're tha man!!
it works really well in linux!
of course one have to replace the ip-address with the one of the own PC.
you can also change the resolution.
i've tried it with windows gstreamer but no luck so far. i would have packed it then in a nice .exe package (just a batch file)
thanks you again!
i think we can bring that to a nice multi operating system camera streaming thingi ;)

pgv1982 2010-03-23 12:26

Re: camera stream from n900 to pc
 
Hello every body.

I made to short scripts on bash in order to make the streaming easyer:

First on the N900 with root privileges

touch /usr/local/bin/stream-gst
chmod +x /usr/local/stream-gst
vi /usr/local/bin/stream-gst

and there write (remeber to press "i" to edit and when you finish press ESC and then "x:" + ENTER ):

Code:

#!/bin/sh

gst-launch v4l2src device=/dev/video$1 ! videoscale! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! ffmpegcolorspace ! jpegenc ! tcpserversink host=$2 port=5000

After that run the script:

stream-gst 1 192.168.1.101

In this example you are transmiting from the /dev/video1 (Front Camera) to the computer 192.168.1.101
or
You can also steam from the back camera to all the computers on your network by:

stream-gst 0 192.168.1.255


Then on the PC (with linux and root privileges)

touch /usr/local/bin/get-gst
chmod +x /usr/local/get-gst
vi /usr/local/bin/get-gs

and there write (remeber to press "i" to edit and when you finish press ESC and then "x:" + ENTER ):

Code:

#!/bin/sh

gst-launch tcpclientsrc host=$1 port=5000 ! jpegdec ! autovideosink

And the runing the script specifiing the IP of your N900

get-gst 192.168.1.102

It also work on the other way and direction. To see the web cam on yor PC form your N900.

See you!

Patricio
Pd: Sorry for my english

zehjotkah 2010-03-23 12:41

Re: camera stream from n900 to pc
 
Thanks!
I'm still trying to get it work for windows users.
On Linux it works great (used the previous posted way..)

stobbsc 2010-03-29 13:55

Re: camera stream from n900 to pc
 
When this starts working for windows I can see it being a big hit. I woudl donate for the work on this :-)


All times are GMT. The time now is 18:58.

vBulletin® Version 3.8.8