Gstreamer souphttpsrc to rtp h263编码流

时间:2011-02-22 12:58:20

标签: gstreamer

我正在尝试创建一个管道,用于通过RTP将jpeg流传输到h263编码流。当我执行:

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报道:

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 ...

我已经检查过元素是否存在。我已经为ffenc_h263,ffmpegcolorspace和这个命令中的其他元素运行了gst-inspect。 gst-inspect不会报告任何错误。 有什么我想念的吗?

1 个答案:

答案 0 :(得分:2)

  1. jpegdec后需要multipartdemux才能将jpeg流解码为原始视频。
  2. 您不需要ffmpegcolorspace,因为jpegdec会转换为video/x-raw-yuv
  3. videoscale在这里没用,因为您没有为传出流指定宽度/高度。
  4. 试试这个:

    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