GStreamer in Docker

0

I am trying to set up Kinesis video streaming using AWS Docket containers and following the documentation given below.

https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/examples-gstreamer-plugin.html#examples-gstreamer-plugin-docker-download After following all the steps in the above documentation, I am getting the 'gst-launch-1.0: command not found' error.

To support video streaming from a PC webcam, do I need to install GStreamer plugins in Docker?

If its yes can please share documentation for the GStreamer plugins setup in Docker

1개 답변
0
수락된 답변

Hello

  1. 'gst-launch-1.0: command not found' error This usually caused by the GStreamer (with the Kinesis Video Streams Producer SDK element as a sink in a Docker container) not setup correctly.

After you have installed docker on your laptop( using MacOS) as example here:

1.1 Authenticate your Docker Client aws ecr get-login-password --region us-west-2 | docker login -u AWS --password-stdin https://546150905175.dkr.ecr.us-west-2.amazonaws.com

1.2 Download the Docker Image for macOS sudo docker pull 546150905175.dkr.ecr.us-west-2.amazonaws.com/kinesis-video-producer-sdk-cpp-amazon-linux:latest

1.3 Run the Docker Image on macOS sudo docker run -it --network="host" 546150905175.dkr.ecr.us-west-2.amazonaws.com/kinesis-video-producer-sdk-cpp-amazon-linux /bin/bash

Docker launches the container, and presents you with a command prompt for executing commands within the container. In the container, set the environment variables using the following command:

1.3.1 export LD_LIBRARY_PATH=/opt/awssdk/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib:$LD_LIBRARY_PATH 1.3.2 export PATH=/opt/awssdk/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/bin:$PATH 1.3.3 export GST_PLUGIN_PATH=/opt/awssdk/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/lib:$GST_PLUGIN_PATH

if above steps all successful, you should be prompted bash-4.2#(example only) able to run gst-launch-1.0 command

For example:

bash-4.2# gst-inspect-1.0 kvssink Factory Details: Rank primary + 10 (266) Long-name KVS Sink Klass Sink/Video/Network Description GStreamer AWS KVS plugin Author AWS KVS kinesis-video-support@amazon.com

Plugin Details: Name kvssink Description GStreamer AWS KVS plugin Filename /opt/amazon-kinesis-video-streams-producer-sdk-cpp/build/libgstkvssink.so Version 1.0 License Proprietary Source module kvssinkpackage Binary package GStreamer Origin URL http://gstreamer.net/

Regarding the second question: 2. To support video streaming from a PC webcam, do I need to install GStreamer plugins in Docker? If its yes can please share documentation for the GStreamer plugins setup in Docker

There are multiple options, you can either use the Producer libraries to build your own app. https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-sdk.html

Or you can use the GStreamer, The Kinesis Video Streams GStreamer plugin greatly simplifies the integration of your existing GStreamer media pipeline with Kinesis Video Streams. for this solution, yes, GStreamer plugins is necessary.

you can follow this GitHub Doc for more information: https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/docs/linux.md#running-the-gst-launch-10-command-to-start-streaming-both-audio-and-video-in-raspberry-pi-and-ubuntu

https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/docs/macos.md#running-the-gst-launch-10-command-to-start-streaming-both-audio-and-raw-video-in-mac-os

AWS
답변함 2년 전
  • Thanks for your information

  • When I run the below command I am getting the expectation. I want to stream video from PC webcam. sudo docker run -it --network="host" --device=/dev/video0 546150905175.dkr.ecr.us-west-2.amazonaws.com/kinesis-video-producer-sdk-cpp-amazon-linux /bin/bash Error:- docker: Error response from daemon: error gathering device information while adding custom device "/dev/video0": no such file or directory. ERRO[0000] error waiting for container: context canceled

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠