开发者

Gstreamer souphttpsrc to rtp h263 encoded stream

开发者 https://www.devze.com 2023-02-13 04:20 出处:网络
I am trying to create a pipeline for streaming a jpeg stream into h263 encoded stream over RTP. When I execute:

I am trying to create a pipeline for streaming a jpeg stream into h263 encoded stream over RTP. When I execute:

gst-launch -v \
    souphttpsrc \
        location=http://192.168.1.54:8080 \
        do-timestamp=true \
    ! multipartdemux ! image/jpeg,width=352,height=288 \
    ! ffmpegcolorspace ! video/x-raw-yuv,framerate=15/1 \
    ! videoscale \
    ! ffenc_h263 ! rtph263pay \
    ! udpsink host=192.168.1.31 port=1234
开发者_开发技巧

gstreamer reports:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2: caps = image/jpeg, width=(int)352, height=(int)288
ERROR: from element /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2507): gst_base_src_loop (): /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0:
streaming task paused, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstMultipartDemux:multipartdemux0.GstPad:src_0: caps = NULL
Freeing pipeline ...

I've checked that the elements are existing. I've run gst-inspect for ffenc_h263, ffmpegcolorspace and the rest of the elements in this command too. gst-inspect does not report any error. Is there something I'm missing?


  1. You need jpegdec after multipartdemux to decode jpeg stream into raw video.
  2. You don't need ffmpegcolorspace because jpegdec converts to video/x-raw-yuv.
  3. videoscale is useless here, because you do not specify width/height for outgoing stream.

Try this:

gst-launch -v \
    souphttpsrc \
        location=http://192.168.1.54:8080 \
        do-timestamp=true \
    ! multipartdemux \
    ! image/jpeg,width=352,height=288,framerate=15/1 \
    ! jpegdec ! ffenc_h263 ! rtph263pay \
    ! udpsink host=192.168.1.31 port=1234
0

精彩评论

暂无评论...
验证码 换一张
取 消