GstRerunSink - Example - GstRerunSink: stream to file

From RidgeRun Developer Wiki


Previous: Examples Index Next: Example - GstRerunSink: stream to rerun viewer




This page provides example pipelines to use with the GstRerunSink element and redirect its output to a local file.

The perf element can be downloaded from gst-perf Git repository. Otherwise, the element can be removed from the pipeline without any issues.


Stream to a file

Example pipeline

# Setting output-file automatically enables disk saving mode
gst-launch-1.0 videotestsrc num-buffers=300 ! \
    video/x-raw,format=RGB,width=640,height=480 ! \
    rerunsink recording-id="test" image-path="camera/image" \
    output-file="recording.rrd"

Record webcam to file with timestamp

Example pipeline

gst-launch-1.0 v4l2src num-buffers=600 ! \
    video/x-raw,format=YUY2 ! videoconvert ! \
    video/x-raw,format=RGB ! \
    rerunsink recording-id="webcam-recording" image-path="camera/front" \
    output-file="/tmp/webcam_$(date +%Y%m%d_%H%M%S).rrd"

Example with NVMM support

Example pipeline

# NVIDIA camera source with hardware acceleration, save to disk
gst-launch-1.0 nvv4l2camerasrc num-buffers=1800 ! \
    'video/x-raw(memory:NVMM),format=NV12,width=1920,height=1080' ! \
    rerunsink recording-id="jetson-camera" image-path="camera/main" \
    output-file="jetson_capture.rrd"


Previous: Examples Index Next: Example - GstRerunSink: stream to rerun viewer