Raspberry piでライブストリーミング

http://phoboslab.org/log/2013/09/html5-live-video-streaming-via-websockets
Websocketを使ってストリーミングする.
8082番のHTTPと8084のWSのポート開放は必要なかった.
構成

jsmpegを使う.
https://github.com/phoboslab/jsmpeg

サーバ(VPS)側

git clone https://github.com/phoboslab/jsmpeg.git
cd jsmpeg
npm install ws

websocketサーバ待機

node stream-server.js yourpassword

RaspiからffmpegVPSに動画を送信する
デフォルトからの変更点は,ビットレートを200kbpsにしたのと,
resolutionをwidth-height = 320x240に指定した.フレームレートの基本は30fpsみたい.(15とか10はできなかった)

ffmpeg -s 320x240 -f video4linux2 -i /dev/video0 -f mpeg1video \
-b 200k -r 30 http://VPS_ADDRESS:8082/yourpassword/320/240/

あとはApacheなりサーバソフト上でstream-example.htmlを見れるようにして
ブラウザからstream-example.htmlにアクセスする.

個人的なメモ
http://medicine.VPS_DOMAIN.com/jsmpeg/stream-example.html
にデプロイした.