GStreamer in Docker for Windows.

Andrés Meseguer Valenzuela anmeva1 at etsid.upv.es
Mon Dec 7 10:57:03 UTC 2020


Dear all,
I am trying to create a Linux image to execute containers with  
gstreamer pipelines in Docker Desktop (for Windows).
For example, using the following 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

I try to display my webcam but the problem is that despite this image  
builds, when I run it, the prompt returns this:

> docker run -it --net=host -e --privileged  -v  
> /dev/video0:/dev/video0 fivecomm/webcam   
> >$HOME/.Xauthority:/root/.Xauthority                                  
>                                                                    
> Setting pipeline to PAUSED ...                                        
>                                                    ERROR: from  
> element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Could not  
> initialise X output                     Additional debug info:        
>                                                                       
>                       ../sys/ximage/ximagesink.c(867):  
> gst_x_image_sink_xcontext_get ():  
> /GstPipeline:pipeline0/GstXImageSink:ximagesink0:    Could not open  
> display                                                               
>                                     ERROR: pipeline doesn't want to  
> preroll.                                                              
>                    Failed to set pipeline to PAUSED.                  
>                                                                       
>  Setting pipeline to NULL ...                                         
>                                                     Freeing pipeline  
> ...

Hence, I would like to know how to display in Windows.
Thanks for your time.

Regards,
Andrés.




More information about the gstreamer-devel mailing list