Difference between revisions of "Telepresence"
From Fixme.ch
(→TCP) |
(→TCP) |
||
Line 62: | Line 62: | ||
<pre> | <pre> | ||
− | su pi -c "while :; do raspivid -t 86400000 -w | + | su pi -c "while :; do raspivid -t 86400000 -w 1280 -h 720 -fps 25 -b 1024000 -n -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=0.0.0.0 port=5000; sleep 60; done" & |
su pi -c "while :; do gst-launch-1.0 -v tcpclientsrc host=ptl.telepresence.fixme.ch port=1554 ! gdpdepay ! rtph264depay ! h264parse ! omxh264dec ! autovideosink sync=false; sleep 60; done" & | su pi -c "while :; do gst-launch-1.0 -v tcpclientsrc host=ptl.telepresence.fixme.ch port=1554 ! gdpdepay ! rtph264depay ! h264parse ! omxh264dec ! autovideosink sync=false; sleep 60; done" & | ||
</pre> | </pre> |
Revision as of 18:36, 31 July 2013
Contents
Description
- (HD) Telepresence between FIXME and PTL
Current issues
- Accelerated video decoding and display on the Raspi
- PTL outgoing bandwidth
- Build a wooden window-like frame with curtains
Hardware
- 2 (4?) Raspberry PI
- 2 Camera modules
- Custom printed box
Video Streaming
It works!
1. Install gstreamer with omx support
echo "deb http://vontaene.de/raspbian-updates/ . main" | sudo tee /etc/apt/sources.list.d/gstreamer.list sudo apt-get update sudo apt-get install libgstreamer1.0-0-dbg gstreamer1.0-tools libgstreamer-plugins-base1.0-0 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad-dbg gstreamer1.0-omx gstreamer1.0-alsa
2. Install other required packages:
sudo apt-get install vlc
3. Configure /etc/rc.local to launch processes during startup:
RTSP
su pi -c "while :; do raspivid -t 86400000 -w 1080 -h 720 -fps 25 -b 256000 -n -o - | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:1554/}' :demux=h264; sleep 60; done" & su pi -c "while :; do gst-launch-1.0 rtspsrc location=rtsp://ptl.telepresence.fixme.ch:1554/ ! rtph264depay ! h264parse ! omxh264dec ! autovideosink; sleep 60; done" &
PTL raspi must use rtsp://fixme.telepresence.fixme.ch:1554/ instead.
Issues:
- NAT...
UDP
pi@raspberrypi ~ $ gst-launch-1.0 -v udpsrc port=5000 ! gdpdepay ! rtph264depay ! h264parse ! omxh264dec ! autovideosink pi@raspberrypi ~ $ raspivid -t 999999 -w 1080 -h 720 -fps 25 -hf -b 1000000 -n -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! udpsink host=127.0.0.1 port=5000 force-ipv4=true
Issues:
- Client *must* be started first because of caps transmission
TCP
/etc/rc.local côté FIXME:
su pi -c "while :; do raspivid -t 86400000 -w 1280 -h 720 -fps 25 -b 1024000 -n -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=0.0.0.0 port=5000; sleep 60; done" & su pi -c "while :; do gst-launch-1.0 -v tcpclientsrc host=ptl.telepresence.fixme.ch port=1554 ! gdpdepay ! rtph264depay ! h264parse ! omxh264dec ! autovideosink sync=false; sleep 60; done" &
/etc/rc.local côté PTL:
(note: pour l'instant le port 5000 est utilisé a fixme pour contourner les problemes de PAT/NAT au ptl en utilisant le meme port 1554 dans les 2 sens)
su pi -c "while :; do raspivid -t 86400000 -w 1080 -h 720 -fps 25 -b 256000 -vf -hf -n -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=0.0.0.0 port=1554; sleep 60; done" & su pi -c "while :; do gst-launch-1.0 -v tcpclientsrc host=fixme.telepresence.fixme.ch port=5000 ! gdpdepay ! rtph264depay ! h264parse ! omxh264dec ! autovideosink sync=false; sleep 60; done" &
CEC - TV Screen control through HDMI
Reference: http://raspberrypi.stackexchange.com/questions/7054/cec-wake-up-command
git clone git://github.com/Pulse-Eight/libcec.git git cd libcec ./configure --with-rpi-include-path=/opt/vc/include --with-rpi-lib-path=/opt/vc/lib --enable-rpi make sudo make install
Switch the TV screen on:
echo 'on 0' | /usr/local/bin/cec-client -s
Switch the TV screen off:
echo 'standby 0' | /usr/local/bin/cec-client -s