Docker 中的 GStreamer = 叠加层不起作用
GStreamer in Docker = overlays not working
我需要将带有时钟覆盖的视频从服务器流式传输到客户端。服务器必须在 Docker 图像内。
这是服务器命令:
gst-launch-1.0 \
v4l2src device=/dev/video0 \
! videorate ! videoscale \
! clockoverlay shaded-background=true font-desc="Sans 38" \
! video/x-raw,format=I420,width=640,height=360,framerate=25/1 \
! jpegenc ! rtpjpegpay \
! udpsink host=localhost port=5000
这是客户:
gst-launch-1.0 -v \
udpsrc port=5000 \
! application/x-rtp, encoding-name=JPEG, framerate=25/1 \
! rtpjpegdepay ! jpegdec ! videoconvert ! ximagesink
如您所见,效果很好。但是当 运行 来自 Docker 图像的服务器时,我收到此警告并且进程停止:
WARNING: erroneous pipeline: no element "clockoverlay"
这是我的 Docker 文件:
from ubuntu:16.04
MAINTAINER Me
RUN apt-get update && apt-get install --no-install-recommends -y \
openjdk-8-jre \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-tools \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT exec \
gst-launch-1.0 \
v4l2src device=/dev/video0 \
! videorate ! videoscale \
! clockoverlay shaded-background=true font-desc="Sans 38" \
! video/x-raw,format=I420,width=640,height=360,framerate=25/1 \
! jpegenc ! rtpjpegpay \
! udpsink host=localhost port=5000
我可能遗漏了什么?我可以添加任何依赖项吗?文本覆盖也不起作用,所以我怀疑是字体问题并尝试安装 fonts-liberation,但没有成功。
编辑:我登录了我的 docker 图像,gst-inspect-1.0 clockoverlay 回答
No such element or plugin 'clockoverlay'
我还需要安装 gstreamer1.0-x。
我需要将带有时钟覆盖的视频从服务器流式传输到客户端。服务器必须在 Docker 图像内。
这是服务器命令:
gst-launch-1.0 \
v4l2src device=/dev/video0 \
! videorate ! videoscale \
! clockoverlay shaded-background=true font-desc="Sans 38" \
! video/x-raw,format=I420,width=640,height=360,framerate=25/1 \
! jpegenc ! rtpjpegpay \
! udpsink host=localhost port=5000
这是客户:
gst-launch-1.0 -v \
udpsrc port=5000 \
! application/x-rtp, encoding-name=JPEG, framerate=25/1 \
! rtpjpegdepay ! jpegdec ! videoconvert ! ximagesink
如您所见,效果很好。但是当 运行 来自 Docker 图像的服务器时,我收到此警告并且进程停止:
WARNING: erroneous pipeline: no element "clockoverlay"
这是我的 Docker 文件:
from ubuntu:16.04
MAINTAINER Me
RUN apt-get update && apt-get install --no-install-recommends -y \
openjdk-8-jre \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-tools \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT exec \
gst-launch-1.0 \
v4l2src device=/dev/video0 \
! videorate ! videoscale \
! clockoverlay shaded-background=true font-desc="Sans 38" \
! video/x-raw,format=I420,width=640,height=360,framerate=25/1 \
! jpegenc ! rtpjpegpay \
! udpsink host=localhost port=5000
我可能遗漏了什么?我可以添加任何依赖项吗?文本覆盖也不起作用,所以我怀疑是字体问题并尝试安装 fonts-liberation,但没有成功。
编辑:我登录了我的 docker 图像,gst-inspect-1.0 clockoverlay 回答
No such element or plugin 'clockoverlay'
我还需要安装 gstreamer1.0-x。