Skip to main content
This section outlines the prerequisites for video functionality, steps to render video, and methods to validate video playback and video recording. The following workflow shows the sequence to get started with video functionality:
Figure: Getting started workflow for video

Figure: Getting started workflow for video

The workflow outlines the essential steps for initializing and starting a video-based system:
  1. Prerequisites: Build and flash the required software, and establish an SSH connection to the target device.
  2. Setup: Run the necessary commands from an SSH terminal and push a prerecorded video to the device.
  3. Run: Run the required commands to validate video playback and recording.

Prerequisites

  • Build and flash the software. For information, see Qualcomm Linux Build Guide.
  • Connect to the device using SSH. For information, see Sign in using SSH

Set up video rendering

The setup procedure helps you render video content on the display and transfer it to the device. To playback a video, transfer a prerecorded H.264 video to the device and run the following command from an SSH terminal:
scp -r <file_name> root@[DEVICE IP-ADDR]:/opt

Note:

  • Video sample mp4 clip can be downloaded externally from the internet.
  • When prompted for a password, enter oelinux123.

Validate playback and video recording

You can run a set of commands on the device terminal to validate the video playback and recording functionality. Validate video playback functionality
  1. To validate the video playback functionality, run the following command:
    gst-launch-1.0 filesrc location=/opt/<file_name> ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! waylandsink fullscreen=true
    
  2. To stop validating the use case, select CTRL + C.
Validate video recording functionality
  1. To validate the video recording functionality, run the following command:
    gst-launch-1.0 videotestsrc num-buffers=1000 ! video/x-raw, format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=4 extra-controls="controls,video_bitrate=1000000,video_gop_size=29;" ! h264parse ! queue ! mp4mux ! filesink location=/opt/720p_AVC.mp4
    
  2. To stop validating the use case, select CTRL + C.
  3. To pull the recorded content from the device, run the following Secure Copy Protocol (SCP) command:
    scp -r root@[DEVICE IP-ADDR]:/opt/720p_AVC.mp4 user1@[HOST IP-ADDR]:/workspace
    
  4. Play the content on your host computer.

Next steps