For RAW video stream only:
Use the following pipeline to play a raw video stream captured from an input source device:
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! \
video/x-raw, width=3840, height=2160, format=NV12, framerate=60/1 ! \
queue ! kmssink bus-id="a0070000.v_mix"
In the preceding example, the live source device link is present under the
/dev
directory. Video stream resolution is 4kp and
60fps. Video stream color format is NV12.
For RAW video and audio stream:
Use the following pipeline to play raw video and audio captured from the input source device:
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,
width=3840, height=2160, format=NV12, framerate=60/1 ! \
queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix" alsasrc device=hw:2,1 ! \
audio/x-raw, rate=48000, channels=2, format=S24_32LE ! \
audioconvert ! audioresample ! \
audio/x-raw, rate=48000, channels=2, format=S24_32LE ! \
queue ! alsasink device="hw:2,0"
The preceding example shows that video and audio can be captured using a single gstreamer pipeline. Audio capture device is hw:2,1 and playback device is hw:2,0. For video stream, the pipeline remains the same as the previous example.