DM3730 GStreamer Pipeline 记录

gst-launch videotestsrc num-buffers=100 ! 'video/x-raw-yuv,width=1280,height=720,format=(fourcc)UYUY'! TIVidenc1 codecName=h264enc engineName=codecServer ! filesink location=sample.264

可以执行成功!
gst-launch filesrc location=/usr/share/ti/data/videos/davincieffect.264 ! typefind ! h264parse ! TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2 -v

对某个元件打印调试信息
gst-launch --gst-debug=GST_AUTOPLUG:5,TIViddec2:3 filesrc location=/usr/share/ti/data/videos/davincieffect.264
 ! typefind ! h264parse ! TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2 -v


gst-launch --gst-debug=TIViddec2:4,tidisplaysink2:4 filesrc location=/usr/share/ti/data/videos/davincieffect.2
64 ! typefind ! h264parse ! TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2 -v

解码一路mpeg4视频
gst-launch -e -v filesrc location=/usr/share/ti/data/videos/davincieffect.mpeg4 ! typefind ! mpeg4videoparse ! TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2

音频文件播放(OK)
gst-launch filesrc location=/usr/share/ti/data/sounds/davincieffect_lc.aac ! typefind ! TIAuddec1 ! alsasink -v

Mp3播放(OK)
gst-launch -e filesrc location=1.mp3 ! mad ! alsasink

用decodebin2解码一路MP4视频
gst-launch -e -v filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.mp4 ! decodebin2 ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2

用decodebin2解码一路AVI视频
gst-launch -e -v filesrc location=test.avi ! decodebin2 ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2

音频、视频文件播放(OK)
gst-launch -e filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.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 padAllocOutbufs=TRUE ! queue ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2 -v


gst-launch filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! audioconvert ! audioresample ! audiorate ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2 -v

gst-launch filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.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 padAllocOutbufs=TRUE engineName=codecServer codecName=h264dec numOutputBufs=5 framerate=5/1 ! TIVidResize contiguousInputFrame=TRUE ! video/x-raw-yuv,width=1280,height=720 ! videobalance ! ffmpegcolorspace ! queue ! tidisplaysink2 -v


gst-launch filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.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 padAllocOutbufs=TRUE engineName=codecServer codecName=h264dec numOutputBufs=5 framerate=25/1 ! video/x-raw-yuv,width=1280,height=720 ! videoscale ! video/x-raw-yuv,width=1280,height=720 ! videobalance ! ffmpegcolorspace ! queue ! tidisplaysink2 video-standard=auto  display-output=lcd overlay-width=1280 overlay-height=720 -v

gst-launch filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! audioconvert ! audioresample ! audiorate ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2 -v

AVI文件播放
gst-launch --gst-debug=GST_AUTOPLUG:5,avidemux:4 -v filesrc location=/usr/share/ti/data/videos/avi.avi ! avidemux name=demux demux.audio_00 ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! alsasink demux.video_00 ! queue !  TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2 -v


其他pipeline
gst-launch-0.10 -v filesrc location=bbb.h264 ! queue ! TIViddec2 codecName=h264dec engineName=codecServer ! queue ! dmaiperf engine-name=codecServer print-arm-load= true ! omapfbsink




自动创建插件,自动找到插件为faad,但是如何让它自动找到TI给的解码插件呢?
gst-launch filesrc location=/usr/share/ti/data/sounds/davincieffect_lc.aac ! typefind ! faad ! audioconvert ! alsasink






 # Test pipeline which should work on Linux and Windows
 
@@ -25,8 +27,16 @@ Camera.controls=10094851 10092544 0, 9963776 9961472 128
 
 # This one works fine on BeagleBoard
 
-Encoding.Pipeline=v4l2src always-copy=FALSE ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! videoscale name=qos-scaler ! capsfilter name=qos-caps caps=video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! video/x-raw-yuv,format=(fourcc)UYVY ! TIVidenc1 codecName=h264enc engineName=codecServer bitRate=30000 genTimeStamps=TRUE byteStream=TRUE ! rtph264pay pt=96 ! appsink name=icesink
+#Encoding.Pipeline=v4l2src always-copy=FALSE ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! videoscale name=qos-scaler ! capsfilter name=qos-caps caps=video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! video/x-raw-yuv,format=(fourcc)UYVY ! TIVidenc1 codecName=h264enc engineName=codecServer bitRate=320000 encodingPreset=2 genTimeStamps=TRUE byteStream=TRUE ! rtph264pay pt=96 ! appsink name=icesink
 
+# Experimenting with video mixer for rear camera
+Encoding.Pipeline=videotestsrc pattern="snow" ! video/x-raw-yuv,framerate=30/1,width=80,height=60 ! videomixer name=mix ! videoscale name=qos-scaler ! capsfilter name=qos-caps caps=video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! video/x-raw-yuv,format=(fourcc)UYVY ! TIVidenc1 codecName=h264enc engineName=codecServer bitRate=320000 encodingPreset=2 genTimeStamps=TRUE byteStream=TRUE ! rtph264pay pt=96 ! appsink name=icesink v4l2src always-copy=FALSE ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! mix.
+
+# This pipeline uses the second (rear) camera and mix small image to the top left corner
+#Encoding.Pipeline=v4l2src device=/dev/video1 ! video/x-raw-yuv,framerate=30/1,width=160,height=120 ! videoscale ! capsfilter caps=video/x-raw-yuv,width=80,height=60 ! ffmpegcolorspace ! video/x-raw-yuv,format=(fourcc)UYVY ! videomixer name=mix ! videoscale name=qos-scaler ! capsfilter name=qos-caps caps=video/x-raw-yuv,width=320,height=240 ! TIVidenc1 codecName=h264enc engineName=codecServer bitRate=320000 encodingPreset=2 genTimeStamps=TRUE byteStream=TRUE ! rtph264pay pt=96 ! appsink name=icesink v4l2src device=/dev/video0 always-copy=FALSE ! video/x-raw-yuv,format=(fourcc)YUY2,width=320,height=240,framerate=30/1 ! ffmpegcolorspace ! video/x-raw-yuv,format=(fourcc)UYVY ! mix.
+
+# This pipeline uses TIVidResize (but does not have qos-scaler because we are currently not setting format(fourcc) in caps filter  properly in the vehicle application.
+#Encoding.Pipeline=v4l2src always-copy=FALSE ! video/x-raw-yuv,format=(fourcc)YUY2,width=640,height=480,framerate=30/1 ! ffmpegcolorspace ! video/x-raw-yuv,format=(fourcc)UYVY ! TIVidResize name=qos-scaler contiguousInputFrame=TRUE ! video/x-raw-yuv,format=(fourcc)UYVY,width=640,height=480 ! TIVidenc1 codecName=h264enc engineName=codecServer bitRate=320000 encodingPreset=2 genTimeStamps=TRUE byteStream=TRUE ! rtph264pay pt=96 ! appsink name=icesink
 
 # This one works but too slow on BeagleBoard because it runs on ARM and do not use DSP
 #Encoding.Pipeline=v4l2src ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! theoraenc bitrate=300 ! oggmux ! appsink name=icesink








gst-launch -v filesrc location=/usr/share/ti/data/videos/test.avi ! avidemux name=demux demux.audio_00 ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! alsasink demux.video_00 ! queue !  TIViddec2 ! queue max-size-buffers=2 max-size-time=0 max-size-bytes=0 ! TIVidResize ! ffmpegcolorspace ! queue !  tidisplaysink2                                







gst-launch videotestsrc ! 'video/x-raw-yuv,width=160,height=120' ! TIVidResize ! 'video/x-raw-yuv,width=320,height=240' ! fakesink silent=TRUE



















gst-launch filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! volume mute=false volume=0.2 ! audiorate ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! videorate ! video/x-raw-yuv,framerate=15/1 ! ffmpegcolorspace ! queue ! tidisplaysink2

videotestsrc pattern=1 ! video/x-raw-yuv,framerate=\(fraction\)5/1,width=50,height=50 ! mix.








gst-launch -v videotestsrc ! video/x-raw-yuv,width=1280,height=720 ! TIVidResize ! video/x-raw-yuv,width=1280,height=720 ! tidisplaysink2 video-standard=auto  display-output=lcd

增加性能打印
gst-launch -v videotestsrc ! video/x-raw-yuv,width=1280,height=720 ! videoscale ! video/x-raw-yuv,width=480,height=640 ! dmaiperf engine-name=codecServer print-arm-load=true ! tidisplaysink2 video-standard=auto  display-output=lcd


gst-launch -v filesrc location=! video/x-raw-yuv,width=1280,height=720 ! videoscale ! video/x-raw-yuv,width=480,height=640 ! dmaiperf engine-name=codecServer print-arm-load=true ! tidisplaysink2 video-standard=auto  display-output=lcd



摄像头预览 成功
gst-launch v4l2src device=/dev/video0 ! ffmpegcolorspace ! video/x-raw-yuv,width=720,height=576 ! ffmpegcolorspace ! queue ! tidisplaysink2 -v

gst-launch -e ticapturesrc device=/dev/video0 video-standard=pal capture-input=composite ! video/x-raw-yuv,width=720,height=576,framerate=25/1 ! ffmpegcolorspace ! queue ! tidisplaysink2 -v

gst-launch v4l2src device=/dev/video0  ! video/x-raw-yuv,width=720,height=576 ! ffmpegcolorspace ! dmaiperf
 engine-name=codecServer print-arm-load=false ! queue ! tidisplaysink2 device=/dev/video1 display-output=lcd video-standard=pal

gst-launch v4l2src device=/dev/video0  always-copy=false queue-size=12 ! video/x-raw-yuv,width=720,height=576 ! ffmpegcolorspace ! queue ! tidisplaysink2 device=/dev/video1 display-output=composite video-standard=pal queue-size=5



h264编码 成功
gst-launch v4l2src device=/dev/video0  always-copy=false queue-size=12 ! video/x-raw-yuv,width=720,height=576 ! TIVidenc1 codecName=h264enc engineName=codecServer resolution=720x576 bitRate=2000000 framerate=25/1 iColorSpace=UYUV byteStream=true ! dmaiperf engine-name=codecServer print-arm-load=true ! filesink location=test.264

gst-launch v4l2src device=/dev/video0  always-copy=false queue-size=12 ! video/x-raw-yuv,width=720,height=576 ! queue ! TIPrepEncBuf numOutputBufs=3 ! TIVidenc1 codecName=h264enc engineName=codecServer resolution=720x576 bitRate=2000000 framerate=25/1 iColorSpace=UYUV byteStream=true ! dmaiperf engine-name=codecServer print-arm-load=true ! filesink location=test.264


视频采集编码存储、预览
gst-launch v4l2src device=/dev/video0  always-copy=false queue-size=12 ! video/x-raw-yuv,width=720,height=
576 ! tee name=t ! queue ! TIVidenc1 codecName=h264enc engineName=codecServer resolution=720x576 bitRate=2000000 framerate=25/1
byteStream=true contiguousInputFrame=false ! dmaiperf engine-name=codecServer print-arm-load=true ! filesink location=test.264 t
. ! queue ! tidisplaysink2 device=/dev/video1 display-output=lcd video-standard=pal queue-size=5


两路视频混合(OK)
gst-launch -e filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! audioconvert ! audioresample ! audiorate ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue ! TIVidResize numOutputBufs=5 ! video/x-raw-yuv,width=320,height=240 !videomixer name=mix ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2 videotestsrc ! video/x-raw-yuv,width=480,height=640 !mix.


gst-launch filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! audioconvert ! audioresample ! audiorate ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue ! TIVidResize numOutputBufs=5 ! video/x-raw-yuv,width=320,height=240 !videomixer name=mix ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2 filesrc location=/usr/share/ti/data/videos/davincieffect.mpeg4 ! typefind ! mpeg4videoparse ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue !mix.


一张图片+一个视频(OK)
gst-launch -e filesrc location=/usr/share/ti/data/videos/davincieffect_480p30.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! audioconvert ! audioresample ! audiorate ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue ! TIVidResize numOutputBufs=5 ! video/x-raw-yuv,width=320,height=240 !videomixer name=mix ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2 filesrc location=1.jpg ! TIImgdec1 codecName=jpegdec engineName=codecServer resolution=720x576 ! imagefreeze !TIVidResize ! videorate ! video/x-raw-yuv,framerate=1/1,width=480,height=640 ! mix.



gst-launch -e filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! audioconvert ! audioresample ! audiorate ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue ! TIVidResize numOutputBufs=5 ! video/x-raw-yuv,width=320,height=240 !videomixer name=mix ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2 filesrc location=test_720x576_UYUV.yuv ! videoparse format=4 width=720 height=576 framerate=3 ! TIVidResize ! videorate ! video/x-raw-yuv,framerate=3/1,width=480,height=640 ! mix.


采集预览+一路解码视频
gst-launch -e filesrc location=/usr/share/ti/data/videos/davincieffect_h264_aac.mp4 ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! audioconvert ! audioresample ! audiorate ! alsasink demux.video_00 ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue ! TIVidResize numOutputBufs=5 ! video/x-raw-yuv,width=320,height=240 !videomixer name=mix ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2 ticapturesrc device=/dev/video0 video-standard=pal capture-input=composite ! video/x-raw-yuv,width=720,height=576,framerate=25/1 ! mix.

网络预览(OK)
终端视频采集编码后网络发送
gst-launch v4l2src device=/dev/video0 always-copy=false queue-size=12 ! video/x-raw-yuv,width=720,height=576 ! TIVidenc1 codecName=h264enc engineName=codecServer resolution=720x576 bitRate=2000000 framerate=25/1 byteStream=true ! queue ! rtph264pay pt=96 ! udpsink host=192.168.1.44 port=5555
PC上接收(OK)
gst-launch-0.10 udpsrc port=5555 ! application/x-rtp, clock-rate=90000,payload=96 ! rtph264depay queue-delay=0 ! ffdec_h264 ! ffmpegcolorspace ! xvimagesink

 

播放一个YUV文件(OK)
gst-launch -e -v filesrc location=test_720x576_UYUV.yuv ! videoparse format=4 width=720 height=576 framerate=3 ! TIVidResize ! videorate ! video/x-raw-yuv,framerate=3/1,width=480,height=640 ! tidisplaysink2

录制一个YUV文件(OK)
gst-launch -e ticapturesrc device=/dev/video0 video-standard=pal capture-input=composite ! video/x-raw-yuv,width=720,height=576,framerate=25/1 ! ffmpegcolorspace ! queue ! filesink location=test.yuv -v

流化一张静态图片(OK)
gst-launch -v filesrc location=1.jpg ! TIImgdec1 codecName=jpegdec engineName=codecServer resolution=720x576 ! imagefreeze ! tidisplaysink2
降低帧率(OK)
gst-launch -v filesrc location=1.jpg ! TIImgdec1 codecName=jpegdec engineName=codecServer resolution=720x576 ! imagefreeze !TIVidResize ! videorate ! video/x-raw-yuv,framerate=1/1,width=480,height=640 ! dmaiperf engine-name=codecServer print-arm-load=true ! tidisplaysink2







测试同时解两路H264码流
gst-launch -e -v filesrc location=/usr/share/ti/data/videos/davincieffect_480p30.264 ! typefind ! h264parse ! queue ! TIViddec2 padAllocOutbufs=TRUE ! queue ! videomixer name=mix ! queue ! tidisplaysink2  filesrc location=/usr/share/ti/data/videos/davincieffect.mpeg4 ! typefind ! mpeg4videoparse ! queue ! TIViddec2 padAllocOutbufs=TRUE  !queue ! mix.





解一路mpeg4视频(OK)
gst-launch filesrc location=/usr/share/ti/data/videos/davincieffect.mpeg4 ! typefind ! mpeg4videoparse ! TIViddec2 padAllocOutbufs=TRUE ! queue ! tidisplaysink2  -v






解一路720*480的MP4文件 加入videomixerCPU占用率很高 why?
gst-launch -e --gst-debug=videomixer:5 filesrc location=/usr/share/ti/data/videos/davincieffect_480p30.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 padAllocOutbufs=TRUE ! queue ! videomixer ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2 -v


gst-launch -e --gst-debug=videomixer:5 filesrc location=/usr/share/ti/data/videos/davincieffect_480p30.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 padAllocOutbufs=TRUE ! queue ! videomixer ! dmaiperf engine-name=codecServer print-arm-load=true  ! tidisplaysink2 -v
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值