Archive for category Streaming

Gstreamer and Freescale VPU

Client:
gst-launch -vvv udpsrc caps=”application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264″ port=5000 ! queue ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! ximagesink

G100

#G100 USB
#gst-launch -vvv mfw_v4lsrc capture-width=720 capture-height=480 fps-n=30 ! queue ! mfw_vpuencoder codec-type=std_avc bitrate=600 ! video/x-h264,width=720,height=480 ! rtph264pay ! udpsink port=5000 host=10.0.0.1 &

#G100 WIFI
#gst-launch -vvv mfw_v4lsrc capture-width=720 capture-height=480 fps-n=30 ! queue ! mfw_vpuencoder codec-type=std_avc bitrate=1000 ! video/x-h264,width=720,height=480 ! rtph264pay ! udpsink port=5000 host=192.168.100.255 &
gst-launch -vvv mfw_v4lsrc capture-width=720 capture-height=480 fps-n=30 ! queue ! mfw_vpuencoder codec-type=std_avc bitrate=1000 ! video/x-h264,width=720,height=480 ! rtph264pay ! udpsink port=5000 host=10.0.0.1 &

#PC
#gst-launch -vvv udpsrc caps=”application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264″ port=5000 ! queue ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! ximagesink

Leave a comment

VLC tips


- Streaming a mp4 video

Server side:
vlc -vvv -I rc "file:////tmp/simpson.mp4" --sout '#rtp{dst=192.168.0.76,port=1234,sdp=rtsp://192.168.0.76:8080/test.sdp}'

- Sending camera streaming

vlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga ,ab=128,channels=2,samplerate=44100}:std{access=udp,mux=ts,dst=192.168.0.76:1234}'

or

cvlc -vvv v4l2:///dev/video0 width=320,height=240 --sout \
'#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga}:\
std{access=udp,mux=ts,dst=192.168.1.44:1234}'

Client

vlc udp://@192.168.1.44:1234 :udp-caching=0

- Using RTP

Server side:

cvlc -vvv v4l2:///dev/video0 --sout \
'#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:rtp{mux=ts,port=1234,sdp=rtsp://0.0.0.0:8080/camera1.sdp}'

Client side:

vlc rtsp://192.168.1.43:8080/camera1.sdp

1 Comment

Using Gstreamer to send a USB camera streaming


Usb Camera device: /dev/video0

Start video streaming

gst-launch v4l2src ! video/x-raw-yuv,width=320,height=240,framerate=\(fraction\)5/1 ! ffmpegcolorspace ! jpegenc ! multipartmux ! tcpserversink host=192.168.0.76 port=5000

Receive the stream using VLC

vlc tcp://192.168.0.76:5000

Server:
gst-launch v4l2src device=/dev/video1 ! video/x-raw-yuv,width=320,height=240,framerate=\(fraction\)30/1 ! ffmpegcolorspace ! smokeenc keyframe=8 qmax=40 ! udpsink host=192.168.0.84 port=5000

Client:
gst-launch udpsrc port=5000 ! smokedec ! autovideosink

1 Comment