From 2d2dac672465f93a7cbc578a22f17ccb38a7799b Mon Sep 17 00:00:00 2001 From: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:16:53 -0700 Subject: [PATCH] Remove '$' from ReadMe commands (#1083) * Remove '$' from ReadMe commands * Reomve "$ linux.md * Remove "$" from macos.md * Remove "$" from raspberry-pi.md --- README.md | 4 ++-- docs/linux.md | 22 +++++++++++----------- docs/macos.md | 20 ++++++++++---------- docs/raspberry-pi.md | 40 ++++++++++++++++++++-------------------- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 4f64c8c1..ad9ca14d 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,11 @@ If you do wish to link to existing libraries you can do `cmake .. -DBUILD_DEPEND Libraries needed to build producer are: Curl, Openssl and Log4cplus. If you want to build the gstreamer plugin you will need to have gstreamer in your system. On Mac OS you can get the libraries using homebrew ``` -$ brew install pkg-config openssl cmake gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly log4cplus gst-libav +brew install pkg-config openssl cmake gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly log4cplus gst-libav ``` On Ubuntu and Raspberry Pi OS you can get the libraries by running ``` -$ sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools ``` ### Setup desired log level: Set up the desired log level. The log levels currently available with `log4cplus` are: diff --git a/docs/linux.md b/docs/linux.md index 9f568f2c..91dded6d 100644 --- a/docs/linux.md +++ b/docs/linux.md @@ -9,8 +9,8 @@ Define AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables with the AWS access key id and secret key: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey ``` optionally, set `AWS_SESSION_TOKEN` if integrating with temporary token and `AWS_DEFAULT_REGION` for the region other than `us-west-2` @@ -47,22 +47,22 @@ Device found: ###### Running the `gst-launch-1.0` command to start streaming from a RTSP camera source. ``` -$ gst-launch-1.0 -v rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name=YourStreamName storage-size=128 +gst-launch-1.0 -v rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name=YourStreamName storage-size=128 ``` **Note:** If you are using **IoT credentials** then you can pass them as parameters to the gst-launch-1.0 command ``` -$ gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases" +gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases" ``` You can find the RTSP URL from your IP camera manual or manufacturers product page. For more information on how to set up IoT/role policies and role-aliases, please refer to [iot-based-credential-provider](auth.md#iot-based-credential-provider) and https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-iot.html. ###### Running the `gst-launch-1.0` command to start streaming from USB camera source in **Ubuntu**. ``` -$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc bframes=0 key-int-max=45 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" +gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc bframes=0 key-int-max=45 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" ``` ###### Running the `gst-launch-1.0` command to start streaming from USB camera source which has h264 encoded stream already: ``` -$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" +gst-launch-1.0 -v v4l2src device=/dev/video0 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" ``` ###### Running the `gst-launch-1.0` command to upload video from HLS .m3u8 playlist. @@ -115,7 +115,7 @@ gst-launch-1.0 -v v4l2src device=/dev/video0 ! h264parse ! video/x-h264,stream-f **Note:** Supply the matching iot-thing-name (that the certificate points to) and we can stream to multiple stream-names (without the stream-name needing to be the same as the thing-name) using the same certificate credentials. iot-thing-name and stream-name can be completely different as long as there is a policy that allows the thing to write to the kinesis stream ``` -$ gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! +gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! h264parse ! kvssink name=aname storage-size=512 iot-certificate="iot-certificate,endpoint=xxxxx.credentials.iot.ap-southeast-2.amazonaws.com,cert-path=/greengrass/v2/thingCert.crt,key-path=/greengrass/v2/privKey.key,ca-path=/greengrass/v2/rootCA.pem,role-aliases=KvsCameraIoTRoleAlias,iot-thing-name=myThingName123" aws-region="ap-southeast-2" log-config="/etc/mtdata/kvssink-log.config" stream-name=myThingName123-video1 ``` @@ -192,8 +192,8 @@ For additional examples on using Kinesis Video Streams Java SDK and Kinesis Vid **Note:** Please set the credentials before running the unit tests: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey optionally, set AWS_SESSION_TOKEN if integrating with temporary token and AWS_DEFAULT_REGION for the region other than us-west-2 ``` @@ -204,8 +204,8 @@ The executable for **unit tests** will be built as `./tst/producer_test` inside **Note:** Please set the credentials before running the unit tests: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey optionally, set AWS_SESSION_TOKEN if integrating with temporary token and AWS_DEFAULT_REGION for the region other than us-west-2 ``` diff --git a/docs/macos.md b/docs/macos.md index 5e9bb7a5..430a204b 100644 --- a/docs/macos.md +++ b/docs/macos.md @@ -3,8 +3,8 @@ Define AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables with the AWS access key id and secret key: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey ``` optionally, set `AWS_SESSION_TOKEN` if integrating with temporary token and `AWS_DEFAULT_REGION` for the region other than `us-west-2` @@ -25,20 +25,20 @@ Device found: ###### Running the `gst-launch-1.0` command to start streaming from RTSP camera source. ``` -$ gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" +gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" ``` **Note:** If you are using **IoT credentials** then you can pass them as parameters to the gst-launch-1.0 command ``` -$ gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases" +gst-launch-1.0 rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases" ``` You can find the RTSP URL from your IP camera manual or manufacturers product page. ###### Running the `gst-launch-1.0` command to start streaming from camera source in **Mac-OS**. ``` -$ gst-launch-1.0 autovideosrc ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! vtenc_h264_hw allow-frame-reordering=FALSE realtime=TRUE max-keyframe-interval=45 bitrate=500 ! h264parse ! video/x-h264,stream-format=avc,alignment=au,profile=baseline ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" +gst-launch-1.0 autovideosrc ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! vtenc_h264_hw allow-frame-reordering=FALSE realtime=TRUE max-keyframe-interval=45 bitrate=500 ! h264parse ! video/x-h264,stream-format=avc,alignment=au,profile=baseline ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" ``` ###### Running the `gst-launch-1.0` command to start streaming both audio and raw video in **Mac-OS**. @@ -63,7 +63,7 @@ gst-launch-1.0 -v avfvideosrc device-index=1 ! videoconvert ! vtenc_h264_hw allo **Note:** Supply a the matching iot-thing-name (that the certificate points to) and we can stream to multiple stream-names (without the stream-name needing to be the same as the thing-name) using the same certificate credentials. iot-thing-name and stream-name can be completely different as long as there is a policy that allows the thing to write to the kinesis stream ``` -$ gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! +gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! h264parse ! kvssink name=aname storage-size=512 iot-certificate="iot-certificate,endpoint=xxxxx.credentials.iot.ap-southeast-2.amazonaws.com,cert-path=/greengrass/v2/thingCert.crt,key-path=/greengrass/v2/privKey.key,ca-path=/greengrass/v2/rootCA.pem,role-aliases=KvsCameraIoTRoleAlias,iot-thing-name=myThingName123" aws-region="ap-southeast-2" log-config="/etc/mtdata/kvssink-log.config" stream-name=myThingName123-video1 ``` @@ -171,8 +171,8 @@ For additional examples on using Kinesis Video Streams Java SDK and Kinesis Vid **Note:** Please set the credentials before running the unit tests: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey optionally, set AWS_SESSION_TOKEN if integrating with temporary token and AWS_DEFAULT_REGION for the region other than us-west-2 ``` @@ -183,8 +183,8 @@ The executable for **unit tests** will be built as `./tst/producer_test` inside **Note:** Please set the credentials before running the unit tests: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey optionally, set AWS_SESSION_TOKEN if integrating with temporary token and AWS_DEFAULT_REGION for the region other than us-west-2 ``` diff --git a/docs/raspberry-pi.md b/docs/raspberry-pi.md index 4d835b0b..ff4aa960 100644 --- a/docs/raspberry-pi.md +++ b/docs/raspberry-pi.md @@ -28,14 +28,14 @@ Ensure you run `cmake` with `BUILD_GSTREAMER_PLUGIN=ON` option from build direct Define AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables with the AWS access key id and secret key: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey ``` optionally, set `AWS_SESSION_TOKEN` if integrating with temporary token and `AWS_DEFAULT_REGION` for the region other than `us-west-2` ##### Set GST_PLUGIN_PATH in environment variables ``` -$ export GST_PLUGIN_PATH=>SDK_FOLDER_PATH/build +export GST_PLUGIN_PATH=>SDK_FOLDER_PATH/build ``` ###### Discovering audio and video devices available in your system. @@ -71,28 +71,28 @@ Device found: ###### Running the `gst-launch-1.0` command to start streaming from a RTSP camera source. ``` -$ gst-launch-1.0 -v rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name=YourStreamName storage-size=128 +gst-launch-1.0 -v rtspsrc location=rtsp://YourCameraRtspUrl short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name=YourStreamName storage-size=128 ``` **Note:** If you are using **IoT credentials** then you can pass them as parameters to the gst-launch-1.0 command ``` -$ gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases" +gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name="iot-stream" iot-certificate="iot-certificate,endpoint=endpoint,cert-path=/path/to/certificate,key-path=/path/to/private/key,ca-path=/path/to/ca-cert,role-aliases=role-aliases" ``` You can find the RTSP URL from your IP camera manual or manufacturers product page. ###### Running the `gst-launch-1.0` command to start streaming from USB camera source which has h264 encoded stream already: ``` -$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" +gst-launch-1.0 -v v4l2src device=/dev/video0 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" ``` ###### Running the `gst-launch-1.0` command to start streaming from camera source: ``` -$ gst-launch-1.0 -v v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! omxh264enc periodicty-idr=45 inline-header=FALSE ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName access-key="YourAccessKey" secret-key="YourSecretKey" +gst-launch-1.0 -v v4l2src do-timestamp=TRUE device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! omxh264enc periodicty-idr=45 inline-header=FALSE ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName access-key="YourAccessKey" secret-key="YourSecretKey" ``` or use a different encoder ``` -$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc bframes=0 key-int-max=45 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" +gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc bframes=0 key-int-max=45 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=YourStreamName storage-size=128 access-key="YourAccessKey" secret-key="YourSecretKey" ``` @@ -176,7 +176,7 @@ gst-launch-1.0 -v filesrc location="YourAudioVideo.ts" ! tsdemux name=demux ! q **Note:** Supply a the matching iot-thing-name (that the certificate points to) and we can stream to multiple stream-names (without the stream-name needing to be the same as the thing-name) using the same certificate credentials. iot-thing-name and stream-name can be completely different as long as there is a policy that allows the thing to write to the kinesis stream ``` -$ gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! +gst-launch-1.0 -v rtspsrc location="rtsp://YourCameraRtspUrl" short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! h264parse ! kvssink name=aname storage-size=512 iot-certificate="iot-certificate,endpoint=xxxxx.credentials.iot.ap-southeast-2.amazonaws.com,cert-path=/greengrass/v2/thingCert.crt,key-path=/greengrass/v2/privKey.key,ca-path=/greengrass/v2/rootCA.pem,role-aliases=KvsCameraIoTRoleAlias,iot-thing-name=myThingName123" aws-region="ap-southeast-2" log-config="/etc/mtdata/kvssink-log.config" stream-name=myThingName123-video1 ``` @@ -219,8 +219,8 @@ For additional examples on using Kinesis Video Streams Java SDK and Kinesis Vid **Note:** Please set the credentials before running the unit tests: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey optionally, set AWS_SESSION_TOKEN if integrating with temporary token and AWS_DEFAULT_REGION for the region other than us-west-2 ``` @@ -231,8 +231,8 @@ The executable for **unit tests** will be built as `./tst/producer_test` inside **Note:** Please set the credentials before running the unit tests: ``` -$ export AWS_ACCESS_KEY_ID=YourAccessKeyId -$ export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey +export AWS_ACCESS_KEY_ID=YourAccessKeyId +export AWS_SECRET_ACCESS_KEY=YourSecretAccessKey optionally, set AWS_SESSION_TOKEN if integrating with temporary token and AWS_DEFAULT_REGION for the region other than us-west-2 ``` @@ -292,11 +292,11 @@ The projects depend on the following open source components. Running `CMake` wil ##### Raspberry PI failure to load the camera device. To check this is the case run `ls /dev/video*` - it should be file not found. The remedy is to run the following: ``` -$ls /dev/video* +ls /dev/video* {not found} ``` ``` -$vcgencmd get_camera +vcgencmd get_camera ``` Example output: ``` @@ -305,20 +305,20 @@ supported=1 detected=1 if the driver does not detect the camera then * Check for the camera setup and whether it's connected properly -* Run firmware update `$ sudo rpi-update` and restart +* Run firmware update `sudo rpi-update` and restart ``` -$sudo modprobe bcm2835-v4l2 +sudo modprobe bcm2835-v4l2 ``` ``` -$ls /dev/video* +ls /dev/video* {lists the device} ``` ##### Raspberry PI timestamp/range assertion at runtime. Update the Raspberry PI firmware. ``` -$ sudo rpi-update -$ sudo reboot +sudo rpi-update +sudo reboot ``` * Raspberry PI GStreamer assertion on gst_value_set_fraction_range_full: assertion 'gst_util_fraction_compare (numerator_start, denominator_start, numerator_end, denominator_end) < 0' failed. The uv4l service running in the background. Kill the service and restart the sample app.