gstreamer

debug

mkdir ./tmp
export GST_DEBUG_DUMP_DOT_DIR=./tmp/
# ... run pipeline
cd tmp
dot -Tpng x.xx.xx.xxxxxxxxx-gst-launch.FOO.dot > graph.png

show usb camera

gst-launch-1.0 v4l2src device=/dev/video0 ! xvimagesink

rtsp client

gst-launch-1.0 \
rtspsrc location=rtsp://foscam:foscam1@192.168.2.14:554/videoMain ! rtph264depay \
! h264parse ! avdec_h264 \
! videoconvert ! xvimagesink

hardware decode

F=videos/traffico01-1152x720-1610kb.mkv
gst-launch-1.0 filesrc location=$F ! matroskademux ! queue ! h264parse ! omxh264dec ! autovideoconvert ! xvimagesink

hardware encode

... ! videoconvert ! omxh264enc ! matroskamux ! filesink location=test.mkv

inspect pipeline properties

... ! fakesink -v | grep fake

ocam camera

identify

v4l2-ctl --list-devices
v4l2-ctl --list-formats-ext -d /dev/video0
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'GRBG' (8-bit Bayer GRGR/BGBG)
Size: Discrete 1280x960
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.010s (100.000 fps)
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.020s (50.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 320x240
Interval: Discrete 0.006s (180.000 fps)
Interval: Discrete 0.007s (150.000 fps)
Interval: Discrete 0.008s (120.000 fps)
Interval: Discrete 0.010s (100.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.020s (50.000 fps)

ffplay -f video4linux2 -s 640x480 -i /dev/video0
Stream #0:0: Video: rawvideo ([186]GR[8] / 0x85247BA), bayer_grbg8, 640x480, 245760 kb/s, 100 fps, 100 tbr, 1000k tbn, 1000k tbc

gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-bayer,format=grbg,width=640,height=480,framerate=100/1,colorimetry=bt601' ! bayer2rgb ! videoconvert ! xvimagesink
# width=640,height=480,framerate=100/1
# width=1280,height=960,framerate=30/1