gstreamer rtpjpegdepay空文件

时间:2019-06-03 09:54:19

标签: gstreamer

我想通过网络从摄像机发送一张图像,但结果是一个空文件。

要发送图像,我使用下一个脚本:

gst-launch-1.0 nvcamerasrc num-buffers=1 ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420" ! nvjpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=5000 -e

我使用以下图像来接收图像:

gst-launch-1.0 -v udpsrc port=5000 num-buffers=1 ! application/x-rtp,payload=26,encoding-name=JPEG ! rtpjpegdepay ! filesink location=test_jpeg.jpg sync=false async=false -e

但是test_jpeg.jpg为空。我做错了什么? 在接收方,我要再详细一点:

/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "application/x-rtp\,\ payload\=\(int\)26\,\ encoding-name\=\(string\)JPEG\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000"
/GstPipeline:pipeline0/GstRtpJPEGDepay:rtpjpegdepay0.GstPad:sink: caps = "application/x-rtp\,\ payload\=\(int\)26\,\ encoding-name\=\(string\)JPEG\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000"
/GstPipeline:pipeline0/GstRtpJPEGDepay:rtpjpegdepay0.GstPad:src: caps = "image/jpeg\,\ framerate\=\(fraction\)0/1\,\ width\=\(int\)1920\,\ height\=\(int\)1080"
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "image/jpeg\,\ framerate\=\(fraction\)0/1\,\ width\=\(int\)1920\,\ height\=\(int\)1080"
Got EOS from element "pipeline0".

0 个答案:

没有答案