Still stuck

Gary Thomas gary at mlbassoc.com
Thu Mar 7 10:54:10 PST 2013


On 2013-03-07 11:08, Tim-Philipp Müller wrote:
> On Thu, 2013-03-07 at 10:52 -0700, Gary Thomas wrote:
>
>>> (snip a couple of hundred lines of quotes)
>>
>> I've tried reworking my whole setup to use TCP sockets and it
>> seems to behave more sanely (not 100% sure yet).  The biggest
>> problem I'm having now is that TCP lets data flow in bits and
>> pieces but all of the video elements want to see full frames.
>> Even the RTP stuff has problems with many packets not being
>> decoded because of the buffering issues.
>>
>> Query: is there some way, possibly a stand alone element like
>> 'queue' that will read an arbitrary TCP stream and only send
>> out data of fixed size blocks?  In my example above, I'd need
>> to read from the TCP stream until there are exactly 691200 bytes
>> and only then pass the buffer on to ffenc_mpeg4.
>>
>> Ideas?
>
> gdppay / dpdepay might work (but also transmit some metadata and caps)

I tried that like this:
   gst-launch -e -v v4l2src device=/dev/video1 queue-size=16 \
    ! video/x-raw-yuv,format='(fourcc)UYVY',width=720,height=480,framerate=30/1 \
    ! tee name=v-src \
      v-src. ! queue leaky=upstream ! videoscale ! "video/x-raw-yuv,width=320,height=240" ! gdppay ! tcpserversink host=localhost port=61000 \
      v-src. ! queue leaky=upstream ! videoscale ! "video/x-raw-yuv,width=240,height=120" ! gdppay ! tcpserversink host=localhost port=61001 \
      v-src. ! queue leaky=upstream ! gdppay ! tcpserversink host=localhost port=61002 \
and
   gst-launch -vvv tcpclientsrc host=localhost port=61001 \
     ! gdpdepay \
     ! ffmpegcolorspace ! ximagesink force-aspect-ratio=true

Which yielded this error:
   /GstPipeline:pipeline0/GstGDPDepay:gdpdepay0.GstPad:src: caps = video/x-raw-yuv, width=(int)240, height=(int)120, format=(fourcc)UYVY, 
framerate=(fraction)30/1,interlaced=(boolean)false, pixel-aspect-ratio=(fraction)3/4
   ERROR: from element /GstPipeline:pipeline0/GstTCPClientSrc:tcpclientsrc0: Internal data flow error.
   Additional debug info:
   gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/GstTCPClientSrc:tcpclientsrc0:streaming task paused, reason not-negotiated (-4)
   ERROR: pipeline doesn't want to preroll.

So I tried to add caps to help out:
   gst-launch -vvv tcpclientsrc host=localhost port=61001 \
     ! gdpdepay \
     ! "video/x-raw-yuv,format=(fourcc)UYVY,width=240,height=120,framerate=(fraction)30/1" \
     ! ffmpegcolorspace ! ximagesink force-aspect-ratio=true

No change.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


More information about the gstreamer-devel mailing list