【发布时间】:2019-11-13 09:44:59
【问题描述】:
我正在将图像传送到 gstreamer,以便使用 omxh264 将其编码为视频。在我的代码中,图像是从源接收并通过管道传输到 gstreamer。为了重现这个问题,我在一个目录中提取了一些帧,并尝试使用以下命令将图像通过管道传输到 gstreamer。
cat Images/* |gst-launch-1.0 fdsrc fd=0 ! videoparse framerate=25 ! videoconvert ! omxh264enc ! qtmux ! filesink location=out.mp4
但是,我收到以下消息(在设置 GST_DEBUG="*:3" 之后)
Setting pipeline to PAUSED ...
0:00:00.136206216 14317 0x1ee58a0 WARN GST_POLL gstpoll.c:829:gst_poll_remove_fd: 0x1edf450: couldn't find fd !
Pipeline is PREROLLING ...
0:00:00.171278212 14317 0x1ec0c90 FIXME videoencoder gstvideoencoder.c:606:gst_video_encoder_setcaps:<omxh264enc-omxh264enc0> GstVideoEncoder::reset() is deprecated
0:00:00.181177600 14317 0x72302120 WARN GST_PADS gstpad.c:4092:gst_pad_peer_query:<omxh264enc-omxh264enc0:src> could not send sticky events
0:00:00.183710793 14317 0x72302120 ERROR omx gstomx.c:2098:gst_omx_port_populate_unlocked:<omxh264enc-omxh264enc0> Failed to pass buffer 0x71900d50 (0x71804010) to video_encode port 201: Bad port index (0x8000101b)
0:00:00.184424533 14317 0x72302120 WARN omxvideoenc gstomxvideoenc.c:945:gst_omx_video_enc_loop:<omxh264enc-omxh264enc0> error: Unable to reconfigure output port
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: Could not configure supporting library.
Additional debug info:
gstomxvideoenc.c(945): gst_omx_video_enc_loop (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:
Unable to reconfigure output port
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
0:00:00.185111606 14317 0x72302120 FIXME basesink gstbasesink.c:3126:gst_base_sink_default_event:<filesink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
Freeing pipeline ...
如果我将 omxh264enc 替换为 x264enc,则该命令可以正常工作。我在 omxh264enc 上做错了什么?
【问题讨论】:
标签: raspberry-pi raspberry-pi3 gstreamer gstreamer-1.0