DM8168 DM816x Dual Video 1080P60 Streaming
|
|
Introduction
Using the TI DM8168 EVM, you can demonstrate dual capture 1080p@60fps + audio AAC + dual RTSP where the audio comes from a single source and is streamed with both videos. We used the flexible GStreamer streaming media framework for this demo.
For this demo, we used:
- RidgeRun professional DM8168 Linux SDK
- Dual streaming SDK add-on
- GStreamer Multistream RTSP SDK add-on
Hardware setup
Two playstation 3 were used to feed the DM816x-EVM with 1080p@60 through the component inputs present in the EVM. At the same time, the component cables available for PlayStation 3 has two audio outputs (RCA cables) and since the EVM has just one audio input line a cable was used to convert the two RCA audio cables to the one needed by the DM8168 EVM in the input line.
Finally, the streaming were received by computers using VLC.
Software setup
The simplified GStreamer pipeline
gst-launch v4l2src device=/dev/video5 ! omx_h264enc ! rr_h264parser singleNalu=true ! rtspsink name=sinkB \ alsasrc ! tee name=t ! omx_aacenc ! aacparse ! .sinkB \ \ v4l2src device=/dev/video0 ! omx_h264enc ! rr_h264parser singleNalu=true ! rtspsink name=sinkA \ .t ! omx_aacenc ! aacparse ! .sinkA
Which basically says we have two independent A/V pipelines, both getting encoded and passed to the multistream RTSP sink element. We cheat in that we reuse ALSA source since the hardware only has one audio input. With hardware that that two independent audio inputs, we would just tell ALSA source which audio source to use. With GStreamer you can easily use UDPsink, FILEsink, APPsink, or many, many other standard GStreamer elements. If you didn't know, every Ubuntu ships using GStreamer as it streaming media framework.
The real GStreamer has all the encoding and buffer details described, making it a bit of an unweildly beast to get your hand around if you are new to GStreamer
gst-launch rtspsink name=sinkB service=3005 v4l2src device=/dev/video5 always-copy=false queue-size=8 ! 'video/x-raw-yuv,format=(fourcc)NV12,width=1920,height=1080,framerate=(fraction)60/1' ! omxbufferalloc numBuffers=8 ! \ omx_h264enc force-idr-period=60 i-period=60 output-buffers=10 input-buffers=10 profile=8 bitrate=10000000 ! gstperf name=vB ! rr_h264parser singleNalu=true ! video/x-h264, mapping=/streamB ! sinkB. alsasrc latency-time=20000 buffer-time=800000 ! \ 'audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000, channels=(int)2' ! tee name=t t. ! queue ! omx_aacenc output-format=4 ! queue ! aacparse ! audio/mpeg, mapping=/streamB ! \ sinkB. rtspsink name=sinkA service=3000 v4l2src device=/dev/video0 always-copy=false queue-size=8 ! 'video/x-raw-yuv,format=(fourcc)NV12,width=1920,height=1080,framerate=(fraction)60/1' ! omxbufferalloc numBuffers=8 ! \ omx_h264enc force-idr-period=60 i-period=60 output-buffers=10 input-buffers=10 profile=8 bitrate=10000000 ! gstperf name=vA ! rr_h264parser singleNalu=true ! video/x-h264, mapping=/streamA ! sinkA. t. ! queue ! omx_aacenc output-format=4 ! \ queue ! aacparse ! audio/mpeg, mapping=/streamA ! sinkA.
Example performance results
We included the gstperf element in both video streams so we could display some performance information. In one video stram gstperf output is labeld vA and in the other stream it is labeled vB.
vA: frames: 12472 current: 59.76 average: 59.59 arm-load: 47 vB: frames: 12582 current: 59.71 average: 59.94 arm-load: 42 vA: frames: 12533 current: 60.21 average: 59.60 arm-load: 48 vB: frames: 12643 current: 60.25 average: 59.95 arm-load: 52 vA: frames: 12594 current: 59.72 average: 59.60 arm-load: 46 vB: frames: 12703 current: 59.78 average: 59.95 arm-load: 46 vA: frames: 12655 current: 60.25 average: 59.60 arm-load: 46 vB: frames: 12764 current: 60.26 average: 59.95 arm-load: 48 vA: frames: 12716 current: 59.79 average: 59.60 arm-load: 48 vB: frames: 12824 current: 59.88 average: 59.95 arm-load: 40 vA: frames: 12777 current: 60.22 average: 59.60 arm-load: 43 vB: frames: 12884 current: 59.65 average: 59.94 arm-load: 45 vA: frames: 12838 current: 60.24 average: 59.61 arm-load: 43 vB: frames: 12945 current: 60.30 average: 59.95 arm-load: 46 vA: frames: 12898 current: 59.65 average: 59.61 arm-load: 45 vB: frames: 13005 current: 59.55 average: 59.94 arm-load: 38 vA: frames: 12959 current: 60.32 average: 59.61 arm-load: 46
You can see the ARM load is under 50% with two audio and two video streams being encoded and streamed over the network interface at 1080p@60fps.
For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.
Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.