【Gstreamer开发】TI嵌入式处理器GStreamer pipeline
Example GStreamer Pipelines
From Texas Instruments Embedded Processors Wiki
Jump to: navigation, search
Translate this page to Translate
Example GStreamer Pipelines
MAINTENANCE ALERT: 05 MAY 2012
The Embedded Processors Wiki is scheduled to undergo routine maintenance and updates between the hours of 8:00 AM and 12:00 PM EDT (GMT -5) on Saturday, May 5, 2012.
During this period, the wiki content may be unavailable for short periods of time and will not be editable. Please plan accordingly.
Search
var googleSearchIframeName = "results_012993352299989377144:kjaa1vfng0a";var googleSearchFormName = "searchbox_012993352299989377144:kjaa1vfng0a";var googleSearchFrameWidth = 600;var googleSearchFrameborder = 0;var googleSearchDomain = "www.google.com";var
googleSearchPath = "/cse";
Contents
[hide]
1Purpose
2Testing
3Media files
3.1Creating an AVI file
4Supported Platforms
5DM355
5.1Environment Requirements
5.2Loopback: Video
5.3Loopback: Audio
5.4Loopback: Audio + Video
5.5Decode Video Files
5.6Decode Audio Files
5.7Decode .AVI Files
5.8Encode Video Files
5.9Encode Audio Files
5.10Image Encode
5.11Image Decode
5.12Resize
5.13Network Streaming
6DM357
6.1Environment Requirements
6.2Loopback: Video
6.3Loopback: Audio
6.4Loopback: Audio + Video
6.5Decode Video Files
6.6Decode Audio Files
6.7Decode .MP4 Files
6.8Decode .AVI Files
6.9Encode Video Files
6.10Encode Video in Container
6.11Image Encode
6.12Image Decode
6.13Resize
6.14Network Streaming
7DM644x
7.1Environment Requirements
7.2Loopback: Video
7.3Loopback: Audio
7.4Loopback: Audio + Video
7.5Decode Video Files
7.6Decode Audio Files
7.7Decode .MP4 Files
7.8Decode .AVI Files
7.9Decode .TS Files
7.10Encode Video Files
7.11Encode Video in Container
7.12Resize
7.13Network Streaming
8DM365
8.1Environment Requirements
8.2Loopback: Video
8.3Loopback: Audio
8.4Loopback: Audio + Video
8.5Decode Video Files
8.6Decode Audio Files
8.7Decode Container Files
8.8Encode Video Files
8.9Encode Audio Files
8.10Encode Video in Container
8.11Image Encode
8.12Image Decode
8.13Resize
8.14Network Streaming
9DM6467
9.1Environment Requirements
9.2Loopback: Video
9.3Loopback: Audio
9.4Loopback: Audio + Video
9.5Decode Video Files
9.6Decode Audio Files
9.7Decode .MP4 Files
9.8Decode .AVI Files
9.9Decode .TS Files
9.10Encode Video Files
9.11Encode Video in Container
9.12Encode Audio Files
9.13Resize
9.14Network Streaming
10DM6467T
10.1Environment Requirements
10.2Loopback: Video
10.3Loopback: Audio
10.4Loopback: Audio + Video
10.5Decode Video Files
10.6Decode Audio Files
10.7Decode Container Files
10.8Encode Video Files
10.9Encode Video in Container
10.10Encode Audio Files
10.11Resize
10.12Network Streaming
11OMAP35x
11.1Environment Requirements
11.2Loopback: Video
11.3Loopback: Audio
11.4Loopback: Audio+Video
11.5Decode Video files
11.6Decode Audio Files
11.7Decode .MP4 Files
11.8Decode .AVI Files
11.9Decode .TS Files
11.10Encode Video Files
11.11Encode Video in Container
11.12Image Encode
11.13Image Decode
11.14Resize
11.15Network Streaming
11.15.1Audio RTP Streaming
11.15.2H.264 RTP Streaming
12All
12.1Debugging
12.1.1Verbose output
12.1.2Element debug output
12.2Audio pipelines
12.2.1Controlling the sample rate and bit depth
12.2.2Generic network audio streaming example
if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); }Purpose
This page provides example pipelines that can be copied to the command line to demonstrate various GStreamer operations. Some of the pipelines may need modification for things such as file names, ip addresses, etc.
It is our hope that people using this page will add new interesting pipelines that they themselves are using. For example, on DM6467 if you are decoding a 1080 video and outputing to component please include your pipeline for others to use as a reference.
Refer to this Gstreamer article for more information on downloading and building TI Gstreamer elements. The project is hosted athttp://gstreamer.ti.com. If you are interested in understanding the design details then watch video presentationhttp://software-dl.ti.com/sdo/sdo_apps_public_sw/GStreamer_On_TI/FLV1/GStreamer_On_TI.htm
Testing
Currently these pipelines have not undergone any extensive testing. If you find an error in a pipeline please correct it.
Media files
You should be able to use any audio and video media file that conforms to the appropriate standard.
Creating an AVI file
The followingffmpegcommand takes a .mov file (say from the Apple movie trailers site) and make an AVI file. Run the command on your host computer.
ffmpeg -i tropic_thunder-tlr1a_720p.mov -r 60 -b 6000000 -vcodec mpeg2video -ab 48000000 -acodec libmp3lame -s 1280x544 tropic.avi
Supported Platforms
Following are a list of supported platforms, with links that jump directly to pipeline examples for each platform.
DM355
DM357
DM644x
DM365
DM6467
DM6467T
OMAP35x
All (commonly requested examples)
DM355
This section covers pipelines for common use cases for the DM355 processor.
Environment Requirements
Before executing the pipeline you need to set couple of environment variables, load kernel modules and activate video planes as follows:
cd /opt/gstreamer_demo/dm355/
./loadmodules.sh
export GST_REGISTRY=/tmp/gst_registry.bin
export LD_LIBRARY_PATH=/opt/gstreamer/lib
export GST_PLUGIN_PATH=/opt/gstreamer/lib/gstreamer-0.10
export PATH=/opt/gstreamer/bin:$PATH
cat /dev/zero > /dev/fb2 2> /dev/null
The above command assumes that gstreamer is installed in /opt/gstreamer directory.
Loopback: Video
v4l2src (Capture):
gst-launch -v v4l2src always-copy=FALSE ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite contiguousInputFrame=TRUE sync=false
videotestsrc (generated video test-bars):
gst-launch -v videotestsrc ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite accelFrameCopy=FALSE sync=false
Loopback: Audio
No pipelines here yet. Please feel free to add your own.
Loopback: Audio + Video
No pipelines here yet. Please feel free to add your own.
Decode Video Files
NTSC:
gst-launch -v filesrc location=sample.m4v ! TIViddec2 codecName=mpeg4dec engineName=codecServer ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
PAL:
gst-launch -v filesrc location=sample.m4v ! TIViddec2 codecName=mpeg4dec engineName=codecServer ! TIDmaiVideoSink videoStd=D1_PAL videoOutput=composite sync=false
Decode Audio Files
This platform. does not have an accelerated audio decoder element. You can use the ARM based audio decoders "mad", "ffdec_mp3" or"faad"
MP3 pipelines:
gst-launch filesrc location=sample.mp3 ! mad ! alsasink
gst-launch filesrc location=sample.mp3 ! mp3parse ! ffdec_mp3 ! alsasink
AAC pipeline:
gst-launch filesrc location=sample.aac ! faad ! alsasink
Decode .AVI Files
The following pipeline assumes you have an AVI file with MPEG-4 Video and MP1L2 or MP3 Audio. Note that not all MPEG-4 video streams can be played using the DM355 MPEG-4 decoder -- make sure the MPEG-4 stream was encoded with the DM355 MPEG-4 encoder or another
compatible encoder.
gst-launch -v filesrc location=sample.avi ! avidemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! mad ! alsasink demux.video_00 ! queue ! TIViddec2 ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite
Encode Video Files
videotestsrc (generated video test-bars):
gst-launch -v videotestsrc num-buffers=2000 ! TIVidenc1 codecName=mpeg4enc engineName=codecServer ! filesink location=output.m4v
v4l2src (Capture):
gst-launch -v v4l2src always-copy=FALSE num-buffers=2000 ! TIVidenc1 codecName=mpeg4enc engineName=codecServer contiguousInputFrame=TRUE ! filesink location=output.m4v
Encode Audio Files
This platform. does not have an accelerated audio encoder element. You can use the ARM based audio encoders "lame" or"faac"
No pipelines here yet. Please feel free to add your own.
Image Encode
A simple pipeline that converts a UYVY image into JPEG format.
gst-launch -v filesrc location=sample.yuv ! TIImgenc1 resolution=720x480 iColorSpace=UYVY ColorSpace=YUV420P qValue=75 ! filesink location=output.jpg
Image Decode
A simple pipeline that converts a JPEG image into UYVY format.
gst-launch -v filesrc location=sample.jpg ! TIImgdec1 resolution=720x480 ! filesink location=sample.yuv
Resize
A simple pipeline capturing from v4l2src and resizing to CIF.
gst-launch v4l2src always-copy=FALSE ! TIVidResize contiguousInputFrame=TRUE ! 'video/x-raw-yuv,width=352,height=288' ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
Network Streaming
This section gives example where EVM acts as streaming server, which captures, encodes and transmit via udp. Host PC can be used as client to decode.
MPEG-4 Encode/Stream/Decode:
A simple RTP server to encode and transmit MPEG-4
gst-launch -v v4l2src always-copy=FALSE ! TIVidenc1 codecName=mpeg4enc engineName=encode contiguousInputFrame=TRUE ! rtpmp4vpay pt=96 ! udpsink host=<HOST IP ADDRESS> port=5000
When the pipeline starts to run, you'll see something that looks like this:
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001010000012000845d4c28b421e0a21f, payload=(int)96, ssrc=(guint)3412089386,
clock-base=(guint)945410414, seqnum-base=(guint)27711
Make a note of caps="application/x-rtp, media=(string)video ................" string and pass this string in client below
A simple RTP client to decode MPEG-4 and display on HOST machine
gst-launch -v udpsrc port=5000 caps="<PASS_CAPS_FROM_SERVER>" ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink
For sending and receiving MPEG-4 with DM355 EVM you can use these 2 pipelines :
RTP server side :
gst-launch -v videotestsrc ! TIVidenc1 codecName=mpeg4enc engineName=encode ! rtpmp4vpay send-config=true ! udpsink host=<HOST IP ADDRESS> port=5000
Don't forget to set the "send-config" property to true
RTP client side :
gst-launch -v udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001010000012000845d4c285020f0a21f, payload=(int)96, ssrc=(guint)3319524202, clock-base=(guint)4012564513,
seqnum-base=(guint)25833" ! rtpmp4vdepay ! TIViddec2 codecName=mpeg4dec engineName=decode ! TIDmaiVideoSink videoStd=D1_PAL videoOutput=composite sync=false
Note that client should be started before server
DM357
This section covers pipelines for common use cases for the DM357 processor.
Environment Requirements
Before executing the pipeline you need to set couple of environment variables, load kernel modules and activate video planes as follows:
cd /opt/gstreamer_demo/dm357/
./loadmodules.sh
export GST_REGISTRY=/tmp/gst_registry.bin
export LD_LIBRARY_PATH=/opt/gstreamer/lib
export GST_PLUGIN_PATH=/opt/gstreamer/lib/gstreamer-0.10
export PATH=/opt/gstreamer/bin:$PATH
cat /dev/zero > /dev/fb2 2> /dev/null
The above command assumes that gstreamer is installed in /opt/gstreamer directory.
Notes on DM357 Performance:There is a known issue on DM357 where there are intermittent freezes in video and audio playback in some cases. If you experience this, nicing your gst-launch command to 15 as follows may resolve the issue:
nice -n 15 gst-launch .... (rest of gst-launch command)
Loopback: Video
v4l2src (Capture):
gst-launch -v v4l2src always-copy=FALSE ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite contiguousInputFrame=TRUE sync=false
videotestsrc (generated video test-bars):
gst-launch -v videotestsrc ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite accelFrameCopy=FALSE sync=false
Loopback: Audio
No pipelines here yet. Please feel free to add your own.
Loopback: Audio + Video
No pipelines here yet. Please feel free to add your own.
Decode Video Files
H.264/NTSC:
gst-launch -v filesrc location=sample.264 ! TIViddec codecName=h264dec engineName=hmjcp ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
MPEG-4/NTSC:
gst-launch -v filesrc location=sample.m4v ! TIViddec codecName=mpeg4dec engineName=hmjcp ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
Decode Audio Files
This platform. does not have an accelerated audio decoder element. You can use the ARM based audio decoders "mad" or"faac"
No pipelines here yet. Please feel free to add your own.
Decode .MP4 Files
No pipelines here yet. Please feel free to add your own.
Decode .AVI Files
The following pipeline assumes you have an AVI file with MPEG-2 or MPEG-4 Video and MP1L2 or MP3 Audio.
gst-launch -v filesrc location=sample.avi ! avidemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! mad ! alsasink demux.video_00 ! queue ! TIViddec ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite
Encode Video Files
H.264/v4l2src (Capture):
gst-launch -v v4l2src always-copy=FALSE num-buffers=2000 ! TIVidenc codecName=h264enc engineName=hmjcp contiguousInputFrame=TRUE ! filesink location=sample.264
MPEG-4/v4l2src (Capture):
gst-launch -v v4l2src always-copy=FALSE num-buffers=2000 ! TIVidenc codecName=mpeg4enc engineName=hmjcp contiguousInputFrame=TRUE ! filesink location=sample.m4v
H.264/videotestsrc (generated video test-bars):
gst-launch -v videotestsrc num-buffers=2000 ! TIVidenc codecName=h264enc engineName=hmjcp ! filesink location=sample.264
MPEG-4/videotestsrc (generated video test-bars):
gst-launch -v videotestsrc num-buffers=2000 ! TIVidenc codecName=mpeg4enc engineName=hmjcp ! filesink location=sample.m4v
Encode Video in Container
Encode H.264 in quicktime container (Capture):
gst-launch -v v4l2src always-copy=FALSE num-buffers=2000 ! TIVidenc codecName=h264enc engineName=hmjcp contiguousInputFrame=TRUE byteStream=FALSE ! qtmux ! filesink location=sample.mp4
gst-launch -v videotestsrc num-buffers=2000 ! TIVidenc codecName=h264enc engineName=hmjcp byteStream=FALSE ! qtmux ! filesink location=sample.mp4
Image Encode
A simple pipeline that converts a YUV422P image into JPEG format.
gst-launch filesrc location=sample.yuv ! TIImgenc resolution=720x480 iColorSpace=UYVY ColorSpace=YUV422P qValue=75 ! filesink location=sample.jpg
Image Decode
A simple pipeline that converts a JPEG image into UYVY format.
gst-launch filesrc location=sample.jpg ! TIImgdec resolution=720x480 ! filesink location=sample.yuv
Resize
A simple pipeline capturing from v4l2src and resizing to CIF.
gst-launch v4l2src always-copy=FALSE ! TIVidResize contiguousInputFrame=TRUE ! 'video/x-raw-yuv,width=352,height=288' ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite accelFrameCopy=FALSE sync=false
Network Streaming
This section gives example where EVM acts as streaming server, which captures, encodes and transmit via udp. Host PC can be used as client to decode.
H.264 Encode/Stream/Decode:
A simple RTP server to be run on EVM.
gst-launch -v v4l2src always-copy=FALSE ! TIVidenc codecName=h264enc engineName=hmjcp contiguousInputFrame=TRUE ! rtph264pay pt=96 ! udpsink host=<HOST_PC_IP> port=5000
When the pipeline starts to run, you'll see something that looks like this:
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)42801e, sprop-parameter-sets=(string)\"Z0KAHtoC0PRA\\,aM48gA\\=\\=\", payload=(int)96,
ssrc=(guint)895989858, clock-base=(guint)3971488929, seqnum-base=(guint)34821
Make a note of caps="application/x-rtp, media=(string)video ................" string and pass this string in client below
A simple RTP client to be run on Host PC (Linux).
gst-launch -v udpsrc port=5000 caps="<CAPS_FROM_SERVER>" ! rtph264depay ! ffdec_h264 ! xvimagesink
DM644x
This section covers pipelines for common use cases for the DM644x processor.
Environment Requirements
Before executing the pipeline you need to set couple of environment variables, load kernel modules and activate video planes as follows:
cd /opt/gstreamer_demo/dm6446/
./loadmodules.sh
export GST_REGISTRY=/tmp/gst_registry.bin
export LD_LIBRARY_PATH=/opt/gstreamer/lib
export GST_PLUGIN_PATH=/opt/gstreamer/lib/gstreamer-0.10
export PATH=/opt/gstreamer/bin:$PATH
cat /dev/zero > /dev/fb2 2> /dev/null
The above command assumes that gstreamer is installed in /opt/gstreamer directory.
Loopback: Video
v4l2src (Capture):
gst-launch -v v4l2src always-copy=FALSE ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite contiguousInputFrame=TRUE sync=false
videotestsrc (generated video test-bars):
gst-launch -v videotestsrc ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite accelFrameCopy=FALSE sync=false
Loopback: Audio
No pipelines here yet. Please feel free to add your own.
Loopback: Audio + Video
No pipelines here yet. Please feel free to add your own.
Decode Video Files
H.264/NTSC:
gst-launch -v filesrc location=sample.264 ! TIViddec2 codecName=h264dec engineName=decode ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
MPEG-2/NTSC:
gst-launch -v filesrc location=sample.m2v ! TIViddec2 codecName=mpeg2dec engineName=decode ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
MPEG-4/NTSC:
gst-launch -v filesrc location=sample.m4v ! TIViddec2 codecName=mpeg4dec engineName=decode ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
Decode Audio Files
AAC:
gst-launch -v filesrc location=sample.aac ! TIAuddec1 codecName=aachedec engineName=decode ! alsasink sync=false
Decode .MP4 Files
The following pipeline assumes you have an .MP4 file with H.264 Video and AAC Audio.
gst-launch -v filesrc location=sample.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! alsasink demux.video_00 ! queue ! TIViddec2 ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite
Decode .AVI Files
The following pipeline assumes you have an .AVI file with MPEG-2 or MPEG-4 Video and MP1L2 or MP3 Audio.
gst-launch -v filesrc location=sample.avi ! avidemux name=demux demux.audio_00 ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! mad ! alsasink demux.video_00 ! queue ! TIViddec2 ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite
Decode .TS Files
The following pipeline assumes you have an transport stream file with H.264 Video and MP1L2 or MP3 Audio.
gst-launch filesrc location=sample.ts ! typefind ! mpegtsdemux name=demux demux. ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! typefind ! mad ! alsasink demux. ! typefind ! TIViddec2 ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=COMPOSITE
Encode Video Files
H.264/v4l2src (Capture):
gst-launch -v v4l2src always-copy=FALSE num-buffers=2000 ! TIVidenc1 codecName=h264enc engineName=encode contiguousInputFrame=TRUE ! filesink location=sample.264
MPEG-4/v4l2src (Capture):
gst-launch -v v4l2src always-copy=FALSE num-buffers=2000 ! TIVidenc1 codecName=mpeg4enc engineName=encode contiguousInputFrame=TRUE ! filesink location=sample.m4v
H.264/videotestsrc (generated video test-bars):
gst-launch -v videotestsrc num-buffers=2000 ! TIVidenc1 codecName=h264enc engineName=encode ! filesink location=sample.264
MPEG-4/videotestsrc (generated video test-bars):
gst-launch -v videotestsrc num-buffers=2000 ! TIVidenc1 codecName=mpeg4enc engineName=encode ! filesink location=sample.m4v
Encode Video in Container
Encode H.264 in quicktime container (Capture):
gst-launch -v v4l2src always-copy=FALSE num-buffers=2000 ! TIVidenc1 codecName=h264enc engineName=encode contiguousInputFrame=TRUE byteStream=FALSE ! qtmux ! filesink location=sample.mp4
gst-launch -v videotestsrc num-buffers=2000 ! TIVidenc1 codecName=h264enc engineName=encode byteStream=FALSE ! qtmux ! filesink location=sample.mp4
Resize
A simple pipeline capturing from v4l2src and resizing to CIF.
gst-launch v4l2src always-copy=FALSE ! TIVidResize contiguousInputFrame=TRUE ! 'video/x-raw-yuv,width=352,height=288' ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false accelFrameCopy=FALSE
Network Streaming
This section gives example where EVM acts as streaming server, which captures, encodes and transmit via udp. Host PC can be used as client to decode.
H.264 Encode/Stream/Decode:
A simple RTP server to be run on EVM.
gst-launch -v v4l2src always-copy=FALSE ! TIVidenc1 codecName=h264enc engineName=encode contiguousInputFrame=TRUE ! rtph264pay pt=96 ! udpsink host=<HOST_PC_IP> port=5000
When the pipeline starts to run, you'll see something that looks like this:
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)42801e, sprop-parameter-sets=(string)\"Z0KAHtoC0PRA\\,aM48gA\\=\\=\", payload=(int)96,
ssrc=(guint)895989858, clock-base=(guint)3971488929, seqnum-base=(guint)34821
Make a note of caps="application/x-rtp, media=(string)video ................" string and pass this string in client below
A simple RTP client to be run on Host PC (Linux).
gst-launch -v udpsrc port=5000 caps="<PASS_CAPS_FROM_SERVER>" ! rtph264depay ! ffdec_h264 ! xvimagesink
MPEG-4 Encode/Stream/Decode:
A simple RTP server to encode and transmit MPEG-4
gst-launch -v v4l2src always-copy=FALSE ! TIVidenc1 codecName=mpeg4enc engineName=encode contiguousInputFrame=TRUE ! rtpmp4vpay pt=96 ! udpsink host=128.247.105.80 port=5000
When the pipeline starts to run, you'll see something that looks like this:
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)5, config=(string)000001b005000001b509000001000000012000847a9828b421e0a31f,
payload=(int)96, ssrc=(guint)302303174, clock-base=(guint)347576712, seqnum-base=(guint)48616
Make a note of caps="application/x-rtp, media=(string)video ................" string and pass this string in client below
A simple RTP client to decodes MPEG-4 and display on HOST machine
gst-launch -v udpsrc port=5000 caps="<PASS_CAPS_FROM_SERVER>" ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink
MPEG-4 Receive/Decode/Display:
This section gives example where EVM acts as RTP client, which receives encoded stream via udp then decodes and display output. Host PC can be used as server to transmit encoded stream.
A simple RTP server which encodes and transmits MPEG-4 on DM6446 EVM.
gst-launch-0.10 videotestsrc ! 'video/x-raw-yuv,width=720,height=480' ! ffenc_mpeg4 ! rtpmp4vpay ! udpsink host=<EVM_IP_ADDR> port=5000 -v
Make a note of caps="application/x-rtp, media=(string)video ................" string and pass this string in client below
A simple RTP client to receive and decode the MPEG-4 encoded stream.
gst-launch -v udpsrc port=5000 caps="<CAPS_FROM_SERVER>" ! rtpmp4vdepay ! TIViddec2 ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
DM365
This section covers pipelines for common use cases for the DM365 processor.
Environment Requirements
Before executing the pipeline you need to set couple of environment variables, load kernel modules and activate video planes as follows:
cd /opt/gstreamer_demo/dm365/
./loadmodules.sh
export GST_REGISTRY=/tmp/gst_registry.bin
export LD_LIBRARY_PATH=/opt/gstreamer/lib
export GST_PLUGIN_PATH=/opt/gstreamer/lib/gstreamer-0.10
export PATH=/opt/gstreamer/bin:$PATH
cat /dev/zero > /dev/fb2 2> /dev/null
The above command assumes that gstreamer is installed in /opt/gstreamer directory.
Please see some special notes while playing 720P cliphere
Loopback: Video
Generated_D1, composte out (videotestsrc):
gst-launch -v videotestsrc ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite accelFrameCopy=FALSE sync=false
Generated_720p60, component out (videotestsrc):
gst-launch -v videotestsrc !video/x-raw-yuv,width=1280,height=720 ! TIDmaiVideoSink videoStd=720P_60 videoOutput=component accelFrameCopy=FALSE sync=false
Capture_D1 (v4l2src):
gst-launch -v v4l2src always-copy=FALSE input-src=composite ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite contiguousInputFrame=TRUE sync=false
Capture_720P (v4l2src):
gst-launch -v v4l2src always-copy=FALSE ! TIDmaiVideoSink videoStd=720P_60 videoOutput=component contiguousInputFrame=TRUE sync=false
Loopback: Audio
Generated audio tone (audiotestsrc):
gst-launch audiotestsrc num-buffers=1000 ! alsasink
Captured audio (alsasrc):
gst-launch -v alsasrc ! alsasink sync=false
Loopback: Audio + Video
No pipelines here yet. Please feel free to add your own.
Decode Video Files
MPEG-4 -> NTSC_D1:
gst-launch -v filesrc location=sample_ntsc_D1.mpeg4 ! TIViddec2 engineName=codecServer codecName=mpeg4dec ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=COMPOSITE sync=FALSE
MPEG-4 -> PAL_D1:
gst-launch -v filesrc location=sample_pal_D1.mpeg4 ! TIViddec2 engineName=codecServer codecName=mpeg4dec ! TIDmaiVideoSink videoStd=D1_PAL videoOutput=COMPOSITE sync=FALSE
MPEG-4 -> NTSC_720P:
gst-launch -v filesrc location=sample_720p.mpeg4 ! TIViddec2 codecName=mpeg4dec engineName=codecServer ! queue max-size-buffers=2 max-size-time=0 max-size-bytes=0 !TIDmaiVideoSink videoStd=720P_60 videoOutput=COMPONENT sync=FALSE hideOSD=TRUE
H.264 -> NTSC_D1:
gst-launch -v filesrc location=sample_D1.264 ! TIViddec2 engineName=codecServer codecName=h264dec ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=COMPOSITE sync=FALSE
H.264 -> NTSC_720P:
gst-launch -v filesrc location=sample_720P.264 ! TIViddec2 codecName=h264dec engineName=codecServer ! queue max-size-buffers=2 max-size-time=0 max-size-bytes=0 ! TIDmaiVideoSink videoStd=720P_60 videoOutput=component sync=false hideOSD=TRUE
MPEG-2 -> NTSC_D1:
gst-launch filesrc location=sample_D1.m2v ! TIViddec2 engineName=codecServer codecName=mpeg2dec ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=COMPOSITE sync=FALSE
MPEG-2 -> NTSC_720P:
gst-launch filesrc location=sample_720p.m2v ! TIViddec2 engineName=codecServer codecName=mpeg2dec ! queue max-size-buffers=2 max-size-time=0 max-size-bytes=0 ! TIDmaiVideoSink videoStd=720P_60 videoOutput=component sync=false hideOSD=TRUE
Decode Audio Files
AAC:
gst-launch -v filesrc location=sample.aac ! TIAuddec1 codecName=aacdec engineName=codecServer ! alsasink sync=false
Decode Container Files
AVI (MPEG-4 / MP3):
gst-launch filesrc location=sample.avi ! avidemux name=demux demux.audio_00 ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! mad ! alsasink demux.video_00 ! TIViddec2 engineName=codecServer codecName=mpeg4dec ! TIDmaiVideoSink videoStd=D1_NTSC
videoOutput=COMPOSITE sync=FALSE
Encode Video Files
Generated_D1 (videotestsrc) -> MPEG-4:
gst-launch videotestsrc num-buffers=1000 ! video/x-raw-yuv, format=(fourcc)NV12 ! TIVidenc1 codecName=mpeg4enc engineName=codecServer ! filesink location=output_gen_D1.m4v
YUV_D1 -> MPEG-4:
gst-launch filesrc location=sample_nv12.yuv ! video/x-raw-yuv, format=(fourcc)NV12, width=320, height=240, framerate=(fraction)30/1 ! TIVidenc1 codecName=mpeg4enc engineName=codecServer ! filesink location=output_yuv_D1.m4v
Captured_D1 (v4l2src) -> MPEG-4:
gst-launch -v v4l2src always-copy=FALSE num-buffers=800 input-src=composite ! video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480 ! TIVidenc1 codecName=mpeg4enc engineName=codecServer ! filesink location=output_cap_D1.m4v
Captured_720P (v4l2src) -> MPEG-4:
gst-launch -v v4l2src always-copy=FALSE num-buffers=800 input-src=COMPONENT ! video/x-raw-yuv,format=(fourcc)NV12,width=1280,height=720 ! TIVidenc1 codecName=mpeg4enc engineName=codecServer contiguousInputFrame=TRUE ! filesink location=output_cap_720P.m4v
【Gstreamer开发】TI嵌入式处理器GStreamer pipeline的更多相关文章
- 安装gstreamer开发环境
ubuntu中安装gstreamer开发环境: * 安装gstreamer基本库,工具,以及插件 sudo apt--dev gstreamer-tools gstreamer0.-tools gst ...
- 【Gstreamer开发】用 GStreamer 简化 Linux 多媒体开发
原文:http://www.ibm.com/developerworks/cn/linux/l-gstreamer/ 一.基本概念 GStreamer 作为 GNOME 桌面环境推荐的流媒体应用框架, ...
- 【DSP开发】德州仪器达芬奇五年之路七宗罪,嵌入式处理器架构之争决战2012
芯片是产业链上游重要的一个环节,一颗小小的芯片具有极高的技术含量和价值,半导体行业每年都会有一个各大厂商营业额的排名,除去2009年,常年盘踞在前三名位置的分别是英特尔,三星半导体和德州仪器,英特尔凭 ...
- 【转】一步一步教你在Ubuntu12.04搭建gstreamer开发环境
原文网址:http://blog.csdn.net/xsl1990/article/details/8333062 闲得蛋疼 无聊寂寞冷 随便写写弄弄 看到网上蛮多搭建gstreamer开 ...
- GStreamer基础教程04 - 动态连接Pipeline
摘要 在以前的文章中,我们了解到了2种播放文件的方式:一种是在知道了文件的类型及编码方式后,手动创建所需Element并构造Pipeline:另一种是直接使用playbin,由playbin内部动态创 ...
- 【GStreamer开发】GStreamer基础教程01——Hello World
目标 对于一个软件库来说,没有比在屏幕上打印出Hello World更近直观的第一印象了.因为我们是在和一个多媒体的framework打交道,所以我们准备播放一段视频来代替Hello World.不要 ...
- 【GStreamer开发】GStreamer播放教程07——自定义playbin2的sink
目标 通过手动选择音频和视频的sink,playbin2可以进一步定制.这允许使用playbin2的应用在解码后可以自行做最终的渲染和显示.本教程展示了: 如何替换playbin2选择的sink 如何 ...
- 【嵌入式开发】 嵌入式开发工具简介 (裸板调试示例 | 交叉工具链 | Makefile | 链接器脚本 | eclipse JLink 调试环境)
作者 : 韩曙亮 博客地址 : http://blog.csdn.net/shulianghan/article/details/42239705 参考博客 : [嵌入式开发]嵌入式 开发环境 (远 ...
- 【分享】4412开发板-嵌入式Linux开发须要掌握的基础知识和技能
本文转自迅为电子论坛:http://www.topeetboard.com 1.Linux 基础 安装Linux操作系统 Linux文件系统 Linux经常使用命令 Linux启动过程具体解释 熟悉L ...
随机推荐
- 一个简单的setTimeout的问题
经常使用 setTimeout,并且自己认为也算比较熟悉这个函数的用法. 不过今天碰到了,突然发现自己没有意识到这个问题.于是作为一个记录点,进行巩固一下. var timer = window.se ...
- 如何修复GitKraken Inotify Limit Error\idea erro - 升级Ubuntu / Linux inotify限制
GitKraken是一个非常优秀的Git客户端.如果您是软件开发人员,那么您绝对应该试试GitKraken.今天我去了我的一个存储库做了一些提交,但是GitKraken告诉我它已经得到了Inotify ...
- 一步一步跟我学ImGui.第一讲.配置OpenGl2+ImGui环境
目录 搭建ImGui例子中的第一个OpenGl2环境 一丶搭建OpenGL2环境 1.下载GLFW库 2.解压GLFW库. 3.将GLFW库拷贝到你的工程文件下. 4.配置到Vs2013中. 5.测试 ...
- 地区sql
/*Navicat MySQL Data Transfer Source Server : localhostSource Server Version : 50136Source Host : lo ...
- "中国东信杯"广西大学第二届程序设计竞赛 - H - Antinomy与伊尔美格
题意:给一个有向图,n个点m条边,每个点有点权xi.规定从u点出发,到指定的k个点之一结束,可以多次经过同一个点和同一条边,求路径上点权和的最大值. 题解:直接缩点变成DAG,然后dp的时候并不是直接 ...
- vue项目开发中遇到的几个问题
1.使用elment或者mintUI库时,需要全局引入ui库的css文件:然后在修改自己样式时,需要将自己的css文件引入到main.js中才会生效,全局引用2.使用v-html展示dom字符串时,相 ...
- UK Biobank专题
这个时代的生信,统计遗传,不懂或不会用这个数据库就说不过去了. 看看10年GWAS里是如何定位和评价UK biobank的: For the near future, the UK Biobank i ...
- 分库分表 or NewSQL数据库?终于看懂应该怎么选!【转】
最近与同行科技交流,经常被问到分库分表与分布式数据库如何选择,网上也有很多关于中间件+传统关系数据库(分库分表)与NewSQL分布式数据库的文章,但有些观点与判断是我觉得是偏激的,脱离环境去评价方案好 ...
- JS Array.apply会有内存泄漏问题
报错内容: Maximum call stack size exceeded 参考:https://www.jianshu.com/p/b9ba0ddd3392 对象较多,前端JS内存溢出: 数组克隆 ...
- Tosca:设置执行结束时间