Difference between revisions of "Using the i.MX27 video codec"

From ArmadeusWiki
Jump to: navigation, search
(Links)
(Add host cmds)
Line 12: Line 12:
 
<pre class="apf">
 
<pre class="apf">
 
# mxc_vpu_test.out -c codec.cfg.net.enc.vga.h264
 
# mxc_vpu_test.out -c codec.cfg.net.enc.vga.h264
 +
</pre>
 +
 +
==Decoding incomming streams on your PC==
 +
* Decoding an RTP H.264 stream coming in UDP on port 6666 and displaying it at original size:
 +
<pre class="host">
 +
$ gst-launch-0.10 udpsrc port=6666 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" \
 +
                  ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false
 +
</pre>
 +
* Decoding an RTP H.264 stream coming in UDP on port 6666 and displaying it in 320x240:
 +
<pre class="host">
 +
$ gst-launch-0.10 udpsrc port=6666 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" \
 +
                  ! rtph264depay ! ffdec_h264 ! videoscale ! video/x-raw-yuv, width=320, height=240 ! xvimagesink sync=false
 
</pre>
 
</pre>
  

Revision as of 15:59, 24 August 2009

The i.MX27 (used on the APF27) has an internal DSP which can be used to encode/decode video stream, coming from various sources (CSI, buffer, etc...). To use it Freescale provides some useful tools.

Installation

$ make freescale-tools
  • then reflash your rootfs and you will get some stuff in /usr/bin/vpu/

Usage

mxc_vpu_test.out (yeah Freescale has strange ways to name its executables ;-) ) allows you to decode/encode video streams. This tool needs a configuration file (some are given as examples).

# mxc_vpu_test.out -c codec.cfg.net.enc.vga.h264

Decoding incomming streams on your PC

  • Decoding an RTP H.264 stream coming in UDP on port 6666 and displaying it at original size:
$ gst-launch-0.10 udpsrc port=6666 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" \
                  ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false
  • Decoding an RTP H.264 stream coming in UDP on port 6666 and displaying it in 320x240:
$ gst-launch-0.10 udpsrc port=6666 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" \
                  ! rtph264depay ! ffdec_h264 ! videoscale ! video/x-raw-yuv, width=320, height=240 ! xvimagesink sync=false

Links