maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Webcam N900 (gstreamer issues) (https://talk.maemo.org/showthread.php?t=46046)

shadow12 2010-02-27 16:22

Webcam N900 (gstreamer issues)
 
Ok so I installed gstreamer-tools and after a bit of messing I managed to get the N900 to stream to my ubuntu desktop using the following:

-- Server (N900) --
gst-launch v4l2src device=/dev/video0 ! videoscale! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! jpegenc ! multipartmux ! tcpserversink host=192.168.0.3 port=5000

-- Client (PC) --
gst-launch tcpclientsrc host=192.168.0.5 port=5000 ! multipartdemux ! jpegdec ! autovideosink

It works but I am now trying to get it to play nice with VLC.
I have had a look at :
1
and
2

But the encoder used, hantro4200enc, I do not have. Does any one know of a possible solution to stream to VLC?

shadow12 2010-02-27 17:04

Re: Webcam N900 (gstreamer issues)
 
Nevermind found this:

Streaming N900 VLC

pgv1982 2010-03-23 12:34

Re: Webcam N900 (gstreamer issues)
 
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:
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:
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

danx 2010-03-23 17:03

Re: Webcam N900 (gstreamer issues)
 
CAN YOU PACKAGE THAT .lol

nihilum 2010-04-06 02:09

Re: Webcam N900 (gstreamer issues)
 
If anyone has problems with the front camera not working, the front camera didn't work for me until I removed the ',framerate=30/1' part.

torpedo48 2010-09-16 17:18

Re: Webcam N900 (gstreamer issues)
 
Hi everyone,

could any very gentle person out there explain me how to stream this damn camera to my PC? It seems that none of the procedure explained here works for me.

Why the hell it says "no element "multipartmux""??? Where can I find that one?

I'm a very noob in these kind of things, so please be patient with me.

Thanks for reading, I really need that thing (for my job) so any help would be appreciated.

kureyon 2010-09-17 07:21

Re: Webcam N900 (gstreamer issues)
 
Quote:

Originally Posted by torpedo48 (Post 818071)
Why the hell it says "no element "multipartmux""??? Where can I find that one?

Here, sort of. You need to install it via your distro app management thingy. If in doubt install all the gstreamer plugins.

Renkon 2010-09-17 09:19

Re: Webcam N900 (gstreamer issues)
 
@torpedo48:

This will work and is tested with VLC:

On your N900 execute the following command:
Code:

gst-launch-0.10 v4l2src device=/dev/video1 ! dsph264enc ! rtph264pay ! udpsink host=xxx.xxx.xxx.xxx port=5434
(where xxx.xxx.xxx.xxx is the IP address of your computer and /dev/video1 is the front camera; video0 is back camera)

Note that this is v4l2src with an lowercase L, NOT 412

On your computer create the following .txt file:
Code:

v=0
m=video 5434 RTP/AVP 96
c=IN IP4 xxx.xxx.xxx.xxx
a=rtpmap:96 H264/90000

(where xxx.xxx.xxx is the IP address of your N900)

Rename the file to some_cool_name_for_streaming.sdp and open it with VideoLAN player for greater justice.

Try looking for the other posts to add additional parameters to gstreamer. This is video only, additional audio is also available, but not used by me so I can't say anything to that.

Best regards,
/me

PS: Your N900 could get heated up and will drain battery somewhat fast, so if you intend to use this longer, please attach the charger.

brambi 2010-10-17 15:26

Re: Webcam N900 (gstreamer issues)
 
Quote:

Originally Posted by Renkon (Post 818754)
@torpedo48:

This will work and is tested with VLC:

On your N900 execute the following command:
Code:

gst-launch-0.10 v4l2src device=/dev/video1 ! dsph264enc ! rtph264pay ! udpsink host=xxx.xxx.xxx.xxx port=5434
(where xxx.xxx.xxx.xxx is the IP address of your computer and /dev/video1 is the front camera; video0 is back camera)

Note that this is v4l2src with an lowercase L, NOT 412

On your computer create the following .txt file:
Code:

v=0
m=video 5434 RTP/AVP 96
c=IN IP4 xxx.xxx.xxx.xxx
a=rtpmap:96 H264/90000

(where xxx.xxx.xxx is the IP address of your N900)

Rename the file to some_cool_name_for_streaming.sdp and open it with VideoLAN player for greater justice.

Try looking for the other posts to add additional parameters to gstreamer. This is video only, additional audio is also available, but not used by me so I can't say anything to that.

Best regards,
/me

PS: Your N900 could get heated up and will drain battery somewhat fast, so if you intend to use this longer, please attach the charger.

I'm getting some errors while following your tutorial though

Code:

Nokia-N900:~# gst-launch-0.10 v4l2src device=/dev/video0 ! dsph264enc ! rtph264pay ! udpsink host=78.21.100.x port=5434
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
create_node: dsp node create failed
sink_setcaps: dsp node creation failed
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2378): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 558532714 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Nokia-N900:~#


joshv06 2010-10-17 17:53

Re: Webcam N900 (gstreamer issues)
 
^ I have the same problem.

brambi 2010-10-17 21:10

Re: Webcam N900 (gstreamer issues)
 
Quote:

Originally Posted by joshv06 (Post 843481)
^ I have the same problem.

Got it fixxed.

Use gst-launch instead of gst-launch-0.10

Weird bug though...

aldebarab 2010-11-07 14:42

Re: Webcam N900 (gstreamer issues)
 
Hi all,

which vlc version are you using. Mine (1.01 qt-version under debian) seems not to interpret the sdp file correctly.

When I start vlc, streaming starts on the n900 (as observerd with wireshark on the linux box). But after around 100 packets the tcp window size goes to 0 (I think because of full buffer on vlc side) and the n900 sends no more packages.

I also tried mplayer sdp://file.sdp. Streaming also starts from the n900 and doesn't stop, but mplayer cannot recognize the frame rate and exits. But now the n900 stream does not stop!

Thanks in advance for any suggestions

aldebarab 2010-11-07 15:32

Re: Webcam N900 (gstreamer issues)
 
Quote:

Originally Posted by aldebarab (Post 865969)
Hi all,

which vlc version are you using. Mine (1.01 qt-version under debian) seems not to interpret the sdp file correctly.

When I start vlc, streaming starts on the n900 (as observerd with wireshark on the linux box). But after around 100 packets the tcp window size goes to 0 (I think because of full buffer on vlc side) and the n900 sends no more packages.

I also tried mplayer sdp://file.sdp. Streaming also starts from the n900 and doesn't stop, but mplayer cannot recognize the frame rate and exits. But now the n900 stream does not stop!

Thanks in advance for any suggestions

Hello again,

tested with vlc under Windows XP/SP2 with vlc 1.1.4. Doesn't work either.

weißelstone 2011-01-12 21:41

Re: Webcam N900 (gstreamer issues)
 
Did anyone get mp4mux/qtmux to work on N900? They don't exist on mine and so I can only write a raw h264 stream to the memory (I save and stream simultaneously using tee and queue in case of connection errors) but can't mux it directly to an mp4 file.

zimon 2011-01-12 22:33

Re: Webcam N900 (gstreamer issues)
 
Quote:

Originally Posted by brambi (Post 843388)
I'm getting some errors while following your tutorial though

Code:

Nokia-N900:~# gst-launch-0.10 v4l2src device=/dev/video0 ! dsph264enc ! rtph264pay ! udpsink host=78.21.100.x port=5434
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
create_node: dsp node create failed
sink_setcaps: dsp node creation failed


It cannot use DSP for some reason.
I had the same. System log also got this:
Code:

Jan 13 00:25:18 Nokia-N900 gst-launch-0.10: dsph264enc0: dsp node allocate failed
Jan 13 00:25:18 Nokia-N900 gst-launch-0.10: dsph264enc0: dsp node creation failed


bozoid 2013-06-16 10:59

Re: Webcam N900 (gstreamer issues)
 
Hi, I posted a question over at another similar thread (spy cam).
http://213.128.137.28/showpost.php?p...7&postcount=79

Much appreciated if anyone has answers for the question I posted.
Thanks & best regards,

kh


All times are GMT. The time now is 20:00.

vBulletin® Version 3.8.8