以下 GStreamer 管道生成一个带有 mpeg2 视频轨道的 mpeg2ts。
gst-launch-1.0 videotestsrc pattern=ball num-buffers=900 ! "video/x-raw, format=(string)I420, \
width=(int)704, height=(int)576, framerate=(fraction)25/1" ! avenc_mpeg2video ! \
mpegtsmux ! filesink location=test.ts
我需要隔行扫描视频,但是在添加隔行扫描组件时,我得到:
gst-launch-1.0 videotestsrc pattern=ball num-buffers=900 ! "video/x-raw, format=(string)I420, \
width=(int)704, height=(int)576, framerate=(fraction)25/1" ! interlace ! avenc_mpeg2video ! \
mpegtsmux name=mux ! filesink location=test.ts
WARNING: erroneous pipeline: could not link interlace0 to avenc_mpeg2video0
这对我来说很奇怪,因为这两个组件似乎都支持它们的焊盘上的 I420。我尝试在 interlace 和 avenc_mpeg2video 之间添加各种 capsfilter,但无济于事 - 它只是无法以其他方式连接。我相信这两者应该是兼容的 - 有人可以解释为什么上述失败,甚至可能显示一个工作管道应该是什么样子吗?