0

gstreamer を使用して、IP ベースのディスプレイでラップトップ画面をストリーミングしています。

両端のパイプラインは次のとおりです。

ラップトップ:

C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -v dx9screencapsrc ! queue ! videoconvert ! x264enc ! "video/x-h264,profile=baseline" ! h264parse config-interval=-1 ! rtph264pay pt=96 config-interval=-1 ! udpsink host=<ipaddr> port=5004 sync=true

IP ディスプレイ:

gst-launch -v udpsrc port=5004 ! application/x-rtp, payload=96 ! rtph264depay ! vpudec low-latency=true ! imxv4l2sink sync=false

問題は、ディスプレイの解像度が 1024x768 ですが、ソース プラグインが 1920x1080 を生成していることです。これは私のラップトップの解像度です。

これを IP ディスプレイの解像度に変換する必要があります。ラップトップのパイプラインを次のように変更しました。

C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -v dx9screencapsrc  ! video/x-raw, width=1024,height=768,framerate=30/1 !queue ! videoconvert  ! x264enc  ! "video/x-h264,profile=baseline" ! h264parse config-interval=-1 ! rtph264pay pt=96 config-interval=-1 ! udpsink host=<IPAddress> port=5004 sync=true

次のエラーで失敗します。

WARNING: erroneous pipeline: could not link dx9screencapsrc0 to queue0, dx9screencapsrc0 can't handle caps video/x-raw, width=(int)1024, height=(int)768, framerate=(fraction)30/1

gst-inspect-1.0 を使って dx9screencapsrc の caps を見ると、幅と高さの cap があります。

画面全体をキャプチャして 1024x768 に変換するという要件を満たすにはどうすればよいですか

4

0 に答える 0