VAB-820 Linux BSP v3.2.0 Quick Start Guide
17
For example, to save the video-in video as a 10-second MP4 file into /home folder with
a filename demo_1.mp4, use the following command:
# gst-launch-0.10 imxv4l2src input=1 num-buffers=300 ! vpuenc codec=6 ! ffmux_mov !
filesink location=/home/demo_1.mp4
To play the saved video file, use the following command:
# gst-launch-0.10 playbin2 uri=file:/
<path/filename.mp4>
If you need to display the video-in source on the screen and record the feed at the same
time, use the following command:
# gst-launch-0.10 imxv4l2src input=1 num-buffers=900 queue-size=30 ! tee name=t ! queue !
imxv4l2sink t. ! queue ! vpuenc codec=6 bitrate=3000000 ! matroskamux ! filesink
location=/<path/filename.mp4>
5.3.2. Setting Up the S-Video
To enable the video-in, use the following command:
# gst-launch-0.10 imxv4l2src input=2 ! imxv4l2sink
If the source of the video-in is PAL, use the following command to display the video on
the screen:
# gst-launch-0.10 imxv4l2src input=2 deinterlace=true ! imxv4l2sink crop-top-by-pixel=1
To display other video-in sources on the screen, use the following command:
# gst-launch-0.10 imxv4l2src input=2 deinterlace=true ! imxv4l2sink
5.3.2.1. S-Video Video-in Recording
If your application requires the ability to record the video-in feeds onto the device
storage, the following commands can be used when writing your software application.
Record Feed as MP4:
To record the Video-in feed as an MP4 file, use the following command:
# gst-launch-0.10 imxv4l2src input=2 num-buffers=<value> ! vpuenc codec=6 ! ffmux_mov !
filesink location=/path.mp4
For example, to save the video-in video as a 10-second MP4 file into /home folder with
a filename demo_2.mp4, use the following command:
# gst-launch-0.10 imxv4l2src input=2 num-buffers=300 ! vpuenc codec=6 ! ffmux_mov !
filesink location=/home/demo_2.mp4
To play the saved video file, use the following command:
# gst-launch-0.10 playbin2 uri=file:/
<path/filename.mp4>