Time Lapse Video with Gstreamer

Record

gst-launch-0.10 v4l2src ! videorate ! video/x-raw-yuv,width=640,height=480,framerate=\(fraction\)1/30 ! ffmpegcolorspace ! jpegenc ! multipartmux ! filesink location=$1.mjpeg

Playback

gst-launch-0.10 filesrc location=$1.mjpeg ! multipartdemux ! jpegdec ! autovideosink

Transcode

Using ffmpeg, to MPEG4

ffmpeg -i $1.mjpeg -f mjpeg -sameq -an $1.mp4

Notes:

Streaming video with Gstreamer

Recipe for streaming video from an XO to another computer, via tcpsync and udpsync. Should also work on non-XO's that have v4l2 cameras.

Gstreamer

Reciever

IP: 192.168.2.3

$ gst-launch-0.10 udpsrc port=5000 ! queue ! smokedec ! queue !
autovideosink tcpclientsrc host=192.168.2.4 port=5001 ! queue !
speexdec ! queue ! alsasink sync=false

Sender

IP: 192.168.2.4

$ gst-launch-0.10 v4l2src ! queue ! video/x-raw-yuv,width=320,height=240,framerate=\(fraction\)4/1 !
videorate ! videoscale ! ffmpegcolorspace ! queue ! smokeenc ! queue !
udpsink host=192.168.0.3 port=5000 alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 !
audioconvert ! speexenc ! queue ! tcpserversink host=192.168.2.3 port=5001