Feeding gstreamer fdsrc via STDIN only produces fr

2019-07-09 05:32发布

问题:

I am using gstreamer windows port OSSBuild. I want to feed gst-launch with video data via its STDIN using the fdsrc element. Doing so it seems as if the pipline is consuming just a small fraction of the input. For instance

type source.yuv | gst-launch fdsrc ! videoparse format=GST_VIDEO_FORMAT_I420 width=176 height=144 framerate=30000/1001 ! x264enc ! mpegtsmux ! filesink location=out.ts

will NOT work while

gst-launch filesrc location=source.yuv ! videoparse format=GST_VIDEO_FORMAT_I420 width=176 height=144 framerate=30000/1001 ! x264enc ! mpegtsmux ! filesink location=out.ts

is all fine. So I assume the problem is related to my usage of fdsrc.

Any ideas?

回答1:

This works under linux:

gst-launch videotestsrc num-buffers=100 ! \
  video/x-raw-yuv,format=(fourcc)"I420",width=320,height=240 ! filesink location=video.yuv

cat video.yuv | gst-launch-0.10 fdsrc ! \
  videoparse format="I420" width=320 height=240 ! xvimagesink

I wonder if we'Re hitting a portability issue with regards to io under windows. You could try putting a queue element right after fdsrc.