benutze Gstreamer vaapi via ssh

436
ABerto

Guten Abend. Ich habe diese Situation. Ich entwickle eine Videobearbeitungsanwendung auf einem Desktop-PC mit installiertem Ubuntu 18.04. Für diese Anwendung verwende ich Gstreamer 1.14.1, und ich möchte das vaapi-Plugin verwenden, um h264-Streams zu decodieren, die von einer RTSP-Kamera stammen.

Während ich mit einem Monitor am PC angemeldet bin, läuft alles reibungslos. Dies ist die Ausgabe vonvainfo

libva info: VA-API version 1.1.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_1_1 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.1 (libva 2.1.0) vainfo: Driver version: Intel i965 driver for Intel(R) Coffee Lake - 2.1.0 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileH264MultiviewHigh : VAEntrypointVLD VAProfileH264MultiviewHigh : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileH264StereoHigh : VAEntrypointEncSlice VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointEncSlice VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointEncSlice VAProfileVP9Profile2 : VAEntrypointVLD 

und das ist die Ausgabe von gst-inspect-1.0 vaapi

Plugin Details: Name vaapi Description VA-API based elements Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so Version 1.14.1 License LGPL Source module gstreamer-vaapi Source release date 2018-05-17 Binary package gstreamer-vaapi Origin URL http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer  vaapih264enc: VA-API H264 encoder vaapijpegenc: VA-API JPEG encoder vaapivp9enc: VA-API VP9 encoder vaapivp8enc: VA-API VP8 encoder vaapih265enc: VA-API H265 encoder vaapimpeg2enc: VA-API MPEG-2 encoder vaapisink: VA-API sink vaapidecodebin: VA-API Decode Bin vaapipostproc: VA-API video postprocessing vaapih265dec: VA-API H265 decoder vaapivp9dec: VA-API VP9 decoder vaapivp8dec: VA-API VP8 decoder vaapivc1dec: VA-API VC1 decoder vaapih264dec: VA-API H264 decoder vaapimpeg2dec: VA-API MPEG2 decoder vaapijpegdec: VA-API JPEG decoder  16 features: +-- 16 elements 

Der Hardware-Decoder wird also richtig gesehen.

Wenn ich versuche, über SSH von einem anderen PC aus zuzugreifen, wenn der erste PC eine laufende Sitzung hat (z. B. ein Benutzer wird mit Monitor und Tastatur protokolliert), und ich die Verbindung zu dieser Sitzung herstelle, geben die vorherigen Befehle die gleichen Ergebnisse aus (mit Ausnahme des X-Servers welche kann nicht gestartet werden, aber es ist kein Problem). Wenn auf dem ersten PC keine aktive Sitzung vorhanden ist, kann ich die vaapi-Plugins von Gstremer nicht sehen. Die Ausgabe von vainfowird:

error: can't connect to X server! error: failed to initialize display 

aber wenn ich es sudo habe ist der ausgang

error: XDG_RUNTIME_DIR not set in the environment. error: can't connect to X server! libva info: VA-API version 1.1.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_1_1 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.1 (libva 2.1.0) vainfo: Driver version: Intel i965 driver for Intel(R) Coffee Lake - 2.1.0 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointEncSliceLP VAProfileH264MultiviewHigh : VAEntrypointVLD VAProfileH264MultiviewHigh : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileH264StereoHigh : VAEntrypointEncSlice VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointEncSlice VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointEncSlice VAProfileVP9Profile2 : VAEntrypointVLD 

und die Ausgabe von gst-inspect-1.0 vaapiwird

Plugin Details: Name vaapi Description VA-API based elements Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so Version 1.14.1 License LGPL Source module gstreamer-vaapi Source release date 2018-05-17 Binary package gstreamer-vaapi Origin URL http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer   0 features: 

Die vaapi-Plugins sind daher nicht mehr verfügbar. Wissen Sie, wie Sie das Vaapi-Plugin von Gstremer aktivieren können? Danke vielmals!

0

0 Antworten auf die Frage