Gstreamer souphttpsrc to rtp h263 encoded stream
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?
- You need
jpegdec
aftermultipartdemux
to decode jpeg stream into raw video. - You don't need
ffmpegcolorspace
becausejpegdec
converts tovideo/x-raw-yuv
. 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
精彩评论