Video streaming 并非所有元素都可以创建(x264enc或TIVidEnc1?)
我正在尝试创建Video streaming 并非所有元素都可以创建(x264enc或TIVidEnc1?),video-streaming,gstreamer,rtp,Video Streaming,Gstreamer,Rtp,我正在尝试创建x264enc: int main (int argc, char *argv[]) { GstElement *pipeline, *src, *enc, *rtp, *sink; ... ... src = gst_element_factory_make ("videotestsrc", "src"); enc = gst_element_factory_make ("x264enc", "enc"); rtp = gst_element_factory_make ("rt
x264enc
:
int main (int argc, char *argv[]) {
GstElement *pipeline, *src, *enc, *rtp, *sink;
...
...
src = gst_element_factory_make ("videotestsrc", "src");
enc = gst_element_factory_make ("x264enc", "enc");
rtp = gst_element_factory_make ("rtph264pay", "rtp");
sink = gst_element_factory_make ("udpsink", "sink");
pipeline = gst_pipeline_new ("test-pipeline");
if (!pipeline || !src || !enc || !rtp || !sink ) {
g_printerr ("Not all elements could be created.\n");
return -1;
}
}
如果我删除该行:
enc = gst_element_factory_make ("x264enc", "enc");
程序将运行,如果我运行命令:
gst-inspect x264enc
我得到了编码器的信息,所以它存在
我还尝试从x264enc
更改为TIVidEnc1
,但没有成功
有什么想法吗
谢谢 您的系统上很可能没有安装x264enc编码器。此编码器不包含在gstreamer的基本包中,您需要手动下载它并将其构建到您的系统中。 下载后,将其构建到gstreamer的丑陋库中。 我不确定,但在Gstreamer的更新库中,它可能也包括在内。因此,更新您的Gstreamer可能也会起作用