首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MPEG-TS编码和mux GStreamer管道

MPEG-TS编码和mux GStreamer管道
EN

Stack Overflow用户
提问于 2020-08-04 17:41:11
回答 1查看 1K关注 0票数 0

我正试图将GESPipeline编码和mux到MPEG-TS中,以便在UDP上进行流传输。

在预览模式下,流水线在屏幕上播放得很好。

我的尝试,实质上是:

代码语言:javascript
复制
GstEncodingContainerProfile *prof;
GstCaps *caps;
caps = gst_caps_from_string("video/mpegts");
prof = gst_encoding_container_profile_new("test-app-profile", NULL, caps, NULL);
caps = gst_caps_from_string("video/x-h264");
gst_encoding_container_profile_add_profile(prof,
    (GstEncodingProfile*) gst_encoding_video_profile_new(caps, NULL, NULL, 0));
caps = gst_caps_from_string("audio/x-ac3");
gst_encoding_container_profile_add_profile(prof,
    (GstEncodingProfile*) gst_encoding_audio_profile_new(caps, NULL, NULL, 0));
// this fails:
ges_pipeline_set_render_settings (pl, "file:///path/out.ts", prof);

在输出中使用GST_DEBUG=3:

encodebin gstencodebin.c:1976:create_elements_and_pads: error:格式视频/mpegts没有可用的muxer

Update:更详细的调试显示,它实际上查看了mpegtsmux,但跳过了它。为什么?

相关信息:

gst_encode_bin_setup_profile:设置配置文件0x557c3c98c460:test-app-profile (类型:容器)

create_elements_and_pads:当前配置文件:测试-应用-配置文件

_get_muxer:获取格式视频/mpegts的muxers列表

gst_element_factory_list_filter:寻找工厂

..。

gst_element_factory_list_filter:尝试mpegtsmux

gst_structure_parse_field:尝试字段名“系统流”

_priv_gst_value_parse_value:尝试输入名称'boolean‘

gst_structure_parse_field:尝试字段名“数据包大小”

_priv_gst_value_parse_value:尝试输入名称'int‘

..。尝试其他的木匠..。

如果我将视频/mpegts更改为视频/x-matroska,则会生成mkv文件(虽然很难看,而且没有声音)。

如何将其编码成mpegts?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-08-18 11:02:20

问题是缺少了gst-inspect-1.0 mpegtsmux中src大写中列出的字段。这些都是必需的,如果您不指定它们,它将与muxer不匹配。

mpegtsmux解决方案:

gst_caps_from_string(“视频/电子设备,systemstream=true,packetsize=188");

感谢Freenode #gstreamer频道。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63252330

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档