TVP5146 GStreamer example pipelines

From RidgeRun Developer Connection

(Difference between revisions)
Jump to:navigation, search
m
m (H264 network streaming)
 
(One intermediate revision not shown)
Line 49: Line 49:
  gst-launch -e alsasrc buffer-time=500000 slave-method=1 ! 'audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000,channels=(int)1' ! dmaienc_aac bitrate=224000 maxbitrate=224000 outputBufferSize=131072 ! priority rtpriority=3 scheduler=2 ! queue ! qtmux name=m v4l2src always-copy=false input-src=composite ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=720,height=480,pitch=736' ! dmaiaccel ! queue ! dmaiperf ! dmaienc_mjpeg outputBufferSize=1589760 ! priority rtpriority=3 scheduler=2 ! m. m. ! filesink location=file.mp4
  gst-launch -e alsasrc buffer-time=500000 slave-method=1 ! 'audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000,channels=(int)1' ! dmaienc_aac bitrate=224000 maxbitrate=224000 outputBufferSize=131072 ! priority rtpriority=3 scheduler=2 ! queue ! qtmux name=m v4l2src always-copy=false input-src=composite ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=720,height=480,pitch=736' ! dmaiaccel ! queue ! dmaiperf ! dmaienc_mjpeg outputBufferSize=1589760 ! priority rtpriority=3 scheduler=2 ! m. m. ! filesink location=file.mp4
 +
 +
== H264 network streaming ==
 +
 +
-Target
 +
 +
<pre>
 +
HOST_IP=10.111.0.4
 +
 +
gst-launch -v v4l2src always-copy=FALSE input-src=composite ! priority scheduler=1 rtpriority=40 ! "video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736" ! dmaiaccel ! dmaienc_h264 targetbitrate=800000 ! dmaiperf ! rtph264pay ! udpsink host=$HOST_IP port=3000
 +
</pre>
 +
 +
-Host
 +
 +
gst-launch udpsrc port=3000 ! 'application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)640028, sprop-parameter-sets=(string)'\"J2QAKK2IDkOYIOEMKQpEByHMEHCGFIUiA5DmCDhDCkKQwEIYwhxmMhCGAhDGEOMxkIQwEIYwhxmMhCICEZjOI8KfEfiP4j8R8R4ziMREQoEIjEcR4j5PxH8n5PiPEcRkiLQFoeyA\\,KO48sA\\=\\=\"', payload=(int)96, ssrc=(guint)2490723469, clock-base=(guint)3088944323, seqnum-base=(guint)20872' ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false
== H264 + AAC network streaming ==
== H264 + AAC network streaming ==

Current revision as of 23:46, 16 October 2012

The following are example GStreamer pipelines used to capture with the TVP5146 encoder. These were tested on the DM365 Leopardboard and EVM.

Contents

Composite output test

fbset -disable
gst-launch videotestsrc ! TIDmaiVideoSink

Live video preview

gst-launch -e v4l2src always-copy=FALSE input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=640,height=480,pitch=736' ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false

Live audio and video preview

gst-launch -e v4l2src always-copy=FALSE input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=640,height=480,pitch=736' ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false & gst-launch alsasrc ! alsasink sync=false 


H264 encoding

gst-launch -e v4l2src always-copy=FALSE num-buffers=500 input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736' ! dmaiaccel ! queue ! dmaienc_h264 copyOutput=false ! dmaiperf ! qtmux ! filesink location=file.mov


MPEG2 encoding

gst-launch -e -v v4l2src always-copy=FALSE num-buffers=500 input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736' ! dmaiaccel ! dmaienc_mpeg2 ! dmaiperf ! mpegpsmux ! filesink location=file.mpeg


MPEG4 encoding

gst-launch -e v4l2src always-copy=FALSE num-buffers=500 input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736' ! dmaiaccel ! queue ! dmaienc_mpeg2 encodingpreset=1 copyOutput=false ! dmaiperf ! qtmux ! filesink location=file.mp4


MPEG4 + AAC encoding into a MP4 container

gst-launch -e alsasrc buffer-time=500000 slave-method=1 ! 'audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100,channels=(int)2' ! dmaienc_aac bitrate=224000 maxbitrate=224000 outputBufferSize=131072 ! priority rtpriority=18 scheduler=1 ! queue ! qtmux name=m v4l2src always-copy=false input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736' ! dmaiaccel ! dmaienc_mpeg4 encodingpreset=1 outputBufferSize=1589760 targetbitrate=1800000 ! dmaiperf ! priority nice=-19 ! m. m. ! filesink location=file.pm4


H264 + AAC encoding into a MP4 container

gst-launch -v v4l2src always-copy=FALSE input-src=composite ! priority scheduler=1 rtpriority=40 ! "video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736" ! dmaiaccel ! dmaienc_h264 targetbitrate=800000 ! queue ! qtmux name=m alsasrc device=hw:0,0 ! priority scheduler=1 rtpriority=50 ! audio/x-raw-int,endianness=1234,signed=true,width=16,depth=16,rate=22050 ! dmaienc_aac bitrate=128000 maxbitrate=128000 ! m. m. ! filesink location=test.mp4


MPEG2 + AAC encoding into a MP4 container

gst-launch -e alsasrc buffer-time=500000 slave-method=1 ! 'audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000,channels=(int)1' ! dmaienc_aac bitrate=224000 maxbitrate=224000 outputBufferSize=131072 ! priority rtpriority=3 scheduler=2 ! queue ! mpegpsmux name=m v4l2src always-copy=false input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736' ! dmaiaccel ! dmaienc_mpeg2 encodingpreset=1 outputBufferSize=1589760 targetbitrate=1800000 ! dmaiperf ! priority rtpriority=3 scheduler=2 ! m. m. ! filesink location=file.mpeg


MJPEG + AAC encoding into a MP4 container

gst-launch -e alsasrc buffer-time=500000 slave-method=1 ! 'audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000,channels=(int)1' ! dmaienc_aac bitrate=224000 maxbitrate=224000 outputBufferSize=131072 ! priority rtpriority=3 scheduler=2 ! queue ! qtmux name=m v4l2src always-copy=false input-src=composite ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=720,height=480,pitch=736' ! dmaiaccel ! queue ! dmaiperf ! dmaienc_mjpeg outputBufferSize=1589760 ! priority rtpriority=3 scheduler=2 ! m. m. ! filesink location=file.mp4


H264 network streaming

-Target

HOST_IP=10.111.0.4

gst-launch -v v4l2src always-copy=FALSE input-src=composite ! priority scheduler=1 rtpriority=40 ! "video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736" ! dmaiaccel ! dmaienc_h264 targetbitrate=800000 ! dmaiperf ! rtph264pay ! udpsink host=$HOST_IP port=3000

-Host

gst-launch udpsrc port=3000 ! 'application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)640028, sprop-parameter-sets=(string)'\"J2QAKK2IDkOYIOEMKQpEByHMEHCGFIUiA5DmCDhDCkKQwEIYwhxmMhCGAhDGEOMxkIQwEIYwhxmMhCICEZjOI8KfEfiP4j8R8R4ziMREQoEIjEcR4j5PxH8n5PiPEcRkiLQFoeyA\\,KO48sA\\=\\=\"', payload=(int)96, ssrc=(guint)2490723469, clock-base=(guint)3088944323, seqnum-base=(guint)20872' ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false

H264 + AAC network streaming

-Target

HOST_IP=10.111.0.4

 gst-launch -v v4l2src always-copy=FALSE input-src=composite ! priority scheduler=1 rtpriority=40 ! "video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736" ! dmaiaccel ! dmaienc_h264 targetbitrate=800000 ! rtph264pay ! udpsink host=$HOST_IP port=3000 alsasrc device=hw:0,0 ! priority scheduler=1 rtpriority=50 ! audio/x-raw-int,endianness=1234,signed=true,width=16,depth=16,rate=22050 ! dmaienc_aac bitrate=128000 maxbitrate=128000 ! rtpmp4gpay ! udpsink name=asink host=$HOST_IP port=3002

-Host

gst-launch udpsrc port=3000 ! 'application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)640028, sprop-parameter-sets=(string)'\"J2QAKK2IDkOYIOEMKQpEByHMEHCGFIUiA5DmCDhDCkKQwEIYwhxmMhCGAhDGEOMxkIQwEIYwhxmMhCICEZjOI8KfEfiP4j8R8R4ziMREQoEIjEcR4j5PxH8n5PiPEcRkiLQFoeyA\\,KO48sA\\=\\=\"', payload=(int)96, ssrc=(guint)2490723469, clock-base=(guint)3088944323, seqnum-base=(guint)20872' ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false udpsrc port=3002 ! 'application/x-rtp, media=(string)audio, clock-rate=(int)22050, encoding-name=(string)MPEG4-GENERIC, encoding-params=(string)2, streamtype=(string)5, profile-level-id=(string)2, mode=(string)AAC-hbr, config=(string)1390, sizelength=(string)13, indexlength=(string)3, indexdeltalength=(string)3, payload=(int)96, ssrc=(guint)1513042642, clock-base=(guint)443127161, seqnum-base=(guint)48594' ! rtpmp4gdepay ! faad ! pulsesink
Navigation
Toolbox