DM365 LeopardBoard network video streaming latency test

From RidgeRun Developer Connection

Revision as of 00:40, 4 March 2011 by Tfischer (Talk | contribs)
Jump to:navigation, search

A simple test to get a feel for the amount of system latency when RTP network streaming live video from a LeopardBoard 365 to a PC. A website that displays a running stop watch (http://stopwatch.onlineclock.net) is captured by the target hardware camera, streamed over the network using RTP and displayed on the PC. The windows on the PC are arranged in such a manner that both the stop watch web page and the live video screen are visible. The PrintScreen feature is used to grab a snapshot of both screens at the same time. The difference between the time on the stopwatch and the time displayed on the live video screen shows the approximate system latency.

Contents

Bootloader, kernel, filesystem

The RidgeRun professional SDK using the DDOMPE branch for the hardware accelerated TI DMAI GStreamer plug-in.

Image loading instructions

U-boot parameter setup instructions

Output from successful boot

Loaded modules

The RidgeRun SDK uses a CMEM pool configuration designed for vide decode. The following pool values are used to work properly with video encode.

POOLS=1x524288,1x81920,2x8192,6x4096,8x96,64x56,1x2938880,4x675840,1x75840,4x1548288,1x33077952,5x1253376,3x4147200
modprobe cmemk phys_start=0x84200000 phys_end=0x88000000 pools=$POOLS
modprobe edmak.ko
modprobe irqk
modprobe dm365mmap.ko


fbset -disable
ipipe_init -d

GStreamer pipelines

Video only pipelines

DM365 sending video only pipeline

export HOST_IP=10.111.0.4

gst-launch -v -e \
   v4l2src always-copy=false ! \
   video/x-raw-yuv,format=\(fourcc\)NV12, width=1280, height=720, framerate=\(fraction\)23/1 ! \
   dmaiaccel ! \
   dmaiperf ! \
   queue ! \
   dmaienc_h264 targetbitrate=800000 encodingpreset=2 ! \
   rtph264pay ! \
   udpsink host=$HOST_IP port=10000

PC receiving video only pipeline

Before starting PC video playback, you may have to adjust the caps parameters to udpsrc in the gst-launch command below. Look around 40 lines down from the output of the target hardware gst-launch video transmit command for a line similar to:

/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)640028, sprop-parameter-sets=(string)\"J2QAKK2IDkOYIOEMKQpEByHMEHCGFIUiA5DmCDhDCkKQwEIYwhxmMhCGAhDGEOMxkIQwEIYwhxmMhCICEZjOI8KfEfiP4j8R8R4ziMREQoEIjEcR4j5PxH8n5PiPEcRkiLQCgC3I\\,KO48sA\\=\\=\", payload=(int)96, ssrc=(guint)3192754172, clock-base=(guint)71598694, seqnum-base=(guint)35200

Now adjust the following line to use the caps found in the target hardware gst-launch video transmit command.

gst-launch -v \
   udpsrc port=10000 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)640028, sprop-parameter-sets=(string)\"J2QAKK2IDkOYIOEMKQpEByHMEHCGFIUiA5DmCDhDCkKQwEIYwhxmMhCGAhDGEOMxkIQwEIYwhxmMhCICEZjOI8KfEfiP4j8R8R4ziMREQoEIjEcR4j5PxH8n5PiPEcRkiLQCgC3I\\,KO48sA\\=\\=\", payload=(int)96, ssrc=(guint)3192754172, clock-base=(guint)71598694, seqnum-base=(guint)35200' ! \
   rtph264depay ! \
   ffdec_h264 ! \
   ffmpegcolorspace ! \
   ximagesink


RidgeRun print-screen based latency results

Some of the samples were capture part way through a screen refresh, making the values hard to read, so those samples were discarded.

Stopwatch
(sec)
Live Video
(sec)
Latency
(ms)
58.31 58.22 90
34.68 34.32 360
51.91 51.85 60
04.91 04.74 170
23.62 23.45 170
39.39 39.13 260
01.22 01.14 80

Post power-on commands

ifconfig eth0 # learn address to use to telnet to target hardware
inetd

Telnet to the target hardware and run top if you are interested in monitoring the ARM CPU load.

Navigation
Toolbox