Editing Streaming video from built-in webcam

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
-
It is possible to use the [[Nokia N800|N800]] and [[Nokia N900|N900]] camera as a source of streaming video.  
+
It is possible to use the [[Nokia N800|N800]] camera as a source of streaming video. This was originally described [https://maemo.org/community/wiki/howtostreamvideo/ here], but the referenced example has an error which prevents it from working.
-
 
+
-
== N800 ==
+
-
 
+
-
This was originally described [https://maemo.org/community/wiki/howtostreamvideo/ here], but the referenced example has an error which prevents it from working.
+
This note describes how to stream video from the platform to an RTP sink, for example the [[VLC]] media player.
This note describes how to stream video from the platform to an RTP sink, for example the [[VLC]] media player.
Line 44: Line 40:
To adjust the video encoding quality, have a look at the parameters described by entering "gst-inspect hantro4200enc" at a shell prompt.  Setting the "bit-rate" parameter to its maximum (515) and the "profile-and-level" parameter to 1007 produces a much better quality image.  Also, I suspect the "stream-type" parameter should be "5" (H263), not "1" (MPEG4 Video).
To adjust the video encoding quality, have a look at the parameters described by entering "gst-inspect hantro4200enc" at a shell prompt.  Setting the "bit-rate" parameter to its maximum (515) and the "profile-and-level" parameter to 1007 produces a much better quality image.  Also, I suspect the "stream-type" parameter should be "5" (H263), not "1" (MPEG4 Video).
-
 
-
 
-
== N900 ==
 
-
 
-
The instructions for the N900 are very similar to the N800.
 
-
First install gstreamer-tools.
 
-
 
-
$ apt-get install gstreamer-tools
 
-
 
-
Note: on PC you might need to replace gst-launch by gst-launch-0.10 in the examples below
 
-
 
-
To access the back camera use:
 
-
<br>''/dev/video0''
 
-
<br>for the front
 
-
<br>''/dev/video1''
 
-
 
-
In the example below the IP for the two devices are as follows
 
-
*PC IP 192.168.1.101
 
-
*N900 IP 192.168.1.105
 
-
 
-
On the N900 the command you want to run is:
 
-
 
-
$ gst-launch v4l2src device=/dev/video0 ! videoscale! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! jpegenc ! tcpserversink host=192.168.1.101 port=5000
 
-
 
-
 
-
On the PC run
 
-
 
-
$ gst-launch tcpclientsrc host=192.168.1.105 port=5000  ! jpegdec ! autovideosink
 
-
 
-
The below also works
 
-
<br>'''N900'''
 
-
 
-
$ gst-launch v4l2camsrc device=/dev/video0 ! videoscale! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! jpegenc ! tcpserversink host=192.168.1.101 port=5000
 
-
 
-
Another example using a different encoder/decoder and udp
 
-
<br>'''N900'''
 
-
 
-
$ gst-launch v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! smokeenc ! udpsink host=192.168.1.101 port=5000
 
-
 
-
<br>'''PC'''
 
-
 
-
$ gst-launch udpsrc port=5000 ! smokedec ! autovideosink
 
-
 
-
 
-
Another example using omap3cam driver
 
-
<br>'''N900'''
 
-
 
-
$ gst-launch-0.10 v4l2camsrc device=/dev/video0 driver-name=omap3cam ! videoscale ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! jpegenc ! tcpserversink host=192.168.1.101 port=5000
 
-
 
-
<br>'''PC'''
 
-
 
-
$ gst-launch tcpclientsrc host=192.168.1.105 port=5000  ! jpegdec ! autovideosink
 
-
 
-
 
-
There are many ways to skin this particular cat. Recommendations are to look at [http://www.gstreamer.net/ gstreamer] and familiarise yourself.
 
-
 
-
 
-
To stream from the N900 to VLC follow these [http://blog.pclewis.com/2010/02/streaming-nokia-n900-camera-to-vlc/ instructions]
 
-
 
-
 
-
=== For the future ===
 
-
=====vloopback=====
 
-
http://talk.maemo.org/showthread.php?t=26288
 
-
http://tektipsentriks.blogspot.com/2010/05/how-to-install-vloopback-on-ubuntu.html
 
-
 
-
===Webcam threads===
 
-
http://talk.maemo.org/showthread.php?t=31567
 
-
http://talk.maemo.org/showthread.php?t=46046
 
-
 
-
===Flumotion mention===
 
-
http://talk.maemo.org/showthread.php?t=31567&page=7
 
-
extras-devel
 
-
http://maemo.org/packages/package_instance/view/fremantle_extras-devel_free_i386/flumotion/0.7.0.1-1maemo4/
 
== Streaming over ssh N900 ==
== Streaming over ssh N900 ==
Line 129: Line 52:
Now ssh to your N900 with the flag "-X" and then give the command:
Now ssh to your N900 with the flag "-X" and then give the command:
-
   gst-launch-0.10 v4l2src \
+
   gst-launch-0.10 v4l2src \!videoscale \!video/x-raw-yuv,width=320,height=240 \
-
  ! videoscale ! video/x-raw-yuv,width=320,height=240 \
+
    \! xvimagesink
-
  ! xvimagesink
+
A 320x240 video window should now popup on your desktop.
A 320x240 video window should now popup on your desktop.

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)