DM36x TVP5146 Video Streaming

From RidgeRun Developer Connection
Jump to: navigation, search

Introduction

This wiki page contains test details for Composite input video rtsp streaming using LI-V1365 composite input video card. Input to the LI-V1365 add on card is the composite video source. GStreamer pipelines are tested for H264 Baseline and Highline profiles. RidgeRun offers a pre-built bootable SD card image you can use or you can configure your RidgeRun evaluation or professional SDK to build the image yourself.


Tested Pipelines:

RTSP Streaming with H264 Baseline profile:


Pipleline to Run at the Target:

gst-launch v4l2src input-src=composite always-copy=FALSE num-buffers=5000 ! video/x-raw-yuv,format=\(fourcc\)NV12,width=640,height=480 ! / 
            queue ! dmaienc_h264 targetbitrate=800000 idrinterval=90 intraframeinterval=30 ratecontrol=2 encodingpreset=3 / 
                   profile=66 level=31 t8x8intra=0 t8x8inter=0 entropy=0 seqscaling=0 ddrbuf=true ! rtph264pay ! / 
                                             udpsink port=$PORT host=$CLIENT_IP 

Note 1: CLIENT_IP, PORT is the IP Address and Port of the PC where the video is being stream.

Note 2: Above pipeline can be tested for H264 Highline profile by setting 'profile' element to 100 instead from 66


Pipeline to Run at the Host/Client side:


gst-launch udpsrc port=3000 ! 'application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, /
sprop-parameter-sets=(string)"Z0KAHtoCgPRA\,aM48gA\=\=", payload=(int)96, ssrc=(uint)836986607, clock-base=(uint)3991456733, /
seqnum-base=(uint)31144' ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false


Testing using the VLC Player at Host side:


Once we run the pipeline at the target, video can be streamed at the host pc by opening the sdp file through the VLC player.

Contents of sdp file:

v=0
o=- 0 0 IN IP4 $(Host_ip)
c=IN IP4 $(Host_ip)
s=TATA H264 STREAM
m=video 3000 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 media=video; clock-rate=90000; encoding-name=H264; sprop-parameter-sets=Z0KAHtoCgPRA\,aM48gA\=\=


Video and Audio streaming with H264 Baseline Profile:


Pipleline to Run at the Target:

gst-launch -v v4l2src always-copy=FALSE input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=640,height=480' ! dmaiaccel ! /
   dmaienc_h264 outputBufferSize=5529600 targetbitrate=1000000 idrinterval=90 intraframeinterval=30 ratecontrol=2 encodingpreset=3 /
       profile=66 level=30 t8x8intra=0 t8x8inter=0 entropy=0 seqscaling=0 ddrbuf=true ! rtph264pay ! udpsink host=$CLIENT_IP /
         port=$VPORT alsasrc latency_time=30000 ! '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=$CLIENT_IP port=$VPORT

Note 1: CLIENT_IP, PORT (VPORT is the port for Video streaming and APORT is the port for the Audio streaming) is the IP Address and Port of the PC where the video,Audio is being streamed.

Note 2:  Above pipeline can be tested for H264 Highline profile by setting 'profile' element to 100 instead from 66


Pipeline to Run at the Host/Client side:

gst-launch udpsrc port=3000 ! 'application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,/
sprop-parameter-sets=(string)"Z0KAHtoCgPRA\,aM48gA\=\=",payload=(int)96, ssrc=(uint)836986607, clock-base=(uint)3991456733, /
seqnum-base=(uint)31144' ! rtph264depay ! ffdec_h264 ! xvimagesink sync=false 


SDK Configurations for Video Streaming through LI-V1365:

Video Output (Composite) --->
  Maximum Video Output Buffer Size (480P) ---> 
  Maximum Video Input Buffer Size (720P) ---> 
  
Proprietary Software ---->
(0X2D00000) Memory reserved for DVSDK 
(0x1000000) Amount of reserved memory for cmemk

Enabling TVP514x video decoder:

Goto 'Kernel Configurations' -> 'Device Drivers' -> 'Multimedia Support' ->'Video Capture Adapters' -> 'Encoders/decoders and other helper chips'->

Enable

<*> Texas Instruments TVP514x video decoder