Changes between Initial Version and Version 1 of Yocto/gstreamer/video


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Yocto/gstreamer/video

    v1 v1  
     1[[PageOutline]]
     2
     3[=#video]
     4= Video =
     5The following pipeline examples utilize plugins from the the Freescale gst-fsl-plugin package on GStreamer 0.10.
     6
     7gst-fsl-plugin elements used:
     8 * Output:
     9  * '''mfw_v4lsink''' - stretch and render video frames to a V4L output device using hardware acceleration via the IMX6 IPU.
     10 * Input:
     11  * '''mfw_v4lsrc''' - capture video utilizing hardware acceleration via the IMX6 IPU.
     12  * '''tvsrc''' - capture video from an interlaced source utilizing hardware acceleration via the IMX6 IPU to capture and de-interlace.
     13 * Encode / Decode:
     14  * '''vpuenc''' - encode video using the specified code utilizing hardware acceleration via the IMX6 VPU.
     15  * '''vpudec''' - decode video utilizing hardware acceleration via the IMX6 VPU.
     16
     17For a description of Video devices see:
     18 * [wiki:Yocto/Video_In Video Input Devices]
     19 * [wiki:Yocto/Video_Out Video Output Devices]
     20
     21References:
     22 * [https://community.freescale.com/docs/DOC-93446 Here] are more examples.
     23 * [https://community.freescale.com/docs/DOC-93387/version/4 Freescale Site Examples]
     24
     25
     26[=#video-output]
     27== Output ==
     28For boards that support video out, the following pipeline will generate a video test pattern and output it to the first video device using [[wiki:Video_Out|v4l]]:
     29{{{
     30gst-launch videotestsrc pattern=18 ! mfw_v4lsink device=/dev/video16
     31}}}
     32
     33
     34[=#video-capture]
     35== Input ==
     36We can even take video from an external source and stream it to a display
     37{{{
     38gst-launch mfw_v4lsrc device=/dev/video0 ! mfw_v4lsink device=/dev/video16
     39}}}
     40 * tvsrc is used for interlaced video input such as Ventana Analog video In
     41 * mfw_v4lsrc is used for non-interlaced video input such as HDMI video In available on the GW54xx and GW551x
     42
     43
     44[=#video-encoding]
     45== Encoding ==
     46Here is a simple example that encodes a test pattern (pattern 18 is a bouncing ball) to MJPEG and stored to a file with an AVI container.
     47{{{
     48gst-launch videotestsrc pattern=18 num-buffers=512 ! vpuenc codec=mjpg ! \
     49  avimux ! filesink location=/tmp/test.avi
     50}}}
     51
     52
     53[=#video-decoding]
     54== Decoding ==
     55We can decode the video from an avi using vpudec which utilizes hardware decoding from the VPU:
     56{{{
     57gst-launch filesrc location=/media/sda1/big_buck_bunny_720p_surround.avi ! \
     58 avidemux ! vpudec ! mfw_v4lsink device=/dev/video16
     59}}}
     60
     61
     62[=#video-transcode]
     63== Transcoding ==
     64We can transcode a file from an avi bin and encode to the H.263 standard
     65{{{
     66gst-launch filesrc location=/media/sda1/big_buck_bunny_720p_surround.avi ! \
     67  avidemux ! vpudec ! vpuenc codec=h263 ! filesink location=/tmp/test.mov
     68}}}
     69
     70References:
     71 * [https://community.freescale.com/docs/DOC-93448 IMX Community DOC-93448]
     72
     73
     74[=#video-loopback]
     75== Video loopback (Useful for testing video input and output) ==
     76A simple video loopback test can take video input and output it to the HDMI output as shown in the example below from a GW5400:
     77
     78Digital HDMI Video Input to HDMI Video Output:
     79{{{
     80gst-launch mfw_v4lsrc device=/dev/video0 ! mfw_v4lsink device=/dev/video16
     81}}}
     82 * Note: For certain resolutions / modes tvsrc may work for HDMI input but typically should not be used.
     83
     84Analog Video Input to HDMI Video Output:
     85{{{
     86gst-launch -v tvsrc device=/dev/video1 ! mfw_v4lsink device=/dev/video16
     87}}}
     88 * Note that the GW54xx has digital HDMI input as well which is /dev/video0. Boards with analog video input only will present it on /dev/video0
     89
     90We also invite you to look at [https://raw.githubusercontent.com/Gateworks/meta-gateworks/dizzy/recipes-support/gateworks-test/gateworks-test/test_video this script] for similar use cases and examples. This script is what we use to test video input and output capabilities.