gst-launch-1.0 videotestsrc !autovideosink(对我不起作用!)

Ken*_*Low 3 gstreamer

我使用的是 Ubuntu 18.04.3 LTS,并按照https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c上列出的指南安装 gstreamer。

我认为我的安装有问题,因为我没有看到此管道的任何测试源:

u2@u2:~$ gst-launch-1.0 videotestsrc ! autovideosink

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'autovideosink0-actual-sink-vaapi': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm2";
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Run Code Online (Sandbox Code Playgroud)

我希望至少能够看到视频测试源。

Luk*_*e L 8

与您遇到同样的问题:autovideosink 可以播放视频,但不会在窗口中显示它。尝试:

gst-launch-1.0 videotestsrc ! ximagesink

另外,glimagesink 也适合我们。

希望了解更多工作水槽元件。

*要播放本地 .mp4 视频,请使用:

gst-launch-1.0 playbin uri=file:///home/path/to/your/video.mp4 video-sink="ximagesink"

**要使 autovideosink 正常工作,请尝试:

sudo apt-get remove gstreamer1.0-vaapi
Run Code Online (Sandbox Code Playgroud)

说实话,初级以上的装备挡住了我们一段时间,我们很难解决这么简单的问题:)

希望对所有gstreamer新手有帮助!