gstreamer via dockerfile
Craig Carey
cynitec at gmail.com
Thu Dec 3 10:40:04 UTC 2020
You need to mount your video device, something like:
docker run ... --privileged -v /dev/video0:/dev/video0 ...
>
On Thu, Dec 3, 2020 at 10:20 AM Andrés Meseguer Valenzuela <
anmeva1 at etsid.upv.es> wrote:
> Hi, I am trying to use gstreamer via docker.
> My purpose is that my container installs GStreamer and then, it runs a
> gstreamer pipeline such as displaying
> my webcam for example.
>
> I have writen this dockerfile:
>
> FROM ubuntu:20.10
>
> RUN apt-get update && \
> apt-get -y install sudo
>
> RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser
> docker sudo
>
> CMD /bin/bash
>
> RUN sudo -s apt-get update
> RUN apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base
> gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
> gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools
> gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3
> gstreamer1.0-qt5 gstreamer1.0-pulseaudio -y
>
> ENTRYPOINT gst-launch-1.0 v4l2src device=/dev/video0 !
> 'video/x-raw,width=640,height=480,framerate=30/1' ! videoconvert !
> ximagesink
>
> USER docker
>
> It builds, but once I run the image with flags (--net=host -e DISPLAY
> -v $HOME/.Xauthority:/root/.Xauthority )
> it returns an error:
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Cannot
> identify device '/dev/video0'.
>
> I know that this is a problem of my dockerfile because this GStreamer
> pipeline works in local.
> Hence, I would like to know how to solve this.
> Thanks for your valuable time.
> Regards,
> Andrés.
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201203/68653948/attachment.htm>
More information about the gstreamer-devel
mailing list