using cefsrc in a docker container with GPU acceleration

Sid Sethupathi sid.sethupathi at gmail.com
Sat Jul 22 13:54:20 UTC 2023


Has anyone run cefsrc in a docker container with Nvidia GPU acceleration
working? I have a Docker setup that works for using other Nvidia
accelerated gstreamer elements (like nvenc) but I'm unable to get cefsrc to
be hardware accelerated using a similar setup. When I load "about://gpu",
this is what I see:

[image: image.png]

I'm guessing it is because xvfb-run is being used as the X environment that
CEF needs, and xvfb-run doesn't support hardware acceleration. Has anyone
gotten something like x11docker to work?

For reference, I'm running the container with `--gpus all` and can use
nvidia-smi from within the container. I've set "gpu=true" on cefsrc as
well. This is the entrypoint I'm using

"xvfb-run -s '-screen 0 1920x1080x24' gst-launch-1.0 rtpbin name=rtpbin
mpegtsmux name=mux ! rtpmp2tpay ! rtpbin.send_rtp_sink_0
rtpbin.send_rtp_src_0 ! udpsink host=$MCAST_GROUP port=$RTP_PORT ttl-mc=16
rtpbin.send_rtcp_src_0 ! udpsink host=$MCAST_GROUP port=$RTCP_PORT
ttl-mc=16 audiotestsrc wave=4 ! avenc_mp2 ! mux. cefsrc gpu=true
sandbox=false do-timestamp=true log-severity=1
chrome-extra-flags="disable-component-update" url="about://gpu" !
"video/x-raw,width=1280,height=720, framerate=30/1" ! cefdemux name=d
d.video ! videoconvert ! video/x-raw,width=1280,height=720 ! x264enc
threads=0 bitrate=3000 tune=zerolatency key-int-max=30 !
"video/x-h264,profile=(string)main" ! queue ! mux."

Thanks,
Sid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230722/f3a7ec82/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1218388 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230722/f3a7ec82/attachment-0001.png>


More information about the gstreamer-devel mailing list