Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display

Table of Contents

Introduction

This page dedicated to bringing up and validation of

...

Continuous video recording functionality in R-Pi Zero. 

CVR uses Kinesis Video Streams and supporting 24/7 video recording support.

...

Allows the feature of storing the recorded content locally or in any AWS server.

Required Equipment

  • Raspberry Pi 0 Device
  • SD Card
  • Power Cable
  • OTG Cable
  • Standard USB keyboard
  • Mini HDMI connector
  • HDMI Cable
  • Television set/monitor with HDMI input

System Setup

Image Modified


Please refer below link for RPI-0 Environment setup

...

RDK-C Environment Setup

Yocto Build Steps

Code Block
languagebash
titleBuild steps
$ repo init -u "https://code.rdkcentral.com/r/rdkcmf/manifests" -m rdkc-nosrc.xml -b master

...


$ repo sync

...


$ source meta-cmf-raspberrypi/setup-environment

...


	select meta-cmf-raspberrypi/conf/machine/raspberrypi0-rdk-camera.conf

...


$ bitbake rdk-generic-camera-image

Image Flash Procedure

Code Block
languagebash
titleImage Flash step
$ sudo dd if="Image Name" of="Device Name" bs=4M

...



Example:

...


sudo dd if=rdk-generic-camera-image_default_20200130060729.rootfs.rpi-sdimg of=/dev/sdb bs=4M

CVR Validation Procedure

STEP 1:

Can't able to validate without AWS account. so,Refer below link to create AWS account.

https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/gs-account.html

After AWS account creation ,Refer same link to create Access key ID ,Secret Access Key and Region Name.

STEP 2:

Follow below steps to create kinese video stream or refer below link.

https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/gs-createstream.html

Code Block
languagebash
titleVideo Stream creation step
1.Sign in to the AWS Management Console and open the Kinesis console at https://console.aws.amazon.com/kinesis.
2.On the Video streams page, choose Create video stream.
3.On the Create a new video stream page, type ExampleStream for the stream name. Leave the Default configuration radio button selected.
4.Choose Create video stream.
5.After Kinesis Video Streams creates the stream, review the details on the ExampleStream page.


STEP 3:

Add require SSID and PSK in /etc/wpa_supplicant.conf file in below format

...

ssid="username"

psk="password"

}

Image Removed

Code Block
languagebash
titleConsole output
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
ssid="RDK"
psk="Comcast1"
}


STEP 4STEP 2:

Reboot the Target

After Reboot don't do step 1 and 2.

Note : Step 1 & 2 is only applicable for fresh target boot-up with new image.

STEP 34:

WiFi connection is must needed for CVR validation for to move TS content from RPI device into local PC for to play TS content in VLC PlayerRMS validation.

Check WiFi connection by using below command.

ifconfig

Code Block

...

language

STEP 4:

check loaded module by using below command

lsmod

Image Removed

STEP 5:

check camera device there or not by using below command

ls /dev/video0

Image Removed

STEP 6:

check mediastreamer binary running status in RPI by using below command

ps -Af | grep mediastreamer

Image Removed

STEP 7:

Run CVR binary in background by using below command.

cvr_daemongst_kvs &

Image Removed

STEP 8:

Check .ts file is available or not in /tmp/cvr folder in RPI device.

Image Removed

STEP 9:

Move .ts file from /tmp/cvr/ folder into local PC with WiFi connection by using below command and Play .ts file in VLC player

scp root@WiFI_IP:/tmp/cvr/TS_FileName .

Example : scp root@192.168.2.70:/tmp/cvr/2020-03031:12:24:27.ts .

Demo - RDK Camera Continuous Video Recording (CVR) Support in RPI - 2020 - M4

Limitations

...

bash
titleConsole output
root@raspberrypi0-rdk-camera:~# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:87 errors:0 dropped:0 overruns:0 frame:0
          TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4552 (4.4 KiB)  TX bytes:4552 (4.4 KiB)

wlan0     Link encap:Ethernet  HWaddr B8:27:EB:2E:72:2B  
          inet addr:192.168.43.246  Bcast:192.168.43.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2893 (2.8 KiB)  TX bytes:5887 (5.7 KiB)


STEP 5:

Export Created Stream Name,Access key id, Secret access key and Region name.

export STREAM_NAME="samplestream"

export ACCESS_KEY="XXXXXXXXXXXXXX"

export SECRET_KEY="yyyyyyyyyyyyyyyyyyyyyyyy"

export AWS_DEFAULT_REGION="eu-west-1"

Code Block
languagebash
titleConsole output

STEP 6:

Run cvr-gst-rpi binary to transmit data into AWS server.

cvr-gst-rpi

Code Block
languagebash
titleConsole output
root@raspberrypi0-rdk-camera:~# cvr-gst-rpi 
Conf file /etc/debug.ini open success
rdk_logger_init /etc/debug.ini Already Stack Level Logging processed... not processing again.
200430-10:37:21.578891 [mod=GSTREAMER, lvl=DEBUG] [tid=7305] /usr/src/debug/cvr/git-r0/git/cvr-gst-rpi/cvr_gst_rpi.c(176):Element linking succes
s for pipelin


STEP 7:

Able to streaming content in your AWS account.

Image Added

...