Streaming Video from the Webcam
From FREEDROIDZ
This article describes how to stream webcam-video and mic-audio from a Nokia N800 (N810 not tested) to a Linux-Computer.
We assume the N800 has the IP 192.168.1.34 and the Linux-Box has the 192.168.1.35
On the N800 side
- Install the following packages:
- gst-plugins-farsight
- gstreamer-tools
- gstreamer0.10-3gp-osso
- gstreamer0.10-adpcm-osso
- gstreamer0.10-ffmpeg-osso
- gstreamer0.10-gnomevfs
- gstreamer0.10-hantro
- gstreamer0.10-id3lib-osso
- gstreamer0.10-mpeg1demux-osso
- gstreamer0.10-mpegstream-osso
- gstreamer0.10-plugins-base
- gstreamer0.10-plugins-base-extra
- gstreamer0.10-plugins-good
- gstreamer0.10-plugins-good-dbg
- gstreamer0.10-plugins-good-extra
- gstreamer0.10-plugins-good-extra-dbg
- gstreamer0.10-tools
- Create a Shell-script with the following content:
#!/bin/sh
VPORT=5434
APORT=5432
HOST=${1:-192.168.1.35}
gst-launch-0.10 v4l2src ! \
video/x-raw-yuv,width=176,height=144,framerate=\(fraction\)15/1 ! \
hantro4200enc stream-type=1 profile-and-level=1001 ! \
video/x-h263,framerate=\(fraction\)15/1 ! rtph263ppay mtu=1438 ! \
udpsink host=$HOST port=$VPORT dsppcmsrc ! queue ! \
audio/x-raw-int,channels=1,rate=8000 ! mulawenc ! rtppcmupay mtu=1438 ! \
udpsink host=$HOST port=$APORT
- Pop out the camera.
- Execute the script.
On the Linux-Box side
- Create a .sdp-file with the following content:
v=0 o=- 37 614155991 IN IP4 127.0.0.0 s=QuickTime t=0 0 a=range:npt=now- m=audio 5432 RTP/AVP 0 c=IN IP4 192.168.1.34 b=AS:63 m=video 5434 RTP/AVP 96 c=IN IP4 192.168.1.34 a=rtpmap:96 H263-2000/90000 a=fmtp:96 a=cliprect:0,0,144,176 a=framesize:96 176-144
- Install vlc
- Run
$ vlc /tmp/n800.sdp
