- added gst-plugin videorate
[gumcam:mainline.git] / gstreamer / playstream
1 #!/bin/sh
2
3 PORT=5000
4
5 #get this from server
6 MPEG4_CAPS="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d8800f514043c1463000001b24c61766335322e33322e30, payload=(int)96, ssrc=(guint)393651937, clock-base=(guint)2145485877, seqnum-base=(guint)15301"
7
8 #H264_CAPS="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96, ssrc=(guint)888619947, clock-base=(guint)4146444366, seqnum-base=(guint)54526"
9 H264_CAPS='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z0KAHukCg+QgAAB9AAAdTACA\\,aM48gA\\=\\=\", payload=(int)96, ssrc=(guint)2165365163, clock-base=(guint)4000239249, seqnum-base=(guint)4149'
10 RAW_CAPS="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)YCbCr-4:2:2, depth=(string)8, width=(string)320, height=(string)240, colorimetry=(string)SMPTE240M, payload=(int)96, ssrc=(guint)2128890706, clock-base=(guint)1343395863, seqnum-base=(guint)20146"
11
12 MJPEG_CAPS="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, payload=(int)96, ssrc=(guint)3510745656, clock-base=(guint)3077128422, seqnum-base=(guint)6381"
13
14 MPEG4_PIPE="udpsrc port=$PORT caps=\"$MPEG4_CAPS\" ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink sync=false"
15 RAW_PIPE="udpsrc port=$PORT caps=\"$RAW_CAPS\" ! rtpvrawdepay ! xvimagesink"
16 MJPEG_PIPE="udpsrc port=$PORT caps=\"$MJPEG_CAPS\" ! rtpjpegdepay ! ffdec_mjpeg ! xvimagesink"
17 H264_PIPE="udpsrc port=$PORT caps=\"$H264_CAPS\" ! rtph264depay ! ffdec_h264 ! xvimagesink"
18
19 case "$1" in
20 h264)
21 PIPE=$H264_PIPE
22 ;;
23
24 mpeg4)
25 PIPE=$MPEG4_PIPE
26 ;;
27
28 mjpeg)
29 PIPE=$MJPEG_PIPE
30 ;;
31 *)
32 echo "using default encoding"
33 PIPE=$MJPEG_PIPE
34 ;;
35 esac
36
37
38 echo "running pipe: $PIPE"
39
40 gst-launch -v $PIPE
41