I've got my raspberry pi camera module streaming work.
Solution 1:
on your Raspberry Pi:
sudo apt-get install vlc
raspivid -o - -t 0 -n -w 320 -h 200 -fps 24 | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
# -w 320 and -h 200 is to restrict video size as 320x200
on your PC:
ffplay http://raspberrypi.local:8090 # raspberrypi.local is the ip of your rpi, mine has been set with a domain name by avahi (zeroconf service)
or
you can open your VLC or mplayer to view your url at http://raspberrypi.local:8090
Solution 2:
Due to version of ffmpeg package on Debian/Raspian is too old, we need livav (debian and raspbian included) or custom-built ffmpeg to perform following:
On Raspberry Pi:
raspivid -o - -t 0 -n -w 320 -h 200 -fps 24 | avconv -i - -f rtp rtp://192.168.1.122:8558
output as:
avconv version 0.8.13-6:0.8.13-1+rpi1, Copyright (c) 2000-2014 the Libav developers
built on Jul 29 2014 02:09:52 with gcc 4.6.3
[h264 @ 0x10e6680] max_analyze_duration reached
[h264 @ 0x10e6680] Estimating duration from bitrate, this may be inaccurate
Input #0, h264, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: h264 (High), yuv420p, 320x200, 25 fps, 25 tbr, 1200k tbn, 2400k tbc
[buffer @ 0x10dc160] w:320 h:200 pixfmt:yuv420p
Output #0, rtp, to 'rtp://192.168.1.122:8558':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: mpeg4, yuv420p, 320x200, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg4)
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.1.122
t=0 0
a=tool:libavformat 53.21.1
m=video 8558 RTP/AVP 96
b=AS:200
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=1
copy:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.1.122
t=0 0
a=tool:libavformat 53.21.1
m=video 8558 RTP/AVP 96
b=AS:200
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=1
to your local PC as a .sdp file, eg, streaming.sdp
On your local PC:
ffplay -i streaming.sdp
there are many other alternative methods(rtsp, tcp, udp, or even setup a streaming server by ffserver) to streaming your camera video data to your pc, but what I was struggling with, is that I didn't realize the ffmpeg version was too old to proceed camera video data!