gst-sh-mobile-enc

gst-sh-mobile-enc - Encodes raw YUV image data to MPEG4/H264 video stream on SuperH environment using libshcodecs HW codec.

Description

This element is designed to use the HW video processing modules of the Renesas SuperH chipset to encode mpeg4/h264 video streams. This element is not usable in any other environments and it requires libshcodes HW codec to be installed.

The encoding settings are given as properties to the encoder or using a control file. Examples of control files can be found from /cntl_file -folder.

Example launch lines

Encoding from a file to a file

 gst-launch \
  filesrc location=test.yuv \
  ! "video/x-raw-yuv, format=(fourcc)NV12, width=320, height=240, framerate=30/1" 
  ! gst-sh-mobile-enc stream-type=mpeg4 \
  ! filesink location=test.m4v

This is a very simple pipeline where filesrc and filesink elements are used to read the raw data and write the encoded data. In this pipeline the gst-sh-mobile-enc operates in pull mode, so it is the element which drives the data flow.

Encoding from a webcam to a file

 gst-launch \
  v4l2src device=/dev/video0 \
  ! "video/x-raw-yuv, format=(fourcc)NV12, width=320, height=240, framerate=15/1" 
  ! queue ! gst-sh-mobile-enc stream-type=mpeg4 bitrate=250000 \
  ! filesink location=test.m4v

In this example, a camera is used as the streaming source via v4l2src element. This pipeline works in push mode, so we need to specify the stream properties using static caps after the v4l2src element. Again, filesink is used to write the encoded video stream into a file.

Encoding from a webcam to network

 gst-launch \
  v4l2src device=/dev/video0 \
  ! "video/x-raw-yuv, format=(fourcc)NV12, width=320, height=240, framerate=15/1" 
  ! queue ! gst-sh-mobile-enc \
  ! rtpmp4vpay ! udpsink host=192.168.10.10 port=5000 sync=false 

This line is similar to the one above. At this time, the video is not stored in a file but sent over the network using udpsink -element. Before sending, the video is packed into RTP frame using rtpmp4vpay -element.

The following line allows playback of the video in PC:

 gst-launch \
  udpsrc port=5000 caps="application/x-rtp, clock-rate=90000" \
  ! gstrtpjitterbuffer latency=0 ! rtpmp4vdepay \
  ! "video/mpeg, width=320, height=240, framerate=15/1" \
  ! ffdec_mpeg4 ! ffmpegcolorspace ! ximagesink 

Properties

Pads

License

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA

Generated on Tue Dec 7 13:42:53 2010 for gst-sh-mobile by  doxygen 1.6.3